mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-22 01:15:25 +03:00
fix: handle hidden followers/following count (#2120)
This commit is contained in:
parent
2b1a5072d7
commit
5ad32c9e26
1 changed files with 27 additions and 13 deletions
|
@ -33,13 +33,21 @@ const userSettings = useUserSettings()
|
||||||
text-secondary exact-active-class="text-primary"
|
text-secondary exact-active-class="text-primary"
|
||||||
>
|
>
|
||||||
<template #default="{ isExactActive }">
|
<template #default="{ isExactActive }">
|
||||||
<CommonLocalizedNumber
|
<template
|
||||||
v-if="!getPreferences(userSettings, 'hideFollowerCount')"
|
v-if="!getPreferences(userSettings, 'hideFollowerCount')"
|
||||||
keypath="account.following_count"
|
>
|
||||||
:count="account.followingCount"
|
<CommonLocalizedNumber
|
||||||
font-bold
|
v-if="account.followingCount >= 0"
|
||||||
:class="isExactActive ? 'text-primary' : 'text-base'"
|
keypath="account.following_count"
|
||||||
/>
|
:count="account.followingCount"
|
||||||
|
font-bold
|
||||||
|
:class="isExactActive ? 'text-primary' : 'text-base'"
|
||||||
|
/>
|
||||||
|
<div v-else flex gap-x-1>
|
||||||
|
<span font-bold text-base>Hidden</span>
|
||||||
|
<span>{{ $t('account.following') }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<span v-else>{{ $t('account.following') }}</span>
|
<span v-else>{{ $t('account.following') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
@ -50,13 +58,19 @@ const userSettings = useUserSettings()
|
||||||
exact-active-class="text-primary"
|
exact-active-class="text-primary"
|
||||||
>
|
>
|
||||||
<template #default="{ isExactActive }">
|
<template #default="{ isExactActive }">
|
||||||
<CommonLocalizedNumber
|
<template v-if="!getPreferences(userSettings, 'hideFollowerCount')">
|
||||||
v-if="!getPreferences(userSettings, 'hideFollowerCount')"
|
<CommonLocalizedNumber
|
||||||
keypath="account.followers_count"
|
v-if="account.followersCount >= 0"
|
||||||
:count="account.followersCount"
|
keypath="account.followers_count"
|
||||||
font-bold
|
:count="account.followersCount"
|
||||||
:class="isExactActive ? 'text-primary' : 'text-base'"
|
font-bold
|
||||||
/>
|
:class="isExactActive ? 'text-primary' : 'text-base'"
|
||||||
|
/>
|
||||||
|
<div v-else flex gap-x-1>
|
||||||
|
<span font-bold text-base>Hidden</span>
|
||||||
|
<span>{{ $t('account.followers') }}</span>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<span v-else>{{ $t('account.followers') }}</span>
|
<span v-else>{{ $t('account.followers') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
|
|
Loading…
Reference in a new issue