Split conversation display style into two different settings

linear => linear (now default)
simple_tree => tree / conversationTreeAdvanced=false
tree => tree / conversationTreeAdvanced=true
This commit is contained in:
Tusooa Zhu 2022-03-06 13:57:48 -05:00
parent 9432fcec7d
commit e7f5033c7d
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
5 changed files with 11 additions and 4 deletions

View file

@ -81,10 +81,10 @@ const conversation = {
return this.$store.getters.mergedConfig.conversationDisplay return this.$store.getters.mergedConfig.conversationDisplay
}, },
isTreeView () { isTreeView () {
return this.displayStyle === 'tree' || this.displayStyle === 'simple_tree' return !this.isLinearView
}, },
treeViewIsSimple () { treeViewIsSimple () {
return this.displayStyle === 'simple_tree' return !this.$store.getters.mergedConfig.conversationTreeAdvanced
}, },
isLinearView () { isLinearView () {
return this.displayStyle === 'linear' return this.displayStyle === 'linear'

View file

@ -20,7 +20,7 @@ const GeneralTab = {
value: mode, value: mode,
label: this.$t(`settings.subject_line_${mode === 'masto' ? 'mastodon' : mode}`) label: this.$t(`settings.subject_line_${mode === 'masto' ? 'mastodon' : mode}`)
})), })),
conversationDisplayOptions: ['tree', 'simple_tree', 'linear'].map(mode => ({ conversationDisplayOptions: ['tree', 'linear'].map(mode => ({
key: mode, key: mode,
value: mode, value: mode,
label: this.$t(`settings.conversation_display_${mode}`) label: this.$t(`settings.conversation_display_${mode}`)

View file

@ -165,6 +165,11 @@
v-if="conversationDisplay !== 'linear'" v-if="conversationDisplay !== 'linear'"
class="setting-list suboptions" class="setting-list suboptions"
> >
<li>
<BooleanSetting path="conversationTreeAdvanced">
{{ $t('settings.tree_advanced') }}
</BooleanSetting>
</li>
<li> <li>
<label for="maxDepthInThread"> <label for="maxDepthInThread">
{{ $t('settings.max_depth_in_thread') }} {{ $t('settings.max_depth_in_thread') }}

View file

@ -85,6 +85,7 @@ export const defaultState = {
virtualScrolling: undefined, // instance default virtualScrolling: undefined, // instance default
sensitiveByDefault: undefined, // instance default sensitiveByDefault: undefined, // instance default
conversationDisplay: undefined, // instance default conversationDisplay: undefined, // instance default
conversationTreeAdvanced: undefined, // instance default
conversationOtherRepliesButton: undefined, // instance default conversationOtherRepliesButton: undefined, // instance default
maxDepthInThread: 6 maxDepthInThread: 6
} }

View file

@ -53,7 +53,8 @@ const defaultState = {
theme: 'pleroma-dark', theme: 'pleroma-dark',
virtualScrolling: true, virtualScrolling: true,
sensitiveByDefault: false, sensitiveByDefault: false,
conversationDisplay: 'simple_tree', conversationDisplay: 'linear',
conversationTreeAdvanced: false,
conversationOtherRepliesButton: 'below', conversationOtherRepliesButton: 'below',
maxDepthInThread: 6, maxDepthInThread: 6,