mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-02 23:19:57 +00:00
22 lines
525 B
Vue
22 lines
525 B
Vue
<script setup lang="ts">
|
|
import type { Account } from 'masto'
|
|
|
|
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 && account" placement="bottom-start" :delay="{ show: 500, hide: 100 }">
|
|
<slot />
|
|
<template #popper>
|
|
<AccountHoverCard v-if="account" :account="account" />
|
|
</template>
|
|
</VMenu>
|
|
<slot v-else />
|
|
</template>
|