2022-11-27 03:13:18 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
import type { Account } from 'masto'
|
|
|
|
|
2022-11-30 08:08:10 +01:00
|
|
|
const props = defineProps<{
|
|
|
|
account?: Account
|
|
|
|
handle?: string
|
2022-11-28 18:24:39 +01:00
|
|
|
disabled?: boolean
|
2022-11-27 03:13:18 +01:00
|
|
|
}>()
|
2022-11-30 08:08:10 +01:00
|
|
|
|
|
|
|
const account = props.account || (props.handle ? useAccountByHandle(props.handle!) : undefined)
|
2022-11-30 10:49:07 +01:00
|
|
|
defineOptions({
|
|
|
|
inheritAttrs: false,
|
|
|
|
})
|
2022-11-27 03:13:18 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-11-30 10:49:07 +01:00
|
|
|
<VMenu v-if="!disabled && account" placement="bottom-start" :delay="{ show: 500, hide: 100 }" v-bind="$attrs">
|
2022-11-27 03:13:18 +01:00
|
|
|
<slot />
|
|
|
|
<template #popper>
|
2022-11-30 08:08:10 +01:00
|
|
|
<AccountHoverCard v-if="account" :account="account" />
|
2022-11-27 03:13:18 +01:00
|
|
|
</template>
|
|
|
|
</VMenu>
|
2022-11-28 18:24:39 +01:00
|
|
|
<slot v-else />
|
2022-11-27 03:13:18 +01:00
|
|
|
</template>
|