1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-28 06:48:14 +09:00
elk/components/account/AccountInfo.vue
2022-11-26 01:16:50 +08:00

31 lines
838 B
Vue

<script setup lang="ts">
import type { Account } from 'masto'
const { account, link = true, fullServer = false } = defineProps<{
account: Account
link?: boolean
fullServer?: boolean
hover?: boolean
}>()
const accountHandle = $(useAccountHandle(account, fullServer))
</script>
<template>
<div flex gap-3 cursor-default>
<div flex-shrink-0>
<NuxtLink :to="link ? getAccountPath(account) : null">
<AccountAvatar :account="account" :hover="hover" w-12 h-12 />
</NuxtLink>
</div>
<NuxtLink flex flex-col :to="link ? getAccountPath(account) : null">
<ContentRich font-bold hover:underline :content="getDisplayName(account)" :emojis="account.emojis" />
<p op35 text-sm>
{{ accountHandle }}
</p>
<slot name="bottom" />
</NuxtLink>
<slot />
</div>
</template>