ui: move hover card

zio/stable
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,6 +8,7 @@ const { link = true } = defineProps<{
</script> </script>
<template> <template>
<AccountHoverWrapper :account="account">
<NuxtLink <NuxtLink
:to="link ? getAccountPath(account) : undefined" :to="link ? getAccountPath(account) : undefined"
:class="link ? 'text-link-rounded' : ''" :class="link ? 'text-link-rounded' : ''"
@ -16,4 +17,5 @@ const { link = true } = defineProps<{
<AccountAvatar :account="account" w-5 h-5 /> <AccountAvatar :account="account" w-5 h-5 />
<ContentRich :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" /> <ContentRich :content="getDisplayName(account, { rich: true })" :emojis="account.emojis" />
</NuxtLink> </NuxtLink>
</AccountHoverWrapper>
</template> </template>

View File

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

View File

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