Allow muting sensitive posts in public timelines
This commit is contained in:
parent
15dde2d372
commit
59656af44c
|
@ -63,6 +63,13 @@ const QuickFilterSettings = {
|
||||||
const value = !this.muteBotStatuses
|
const value = !this.muteBotStatuses
|
||||||
this.$store.dispatch('setOption', { name: 'muteBotStatuses', value })
|
this.$store.dispatch('setOption', { name: 'muteBotStatuses', value })
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
muteSensitiveStatuses: {
|
||||||
|
get () { return this.mergedConfig.muteSensitiveStatuses },
|
||||||
|
set () {
|
||||||
|
const value = !this.muteSensitiveStatuses
|
||||||
|
this.$store.dispatch('setOption', { name: 'muteSensitiveStatuses', value })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,6 +71,18 @@
|
||||||
:aria-hidden="true"
|
:aria-hidden="true"
|
||||||
/>{{ $t('settings.mute_bot_posts') }}
|
/>{{ $t('settings.mute_bot_posts') }}
|
||||||
</button>
|
</button>
|
||||||
|
<button
|
||||||
|
class="menu-item dropdown-item"
|
||||||
|
role="menuitemcheckbox"
|
||||||
|
:aria-checked="muteSensitiveStatuses"
|
||||||
|
@click="muteSensitiveStatuses = !muteSensitiveStatuses"
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
class="input menu-checkbox"
|
||||||
|
:class="{ 'menu-checkbox-checked': muteSensitiveStatuses }"
|
||||||
|
:aria-hidden="true"
|
||||||
|
/>{{ $t('settings.mute_sensitive_posts') }}
|
||||||
|
</button>
|
||||||
<button
|
<button
|
||||||
class="menu-item dropdown-item"
|
class="menu-item dropdown-item"
|
||||||
role="menuitemcheckbox"
|
role="menuitemcheckbox"
|
||||||
|
|
|
@ -61,6 +61,13 @@ const QuickViewSettings = {
|
||||||
const value = !this.muteBotStatuses
|
const value = !this.muteBotStatuses
|
||||||
this.$store.dispatch('setOption', { name: 'muteBotStatuses', value })
|
this.$store.dispatch('setOption', { name: 'muteBotStatuses', value })
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
muteSensitiveStatuses: {
|
||||||
|
get () { return this.mergedConfig.muteSensitiveStatuses },
|
||||||
|
set () {
|
||||||
|
const value = !this.muteSensitiveStatuses
|
||||||
|
this.$store.dispatch('setOption', { name: 'muteSensitiveStatuses', value })
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,29 @@
|
||||||
{{ $t('settings.mute_bot_posts') }}
|
{{ $t('settings.mute_bot_posts') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="muteSensitiveStatuses">
|
||||||
|
{{ $t('settings.mute_sensitive_posts') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="hideMutedFederationRestrictions">
|
||||||
|
{{ $t('settings.hide_muted_federation_restrictions') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
<ul
|
||||||
|
class="setting-list suboptions"
|
||||||
|
:class="[{disabled: !streaming}]"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
v-for="item in muteFederationRestrictionsLevels"
|
||||||
|
:key="'mute_' + item + '_federation_restriction'"
|
||||||
|
>
|
||||||
|
<BooleanSetting :path="'muteFederationRestrictions.' + item">
|
||||||
|
{{ $t('settings.mute_' + item + '_federation_restriction') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<BooleanSetting path="hidePostStats">
|
<BooleanSetting path="hidePostStats">
|
||||||
{{ $t('settings.hide_post_stats') }}
|
{{ $t('settings.hide_post_stats') }}
|
||||||
|
|
|
@ -238,6 +238,9 @@ const Status = {
|
||||||
showActorTypeIndicator () {
|
showActorTypeIndicator () {
|
||||||
return !this.hideBotIndication
|
return !this.hideBotIndication
|
||||||
},
|
},
|
||||||
|
sensitiveStatus () {
|
||||||
|
return this.status.nsfw
|
||||||
|
},
|
||||||
mentionsLine () {
|
mentionsLine () {
|
||||||
if (!this.headTailLinks) return []
|
if (!this.headTailLinks) return []
|
||||||
const writtenSet = new Set(this.headTailLinks.writtenMentions.map(_ => _.url))
|
const writtenSet = new Set(this.headTailLinks.writtenMentions.map(_ => _.url))
|
||||||
|
@ -265,7 +268,9 @@ const Status = {
|
||||||
// Wordfiltered
|
// Wordfiltered
|
||||||
this.muteWordHits.length > 0 ||
|
this.muteWordHits.length > 0 ||
|
||||||
// bot status
|
// bot status
|
||||||
(this.muteBotStatuses && this.botStatus && !this.compact)
|
(this.muteBotStatuses && this.botStatus && !this.compact) ||
|
||||||
|
// sensitive status
|
||||||
|
(this.muteSensitiveStatuses && this.sensitiveStatus && !this.compact)
|
||||||
return !this.unmuted && !this.shouldNotMute && reasonsToMute
|
return !this.unmuted && !this.shouldNotMute && reasonsToMute
|
||||||
},
|
},
|
||||||
userIsMuted () {
|
userIsMuted () {
|
||||||
|
@ -371,6 +376,9 @@ const Status = {
|
||||||
muteBotStatuses () {
|
muteBotStatuses () {
|
||||||
return this.mergedConfig.muteBotStatuses
|
return this.mergedConfig.muteBotStatuses
|
||||||
},
|
},
|
||||||
|
muteSensitiveStatuses () {
|
||||||
|
return this.mergedConfig.muteSensitiveStatuses
|
||||||
|
},
|
||||||
hideBotIndication () {
|
hideBotIndication () {
|
||||||
return this.mergedConfig.hideBotIndication
|
return this.mergedConfig.hideBotIndication
|
||||||
},
|
},
|
||||||
|
|
|
@ -501,6 +501,7 @@
|
||||||
"mute_bot_posts": "Mute bot posts",
|
"mute_bot_posts": "Mute bot posts",
|
||||||
"hide_actor_type_indication": "Hide actor type (bots, groups, etc.) indication in posts",
|
"hide_actor_type_indication": "Hide actor type (bots, groups, etc.) indication in posts",
|
||||||
"hide_scrobbles": "Hide scrobbles",
|
"hide_scrobbles": "Hide scrobbles",
|
||||||
|
"mute_sensitive_posts": "Mute sensitive posts",
|
||||||
"hide_all_muted_posts": "Hide muted posts",
|
"hide_all_muted_posts": "Hide muted posts",
|
||||||
"max_thumbnails": "Maximum amount of thumbnails per post (empty = no limit)",
|
"max_thumbnails": "Maximum amount of thumbnails per post (empty = no limit)",
|
||||||
"hide_isp": "Hide instance-specific panel",
|
"hide_isp": "Hide instance-specific panel",
|
||||||
|
|
|
@ -36,6 +36,7 @@ export const defaultState = {
|
||||||
hideMutedThreads: undefined, // instance default
|
hideMutedThreads: undefined, // instance default
|
||||||
hideWordFilteredPosts: undefined, // instance default
|
hideWordFilteredPosts: undefined, // instance default
|
||||||
muteBotStatuses: undefined, // instance default
|
muteBotStatuses: undefined, // instance default
|
||||||
|
muteSensitiveStatuses: undefined, // instance default
|
||||||
collapseMessageWithSubject: undefined, // instance default
|
collapseMessageWithSubject: undefined, // instance default
|
||||||
padEmoji: true,
|
padEmoji: true,
|
||||||
hideAttachments: false,
|
hideAttachments: false,
|
||||||
|
|
|
@ -71,6 +71,7 @@ const defaultState = {
|
||||||
hideSitename: false,
|
hideSitename: false,
|
||||||
hideUserStats: false,
|
hideUserStats: false,
|
||||||
muteBotStatuses: false,
|
muteBotStatuses: false,
|
||||||
|
muteSensitiveStatuses: false,
|
||||||
modalOnRepeat: false,
|
modalOnRepeat: false,
|
||||||
modalOnUnfollow: false,
|
modalOnUnfollow: false,
|
||||||
modalOnBlock: true,
|
modalOnBlock: true,
|
||||||
|
|
Loading…
Reference in New Issue