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'
return validRole && roleTitle
},
hideFollowsCount () {
return this.isOtherUser && this.user.hide_follows_count
},
hideFollowersCount () {
return this.isOtherUser && this.user.hide_followers_count
},
...mapGetters(['mergedConfig'])
},
components: {

View File

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

View File

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