fix: use full account handle, clean up

pull/137/head
patak 2022-11-26 17:42:53 +01:00
rodzic bced99e14b
commit d4300d8d83
5 zmienionych plików z 5 dodań i 12 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -7,8 +7,6 @@ const { account, link = true, fullServer = false } = defineProps<{
fullServer?: boolean
hover?: boolean
}>()
const accountHandle = $(useAccountHandle(account, fullServer))
</script>
<template>

Wyświetl plik

@ -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>

Wyświetl plik

@ -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>

Wyświetl plik

@ -48,7 +48,6 @@ export function getDisplayName(account?: Account, options?: { rich?: boolean })
}
export function getShortHandle({ acct }: Account) {
return `@${acct.includes('@') ? acct.split('@')[0] : acct}`
}