Merge branch 'friend-follower-count-display' into 'develop'

Show "Hidden" instead of zero when followers/following counts are hidden

See merge request pleroma/pleroma-fe!993
This commit is contained in:
kaniini 2019-11-13 21:22:35 +00:00
commit 1f42283b8d
3 changed files with 9 additions and 2 deletions

View file

@ -93,6 +93,12 @@ export default {
const roleTitle = rights.admin ? 'admin' : 'moderator' const roleTitle = rights.admin ? 'admin' : 'moderator'
return validRole && roleTitle return validRole && roleTitle
}, },
hideFollowsCount () {
return this.isOtherUser && this.user.hide_follows_count
},
hideFollowersCount () {
return this.isOtherUser && this.user.hide_followers_count
},
...mapGetters(['mergedConfig']) ...mapGetters(['mergedConfig'])
}, },
components: { components: {

View file

@ -208,14 +208,14 @@
@click.prevent="setProfileView('friends')" @click.prevent="setProfileView('friends')"
> >
<h5>{{ $t('user_card.followees') }}</h5> <h5>{{ $t('user_card.followees') }}</h5>
<span>{{ user.friends_count }}</span> <span>{{ hideFollowsCount ? $t('user_card.hidden') : user.friends_count }}</span>
</div> </div>
<div <div
class="user-count" class="user-count"
@click.prevent="setProfileView('followers')" @click.prevent="setProfileView('followers')"
> >
<h5>{{ $t('user_card.followers') }}</h5> <h5>{{ $t('user_card.followers') }}</h5>
<span>{{ user.followers_count }}</span> <span>{{ hideFollowersCount ? $t('user_card.hidden') : user.followers_count }}</span>
</div> </div>
</div> </div>
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->

View file

@ -569,6 +569,7 @@
"followers": "Followers", "followers": "Followers",
"following": "Following!", "following": "Following!",
"follows_you": "Follows you!", "follows_you": "Follows you!",
"hidden": "Hidden",
"its_you": "It's you!", "its_you": "It's you!",
"media": "Media", "media": "Media",
"mention": "Mention", "mention": "Mention",