2022-11-28 12:51:15 +03:00
|
|
|
<script setup lang="ts">
|
2023-01-08 09:21:09 +03:00
|
|
|
import type { mastodon } from 'masto'
|
2022-11-28 12:51:15 +03:00
|
|
|
|
2023-01-09 14:24:26 +03:00
|
|
|
defineProps<{
|
2023-01-08 09:21:09 +03:00
|
|
|
account: mastodon.v1.Account
|
2023-04-16 22:47:20 +03:00
|
|
|
isHoverCard?: boolean
|
2022-11-28 12:51:15 +03:00
|
|
|
}>()
|
2023-01-12 20:52:52 +03:00
|
|
|
|
|
|
|
const userSettings = useUserSettings()
|
2022-11-28 12:51:15 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div flex gap-5>
|
2022-12-14 18:56:48 +03:00
|
|
|
<NuxtLink
|
|
|
|
:to="getAccountRoute(account)"
|
2023-01-09 11:48:39 +03:00
|
|
|
replace
|
2022-12-14 18:56:48 +03:00
|
|
|
text-secondary
|
|
|
|
exact-active-class="text-primary"
|
|
|
|
>
|
2022-11-28 13:14:58 +03:00
|
|
|
<template #default="{ isExactActive }">
|
2023-01-09 14:24:26 +03:00
|
|
|
<CommonLocalizedNumber
|
|
|
|
keypath="account.posts_count"
|
|
|
|
:count="account.statusesCount"
|
|
|
|
font-bold
|
|
|
|
:class="isExactActive ? 'text-primary' : 'text-base'"
|
|
|
|
/>
|
2022-11-28 13:14:58 +03:00
|
|
|
</template>
|
2022-11-28 12:51:15 +03:00
|
|
|
</NuxtLink>
|
2022-12-14 18:56:48 +03:00
|
|
|
<NuxtLink
|
2023-04-16 22:47:20 +03:00
|
|
|
v-if="!(isHoverCard && getPreferences(userSettings, 'hideFollowerCount'))"
|
2022-12-14 18:56:48 +03:00
|
|
|
:to="getAccountFollowingRoute(account)"
|
2023-01-09 11:48:39 +03:00
|
|
|
replace
|
2022-12-14 18:56:48 +03:00
|
|
|
text-secondary exact-active-class="text-primary"
|
|
|
|
>
|
2022-11-28 13:14:58 +03:00
|
|
|
<template #default="{ isExactActive }">
|
2023-05-31 18:59:54 +03:00
|
|
|
<template
|
2023-04-16 22:47:20 +03:00
|
|
|
v-if="!getPreferences(userSettings, 'hideFollowerCount')"
|
2023-05-31 18:59:54 +03:00
|
|
|
>
|
|
|
|
<CommonLocalizedNumber
|
|
|
|
v-if="account.followingCount >= 0"
|
|
|
|
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>
|
2023-04-16 22:47:20 +03:00
|
|
|
<span v-else>{{ $t('account.following') }}</span>
|
2022-11-28 13:14:58 +03:00
|
|
|
</template>
|
2022-11-28 12:51:15 +03:00
|
|
|
</NuxtLink>
|
2022-12-14 18:56:48 +03:00
|
|
|
<NuxtLink
|
2023-04-16 22:47:20 +03:00
|
|
|
v-if="!(isHoverCard && getPreferences(userSettings, 'hideFollowerCount'))"
|
2022-12-14 18:56:48 +03:00
|
|
|
:to="getAccountFollowersRoute(account)"
|
2023-01-10 17:45:17 +03:00
|
|
|
replace text-secondary
|
|
|
|
exact-active-class="text-primary"
|
2022-12-14 18:56:48 +03:00
|
|
|
>
|
2022-11-28 13:14:58 +03:00
|
|
|
<template #default="{ isExactActive }">
|
2023-05-31 18:59:54 +03:00
|
|
|
<template v-if="!getPreferences(userSettings, 'hideFollowerCount')">
|
|
|
|
<CommonLocalizedNumber
|
|
|
|
v-if="account.followersCount >= 0"
|
|
|
|
keypath="account.followers_count"
|
|
|
|
:count="account.followersCount"
|
|
|
|
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>
|
2023-04-16 22:47:20 +03:00
|
|
|
<span v-else>{{ $t('account.followers') }}</span>
|
2022-11-28 13:14:58 +03:00
|
|
|
</template>
|
2022-11-28 12:51:15 +03:00
|
|
|
</NuxtLink>
|
|
|
|
</div>
|
|
|
|
</template>
|