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
},
isTreeView () {
return this.displayStyle === 'tree' || this.displayStyle === 'simple_tree'
return !this.isLinearView
},
treeViewIsSimple () {
return this.displayStyle === 'simple_tree'
return !this.$store.getters.mergedConfig.conversationTreeAdvanced
},
isLinearView () {
return this.displayStyle === 'linear'

View File

@ -20,7 +20,7 @@ const GeneralTab = {
value: 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,
value: mode,
label: this.$t(`settings.conversation_display_${mode}`)

View File

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

View File

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

View File

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