forked from Mirrors/elk
fix: use full account handle, clean up
This commit is contained in:
parent
bced99e14b
commit
d4300d8d83
5 changed files with 5 additions and 12 deletions
|
@ -10,15 +10,15 @@ defineProps<{
|
|||
<div bg-base border="~ base" rounded w-80 z-900 overflow-hidden p-4 class="account-hover-card">
|
||||
<AccountInfo :account="account" />
|
||||
<div text-sm flex flex-row text-gray mt-4>
|
||||
<NuxtLink :to="`/${getShortHandle(account)}/`">
|
||||
<NuxtLink :to="`/${getFullHandle(account)}/`">
|
||||
{{ formattedNumber(account.statusesCount) }} Posts
|
||||
</NuxtLink>
|
||||
<span flex-1 text-center> • </span>
|
||||
<NuxtLink :to="`/${getShortHandle(account)}/following`">
|
||||
<NuxtLink :to="`/${getFullHandle(account)}/following`">
|
||||
{{ humanReadableNumber(account.followingCount) }} Following
|
||||
</NuxtLink>
|
||||
<span flex-1 text-center> • </span>
|
||||
<NuxtLink :to="`/${getShortHandle(account)}/followers`">
|
||||
<NuxtLink :to="`/${getFullHandle(account)}/followers`">
|
||||
{{ humanReadableNumber(account.followersCount) }} Followers
|
||||
</NuxtLink>
|
||||
</div>
|
||||
|
|
|
@ -7,8 +7,6 @@ const { account, link = true, fullServer = false } = defineProps<{
|
|||
fullServer?: boolean
|
||||
hover?: boolean
|
||||
}>()
|
||||
|
||||
const accountHandle = $(useAccountHandle(account, fullServer))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
|
@ -5,8 +5,6 @@ const { account, link = true } = defineProps<{
|
|||
account: Account
|
||||
link?: boolean
|
||||
}>()
|
||||
|
||||
const accountHandle = $(useAccountHandle(account))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -15,8 +13,6 @@ const accountHandle = $(useAccountHandle(account))
|
|||
flex="~ col" min-w-0 md:flex="~ row gap-2" md:items-center
|
||||
>
|
||||
<ContentRich font-bold break-words hover:underline :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
|
||||
<p op35 text-sm>
|
||||
{{ accountHandle }}
|
||||
</p>
|
||||
<AccountHandle :account="account" op50 />
|
||||
</NuxtLink>
|
||||
</template>
|
||||
|
|
|
@ -41,7 +41,7 @@ const sorted = computed(() => {
|
|||
@click="signout"
|
||||
>
|
||||
<div i-ri:logout-box-line />
|
||||
Sign out {{ getShortHandle(currentUser.account) }}
|
||||
Sign out {{ getFullHandle(currentUser.account) }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -48,7 +48,6 @@ export function getDisplayName(account?: Account, options?: { rich?: boolean })
|
|||
}
|
||||
|
||||
export function getShortHandle({ acct }: Account) {
|
||||
|
||||
return `@${acct.includes('@') ? acct.split('@')[0] : acct}`
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue