forked from AkkomaGang/akkoma-fe
Add option to hide filtered statuses
This commit is contained in:
parent
6a867f6ae3
commit
a57f8bdd68
7 changed files with 27 additions and 5 deletions
|
@ -59,6 +59,7 @@ const afterStoreSetup = ({ store, i18n }) => {
|
||||||
copyInstanceOption('background')
|
copyInstanceOption('background')
|
||||||
copyInstanceOption('hidePostStats')
|
copyInstanceOption('hidePostStats')
|
||||||
copyInstanceOption('hideUserStats')
|
copyInstanceOption('hideUserStats')
|
||||||
|
copyInstanceOption('hideFilteredStatuses')
|
||||||
copyInstanceOption('logo')
|
copyInstanceOption('logo')
|
||||||
|
|
||||||
store.dispatch('setInstanceOption', {
|
store.dispatch('setInstanceOption', {
|
||||||
|
|
|
@ -27,6 +27,11 @@ const settings = {
|
||||||
: user.hideUserStats,
|
: user.hideUserStats,
|
||||||
hideUserStatsDefault: this.$t('settings.values.' + instance.hideUserStats),
|
hideUserStatsDefault: this.$t('settings.values.' + instance.hideUserStats),
|
||||||
|
|
||||||
|
hideFilteredStatusesLocal: typeof user.hideFilteredStatuses === 'undefined'
|
||||||
|
? instance.hideFilteredStatuses
|
||||||
|
: user.hideFilteredStatuses,
|
||||||
|
hideFilteredStatusesDefault: this.$t('settings.values.' + instance.hideFilteredStatuses),
|
||||||
|
|
||||||
notificationVisibilityLocal: user.notificationVisibility,
|
notificationVisibilityLocal: user.notificationVisibility,
|
||||||
replyVisibilityLocal: user.replyVisibility,
|
replyVisibilityLocal: user.replyVisibility,
|
||||||
loopVideoLocal: user.loopVideo,
|
loopVideoLocal: user.loopVideo,
|
||||||
|
@ -96,6 +101,9 @@ const settings = {
|
||||||
hideUserStatsLocal (value) {
|
hideUserStatsLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'hideUserStats', value })
|
this.$store.dispatch('setOption', { name: 'hideUserStats', value })
|
||||||
},
|
},
|
||||||
|
hideFilteredStatusesLocal (value) {
|
||||||
|
this.$store.dispatch('setOption', { name: 'hideFilteredStatuses', value })
|
||||||
|
},
|
||||||
hideNsfwLocal (value) {
|
hideNsfwLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
||||||
},
|
},
|
||||||
|
|
|
@ -205,7 +205,6 @@
|
||||||
</label>
|
</label>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{$t('settings.replies_in_timeline')}}
|
{{$t('settings.replies_in_timeline')}}
|
||||||
|
@ -232,11 +231,18 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<p>{{$t('settings.filtering_explanation')}}</p>
|
<div>
|
||||||
<textarea id="muteWords" v-model="muteWordsString"></textarea>
|
<p>{{$t('settings.filtering_explanation')}}</p>
|
||||||
|
<textarea id="muteWords" v-model="muteWordsString"></textarea>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="hideFilteredStatuses" v-model="hideFilteredStatusesLocal">
|
||||||
|
<label for="hideFilteredStatuses">
|
||||||
|
{{$t('settings.hide_filtered_statuses')}} {{$t('settings.instance_default', { value: hideFilteredStatusesDefault })}}
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</tab-switcher>
|
</tab-switcher>
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -110,6 +110,11 @@ const Status = {
|
||||||
return hits
|
return hits
|
||||||
},
|
},
|
||||||
muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) },
|
muted () { return !this.unmuted && (this.status.user.muted || this.muteWordHits.length > 0) },
|
||||||
|
hideFilteredStatuses () {
|
||||||
|
return typeof this.$store.state.config.hideFilteredStatuses === 'undefined'
|
||||||
|
? this.$store.state.instance.hideFilteredStatuses
|
||||||
|
: this.$store.state.config.hideFilteredStatuses
|
||||||
|
},
|
||||||
isFocused () {
|
isFocused () {
|
||||||
// retweet or root of an expanded conversation
|
// retweet or root of an expanded conversation
|
||||||
if (this.focused) {
|
if (this.focused) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="status-el" v-if="!hideReply && !deleted" :class="[{ 'status-el_focused': isFocused }, { 'status-conversation': inlineExpanded }]">
|
<div class="status-el" v-if="(!hideReply && !deleted) && !(muted && hideFilteredStatuses)" :class="[{ 'status-el_focused': isFocused }, { 'status-conversation': inlineExpanded }]">
|
||||||
<template v-if="muted && !noReplyLinks">
|
<template v-if="muted && !noReplyLinks">
|
||||||
<div class="media status container muted">
|
<div class="media status container muted">
|
||||||
<small>
|
<small>
|
||||||
|
|
|
@ -139,6 +139,7 @@
|
||||||
"use_one_click_nsfw": "Open NSFW attachments with just one click",
|
"use_one_click_nsfw": "Open NSFW attachments with just one click",
|
||||||
"hide_post_stats": "Hide post statistics (e.g. the number of favorites)",
|
"hide_post_stats": "Hide post statistics (e.g. the number of favorites)",
|
||||||
"hide_user_stats": "Hide user statistics (e.g. the number of followers)",
|
"hide_user_stats": "Hide user statistics (e.g. the number of followers)",
|
||||||
|
"hide_filtered_statuses": "Hide filtered statuses",
|
||||||
"import_followers_from_a_csv_file": "Import follows from a csv file",
|
"import_followers_from_a_csv_file": "Import follows from a csv file",
|
||||||
"import_theme": "Load preset",
|
"import_theme": "Load preset",
|
||||||
"inputRadius": "Input fields",
|
"inputRadius": "Input fields",
|
||||||
|
|
|
@ -21,6 +21,7 @@ const defaultState = {
|
||||||
collapseMessageWithSubject: false,
|
collapseMessageWithSubject: false,
|
||||||
hidePostStats: false,
|
hidePostStats: false,
|
||||||
hideUserStats: false,
|
hideUserStats: false,
|
||||||
|
hideFilteredStatuses: true,
|
||||||
disableChat: false,
|
disableChat: false,
|
||||||
scopeCopy: true,
|
scopeCopy: true,
|
||||||
subjectLineBehavior: 'email',
|
subjectLineBehavior: 'email',
|
||||||
|
|
Loading…
Reference in a new issue