feat: resolve status paths with router (#258)
This commit is contained in:
parent
24bbe9135b
commit
4ed1816806
22 changed files with 106 additions and 50 deletions
|
@ -14,7 +14,7 @@ cacheAccount(account)
|
|||
<AccountInfo
|
||||
:account="account" hover p1 as="router-link"
|
||||
:hover-card="hoverCard"
|
||||
:to="getAccountPath(account)"
|
||||
:to="getAccountRoute(account)"
|
||||
/>
|
||||
<div h-full p1>
|
||||
<AccountFollowButton :account="account" />
|
||||
|
|
|
@ -9,7 +9,7 @@ defineProps<{
|
|||
<template>
|
||||
<div flex="~ col gap2" rounded min-w-90 max-w-120 z-100 overflow-hidden p-4>
|
||||
<div flex="~ gap2" items-center>
|
||||
<NuxtLink :to="getAccountPath(account)" flex-auto rounded-full hover:bg-active transition-100 pr5 mr-a>
|
||||
<NuxtLink :to="getAccountRoute(account)" flex-auto rounded-full hover:bg-active transition-100 pr5 mr-a>
|
||||
<AccountInfo :account="account" />
|
||||
</NuxtLink>
|
||||
<AccountFollowButton text-sm :account="account" />
|
||||
|
|
|
@ -10,7 +10,7 @@ const { link = true } = defineProps<{
|
|||
<template>
|
||||
<AccountHoverWrapper :account="account">
|
||||
<NuxtLink
|
||||
:to="link ? getAccountPath(account) : undefined"
|
||||
:to="link ? getAccountRoute(account) : undefined"
|
||||
:class="link ? 'text-link-rounded ml-0 pl-0' : ''"
|
||||
min-w-0 flex gap-1 items-center
|
||||
>
|
||||
|
|
|
@ -8,21 +8,21 @@ defineProps<{
|
|||
|
||||
<template>
|
||||
<div flex gap-5>
|
||||
<NuxtLink :to="getAccountPath(account)" text-secondary exact-active-class="text-primary">
|
||||
<NuxtLink :to="getAccountRoute(account)" text-secondary exact-active-class="text-primary">
|
||||
<template #default="{ isExactActive }">
|
||||
<i18n-t keypath="account.posts_count">
|
||||
<span font-bold :class="isExactActive ? 'text-primary' : 'text-base'">{{ formattedNumber(account.statusesCount) }}</span>
|
||||
</i18n-t>
|
||||
</template>
|
||||
</NuxtLink>
|
||||
<NuxtLink :to="`${getAccountPath(account)}/following`" text-secondary exact-active-class="text-primary">
|
||||
<NuxtLink :to="getAccountFollowingRoute(account)" text-secondary exact-active-class="text-primary">
|
||||
<template #default="{ isExactActive }">
|
||||
<i18n-t keypath="account.following_count">
|
||||
<span font-bold :class="isExactActive ? 'text-primary' : 'text-base'">{{ humanReadableNumber(account.followingCount) }}</span>
|
||||
</i18n-t>
|
||||
</template>
|
||||
</NuxtLink>
|
||||
<NuxtLink :to="`${getAccountPath(account)}/followers`" text-secondary exact-active-class="text-primary">
|
||||
<NuxtLink :to="getAccountFollowersRoute(account)" text-secondary exact-active-class="text-primary">
|
||||
<template #default="{ isExactActive }">
|
||||
<i18n-t keypath="account.followers_count">
|
||||
<span font-bold :class="isExactActive ? 'text-primary' : 'text-base'">{{ humanReadableNumber(account.followersCount) }}</span>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue