Merge branch 'fix/add-option-to-hide-filtered-statues' into 'develop'
#254 Add option to hide filtered statuses See merge request pleroma/pleroma-fe!539
This commit is contained in:
commit
531f150dd3
8 changed files with 31 additions and 5 deletions
|
@ -59,6 +59,7 @@ const afterStoreSetup = ({ store, i18n }) => {
|
|||
copyInstanceOption('background')
|
||||
copyInstanceOption('hidePostStats')
|
||||
copyInstanceOption('hideUserStats')
|
||||
copyInstanceOption('hideFilteredStatuses')
|
||||
copyInstanceOption('logo')
|
||||
|
||||
store.dispatch('setInstanceOption', {
|
||||
|
|
|
@ -27,6 +27,11 @@ const settings = {
|
|||
: user.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,
|
||||
replyVisibilityLocal: user.replyVisibility,
|
||||
loopVideoLocal: user.loopVideo,
|
||||
|
@ -101,6 +106,9 @@ const settings = {
|
|||
hideUserStatsLocal (value) {
|
||||
this.$store.dispatch('setOption', { name: 'hideUserStats', value })
|
||||
},
|
||||
hideFilteredStatusesLocal (value) {
|
||||
this.$store.dispatch('setOption', { name: 'hideFilteredStatuses', value })
|
||||
},
|
||||
hideNsfwLocal (value) {
|
||||
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
||||
},
|
||||
|
|
|
@ -227,7 +227,6 @@
|
|||
</label>
|
||||
</li>
|
||||
</ul>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
{{$t('settings.replies_in_timeline')}}
|
||||
|
@ -254,11 +253,18 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="setting-item">
|
||||
<p>{{$t('settings.filtering_explanation')}}</p>
|
||||
<textarea id="muteWords" v-model="muteWordsString"></textarea>
|
||||
<div>
|
||||
<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>
|
||||
|
||||
</tab-switcher>
|
||||
</keep-alive>
|
||||
</div>
|
||||
|
|
|
@ -110,6 +110,14 @@ const Status = {
|
|||
return hits
|
||||
},
|
||||
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
|
||||
},
|
||||
hideStatus () {
|
||||
return (this.hideReply || this.deleted) || (this.muted && this.hideFilteredStatuses)
|
||||
},
|
||||
isFocused () {
|
||||
// retweet or root of an expanded conversation
|
||||
if (this.focused) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div class="status-el" v-if="!hideReply && !deleted" :class="[{ 'status-el_focused': isFocused }, { 'status-conversation': inlineExpanded }]">
|
||||
<div class="status-el" v-if="!hideStatus" :class="[{ 'status-el_focused': isFocused }, { 'status-conversation': inlineExpanded }]">
|
||||
<template v-if="muted && !noReplyLinks">
|
||||
<div class="media status container muted">
|
||||
<small>
|
||||
|
|
|
@ -132,6 +132,7 @@
|
|||
"preload_images": "Bilder vorausladen",
|
||||
"hide_post_stats": "Beitragsstatistiken verbergen (z.B. die Anzahl der Favoriten)",
|
||||
"hide_user_stats": "Benutzerstatistiken verbergen (z.B. die Anzahl der Follower)",
|
||||
"hide_filtered_statuses": "Gefilterte Beiträge verbergen",
|
||||
"import_followers_from_a_csv_file": "Importiere Follower, denen du folgen möchtest, aus einer CSV-Datei",
|
||||
"import_theme": "Farbschema laden",
|
||||
"inputRadius": "Eingabefelder",
|
||||
|
|
|
@ -140,6 +140,7 @@
|
|||
"use_one_click_nsfw": "Open NSFW attachments with just one click",
|
||||
"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_filtered_statuses": "Hide filtered statuses",
|
||||
"import_followers_from_a_csv_file": "Import follows from a csv file",
|
||||
"import_theme": "Load preset",
|
||||
"inputRadius": "Input fields",
|
||||
|
|
|
@ -21,6 +21,7 @@ const defaultState = {
|
|||
collapseMessageWithSubject: false,
|
||||
hidePostStats: false,
|
||||
hideUserStats: false,
|
||||
hideFilteredStatuses: true,
|
||||
disableChat: false,
|
||||
scopeCopy: true,
|
||||
subjectLineBehavior: 'email',
|
||||
|
|
Loading…
Reference in a new issue