ui: move hover card

This commit is contained in:
Anthony Fu 2022-11-27 12:30:21 +08:00
parent bcc968fbd8
commit 4d3d05ae5c
3 changed files with 26 additions and 22 deletions

View file

@ -8,12 +8,14 @@ const { link = true } = defineProps<{
</script>
<template>
<NuxtLink
:to="link ? getAccountPath(account) : undefined"
:class="link ? 'text-link-rounded' : ''"
min-w-0 flex gap-1 items-center
>
<AccountAvatar :account="account" w-5 h-5 />
<ContentRich :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
</NuxtLink>
<AccountHoverWrapper :account="account">
<NuxtLink
:to="link ? getAccountPath(account) : undefined"
:class="link ? 'text-link-rounded' : ''"
min-w-0 flex gap-1 items-center
>
<AccountAvatar :account="account" w-5 h-5 />
<ContentRich :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
</NuxtLink>
</AccountHoverWrapper>
</template>

View file

@ -8,14 +8,12 @@ const { account, link = true } = defineProps<{
</script>
<template>
<AccountHoverWrapper :account="account">
<NuxtLink
:to="link ? getAccountPath(account) : undefined"
flex="~ col" min-w-0 md:flex="~ row gap-2" md:items-center
text-link-rounded
>
<ContentRich font-bold break-words :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
<AccountHandle :account="account" />
</NuxtLink>
</AccountHoverWrapper>
<NuxtLink
:to="link ? getAccountPath(account) : undefined"
flex="~ col" min-w-0 md:flex="~ row gap-2" md:items-center
text-link-rounded
>
<ContentRich font-bold break-words :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
<AccountHandle :account="account" />
</NuxtLink>
</template>

View file

@ -48,13 +48,17 @@ const timeago = useTimeAgo(() => status.createdAt, timeAgoOptions)
</div>
<div flex gap-4>
<div>
<NuxtLink :to="getAccountPath(status.account)" rounded-full>
<AccountAvatar w-12 h-12 :account="status.account" />
</NuxtLink>
<AccountHoverWrapper :account="status.account">
<NuxtLink :to="getAccountPath(status.account)" rounded-full>
<AccountAvatar w-12 h-12 :account="status.account" />
</NuxtLink>
</AccountHoverWrapper>
</div>
<div flex="~ col 1" min-w-0>
<div flex>
<StatusAccountDetails :account="status.account" />
<AccountHoverWrapper :account="status.account">
<StatusAccountDetails :account="status.account" />
</AccountHoverWrapper>
<div flex-auto />
<div text-sm text-secondary flex="~ row nowrap" hover:underline>
<CommonTooltip :content="createdAt">