show N/A when count is hidden
This commit is contained in:
parent
3dae1cf396
commit
949f47063b
2 changed files with 8 additions and 2 deletions
|
@ -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: {
|
||||
|
|
|
@ -208,14 +208,14 @@
|
|||
@click.prevent="setProfileView('friends')"
|
||||
>
|
||||
<h5>{{ $t('user_card.followees') }}</h5>
|
||||
<span>{{ user.friends_count }}</span>
|
||||
<span>{{ hideFollowsCount ? 'N/A' : 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 ? 'N/A' : user.followers_count }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- eslint-disable vue/no-v-html -->
|
||||
|
|
Loading…
Reference in a new issue