Add option for disabling counts (followers, statuses) in user profiles.
This commit is contained in:
parent
c348a3ec11
commit
dcb7e1ecf4
|
@ -10,6 +10,7 @@ const settings = {
|
||||||
hideAttachmentsLocal: this.$store.state.config.hideAttachments,
|
hideAttachmentsLocal: this.$store.state.config.hideAttachments,
|
||||||
hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv,
|
hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv,
|
||||||
hideNsfwLocal: this.$store.state.config.hideNsfw,
|
hideNsfwLocal: this.$store.state.config.hideNsfw,
|
||||||
|
hideUserStatsLocal: this.$store.state.config.hideUserStats,
|
||||||
notificationVisibilityLocal: this.$store.state.config.notificationVisibility,
|
notificationVisibilityLocal: this.$store.state.config.notificationVisibility,
|
||||||
replyVisibilityLocal: this.$store.state.config.replyVisibility,
|
replyVisibilityLocal: this.$store.state.config.replyVisibility,
|
||||||
loopVideoLocal: this.$store.state.config.loopVideo,
|
loopVideoLocal: this.$store.state.config.loopVideo,
|
||||||
|
@ -47,6 +48,9 @@ const settings = {
|
||||||
hideAttachmentsInConvLocal (value) {
|
hideAttachmentsInConvLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'hideAttachmentsInConv', value })
|
this.$store.dispatch('setOption', { name: 'hideAttachmentsInConv', value })
|
||||||
},
|
},
|
||||||
|
hideUserStatsLocal (value) {
|
||||||
|
this.$store.dispatch('setOption', { name: 'hideUserStats', value })
|
||||||
|
},
|
||||||
hideNsfwLocal (value) {
|
hideNsfwLocal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
this.$store.dispatch('setOption', { name: 'hideNsfw', value })
|
||||||
},
|
},
|
||||||
|
|
|
@ -122,6 +122,10 @@
|
||||||
<i class="icon-down-open"/>
|
<i class="icon-down-open"/>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div>
|
||||||
|
<input type="checkbox" id="hideUserStats" v-model="hideUserStatsLocal">
|
||||||
|
<label for="hideUserStats">{{$t('settings.hide_user_stats')}}</label>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setting-item">
|
<div class="setting-item">
|
||||||
<p>{{$t('settings.filtering_explanation')}}</p>
|
<p>{{$t('settings.filtering_explanation')}}</p>
|
||||||
|
|
|
@ -3,6 +3,11 @@ import { hex2rgb } from '../../services/color_convert/color_convert.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: [ 'user', 'switcher', 'selected', 'hideBio' ],
|
props: [ 'user', 'switcher', 'selected', 'hideBio' ],
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
hideUserStatsLocal: this.$store.state.config.hideUserStats
|
||||||
|
}
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
headingStyle () {
|
headingStyle () {
|
||||||
const color = this.$store.state.config.colors.bg
|
const color = this.$store.state.config.colors.bg
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
<div :title="user.name" class='user-name' v-else>{{user.name}}</div>
|
<div :title="user.name" class='user-name' v-else>{{user.name}}</div>
|
||||||
<router-link class='user-screen-name':to="{ name: 'user-profile', params: { id: user.id } }">
|
<router-link class='user-screen-name':to="{ name: 'user-profile', params: { id: user.id } }">
|
||||||
<span>@{{user.screen_name}}</span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
|
<span>@{{user.screen_name}}</span><span v-if="user.locked"><i class="icon icon-lock"></i></span>
|
||||||
<span class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span>
|
<span v-if="!hideUserStatsLocal" class="dailyAvg">{{dailyAvg}} {{ $t('user_card.per_day') }}</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -90,19 +90,19 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body profile-panel-body">
|
<div v-if="!hideUserStatsLocal || switcher" class="panel-body profile-panel-body">
|
||||||
<div class="user-counts" :class="{clickable: switcher}">
|
<div class="user-counts" :class="{clickable: switcher}">
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('statuses')" :class="{selected: selected === 'statuses'}">
|
<div class="user-count" v-on:click.prevent="setProfileView('statuses')" :class="{selected: selected === 'statuses'}">
|
||||||
<h5>{{ $t('user_card.statuses') }}</h5>
|
<h5>{{ $t('user_card.statuses') }}</h5>
|
||||||
<span>{{user.statuses_count}} <br></span>
|
<span v-if="!hideUserStatsLocal">{{user.statuses_count}} <br></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('friends')" :class="{selected: selected === 'friends'}">
|
<div class="user-count" v-on:click.prevent="setProfileView('friends')" :class="{selected: selected === 'friends'}">
|
||||||
<h5>{{ $t('user_card.followees') }}</h5>
|
<h5>{{ $t('user_card.followees') }}</h5>
|
||||||
<span>{{user.friends_count}}</span>
|
<span v-if="!hideUserStatsLocal">{{user.friends_count}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="user-count" v-on:click.prevent="setProfileView('followers')" :class="{selected: selected === 'followers'}">
|
<div class="user-count" v-on:click.prevent="setProfileView('followers')" :class="{selected: selected === 'followers'}">
|
||||||
<h5>{{ $t('user_card.followers') }}</h5>
|
<h5>{{ $t('user_card.followers') }}</h5>
|
||||||
<span>{{user.followers_count}}</span>
|
<span v-if="!hideUserStatsLocal">{{user.followers_count}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p v-if="!hideBio && user.description_html" class="profile-bio" v-html="user.description_html"></p>
|
<p v-if="!hideBio && user.description_html" class="profile-bio" v-html="user.description_html"></p>
|
||||||
|
|
|
@ -328,6 +328,7 @@ const en = {
|
||||||
loop_video_silent_only: 'Loop only videos without sound (i.e. Mastodon\'s "gifs")',
|
loop_video_silent_only: 'Loop only videos without sound (i.e. Mastodon\'s "gifs")',
|
||||||
reply_link_preview: 'Enable reply-link preview on mouse hover',
|
reply_link_preview: 'Enable reply-link preview on mouse hover',
|
||||||
replies_in_timeline: 'Replies in timeline',
|
replies_in_timeline: 'Replies in timeline',
|
||||||
|
hide_user_stats: 'Hide user statistics (e.g. status and follower counts)',
|
||||||
reply_visibility_all: 'Show all replies',
|
reply_visibility_all: 'Show all replies',
|
||||||
reply_visibility_following: 'Only show replies directed at me or users I\'m following',
|
reply_visibility_following: 'Only show replies directed at me or users I\'m following',
|
||||||
reply_visibility_self: 'Only show replies directed at me',
|
reply_visibility_self: 'Only show replies directed at me',
|
||||||
|
|
|
@ -48,6 +48,7 @@ const persistedStateOptions = {
|
||||||
'config.collapseMessageWithSubject',
|
'config.collapseMessageWithSubject',
|
||||||
'config.hideAttachments',
|
'config.hideAttachments',
|
||||||
'config.hideAttachmentsInConv',
|
'config.hideAttachmentsInConv',
|
||||||
|
'config.hideUserStats',
|
||||||
'config.hideNsfw',
|
'config.hideNsfw',
|
||||||
'config.replyVisibility',
|
'config.replyVisibility',
|
||||||
'config.notificationVisibility',
|
'config.notificationVisibility',
|
||||||
|
|
|
@ -9,6 +9,7 @@ const defaultState = {
|
||||||
collapseMessageWithSubject: false,
|
collapseMessageWithSubject: false,
|
||||||
hideAttachments: false,
|
hideAttachments: false,
|
||||||
hideAttachmentsInConv: false,
|
hideAttachmentsInConv: false,
|
||||||
|
hideUserStats: false,
|
||||||
hideNsfw: true,
|
hideNsfw: true,
|
||||||
loopVideo: true,
|
loopVideo: true,
|
||||||
loopVideoSilentOnly: true,
|
loopVideoSilentOnly: true,
|
||||||
|
|
Loading…
Reference in New Issue