feat: hover card for content @
This commit is contained in:
parent
66393cd838
commit
2becb254b4
8 changed files with 61 additions and 27 deletions
|
@ -1,17 +1,20 @@
|
|||
<script setup lang="ts">
|
||||
import type { Account } from 'masto'
|
||||
|
||||
defineProps<{
|
||||
account: Account
|
||||
const props = defineProps<{
|
||||
account?: Account
|
||||
handle?: string
|
||||
disabled?: boolean
|
||||
}>()
|
||||
|
||||
const account = props.account || (props.handle ? useAccountByHandle(props.handle!) : undefined)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VMenu v-if="!disabled" placement="bottom-start" :delay="{ show: 500, hide: 100 }">
|
||||
<VMenu v-if="!disabled && account" placement="bottom-start" :delay="{ show: 500, hide: 100 }">
|
||||
<slot />
|
||||
<template #popper>
|
||||
<AccountHoverCard :account="account" />
|
||||
<AccountHoverCard v-if="account" :account="account" />
|
||||
</template>
|
||||
</VMenu>
|
||||
<slot v-else />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue