Make fading ancestors optional

This commit is contained in:
Tusooa Zhu 2022-03-06 14:13:35 -05:00
parent fa20ea76b1
commit d157f67381
No known key found for this signature in database
GPG key ID: 7B467EDE43A08224
5 changed files with 12 additions and 2 deletions

View file

@ -89,6 +89,9 @@ const conversation = {
isLinearView () {
return this.displayStyle === 'linear'
},
shouldFadeAncestors () {
return this.$store.getters.mergedConfig.conversationTreeFadeAncestors
},
otherRepliesButtonPosition () {
return this.$store.getters.mergedConfig.conversationOtherRepliesButton
},

View file

@ -50,7 +50,7 @@
v-for="status in ancestorsOf(diveRoot)"
:key="status.id"
class="thread-ancestor"
:class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1}"
:class="{'thread-ancestor-has-other-replies': getReplies(status.id).length > 1, '-faded': shouldFadeAncestors}"
>
<status
ref="statusComponent"
@ -210,7 +210,7 @@
border-left: 2px solid var(--border, $fallback--border);
}
.thread-ancestor .StatusContent {
.thread-ancestor.-faded .StatusContent {
--link: var(--faintLink);
--text: var(--faint);
color: var(--text);

View file

@ -170,6 +170,11 @@
{{ $t('settings.tree_advanced') }}
</BooleanSetting>
</li>
<li>
<BooleanSetting path="conversationTreeFadeAncestors">
{{ $t('settings.tree_fade_ancestors') }}
</BooleanSetting>
</li>
<li>
<label for="maxDepthInThread">
{{ $t('settings.max_depth_in_thread') }}

View file

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

View file

@ -56,6 +56,7 @@ const defaultState = {
conversationDisplay: 'linear',
conversationTreeAdvanced: false,
conversationOtherRepliesButton: 'below',
conversationTreeFadeAncestors: false,
maxDepthInThread: 6,
// Nasty stuff