elk/components/account/AccountInfo.vue

31 lines
838 B
Vue
Raw Normal View History

2022-11-13 08:34:43 +03:00
<script setup lang="ts">
2022-11-14 05:20:07 +03:00
import type { Account } from 'masto'
2022-11-13 08:34:43 +03:00
2022-11-23 06:48:01 +03:00
const { account, link = true, fullServer = false } = defineProps<{
2022-11-13 08:34:43 +03:00
account: Account
2022-11-21 13:16:04 +03:00
link?: boolean
2022-11-23 06:48:01 +03:00
fullServer?: boolean
2022-11-25 13:54:49 +03:00
hover?: boolean
2022-11-13 08:34:43 +03:00
}>()
2022-11-23 06:48:01 +03:00
2022-11-24 17:20:50 +03:00
const accountHandle = $(useAccountHandle(account, fullServer))
2022-11-13 08:34:43 +03:00
</script>
<template>
2022-11-25 17:39:15 +03:00
<div flex gap-3 cursor-default>
2022-11-25 20:16:50 +03:00
<div flex-shrink-0>
<NuxtLink :to="link ? getAccountPath(account) : null">
2022-11-25 13:54:49 +03:00
<AccountAvatar :account="account" :hover="hover" w-12 h-12 />
2022-11-14 05:20:07 +03:00
</NuxtLink>
2022-11-13 08:34:43 +03:00
</div>
<NuxtLink flex flex-col :to="link ? getAccountPath(account) : null">
<ContentRich font-bold hover:underline :content="getDisplayName(account)" :emojis="account.emojis" />
2022-11-21 09:55:31 +03:00
<p op35 text-sm>
2022-11-24 17:20:50 +03:00
{{ accountHandle }}
2022-11-13 08:34:43 +03:00
</p>
2022-11-23 03:00:52 +03:00
<slot name="bottom" />
2022-11-14 05:20:07 +03:00
</NuxtLink>
2022-11-14 05:56:48 +03:00
<slot />
2022-11-13 08:34:43 +03:00
</div>
</template>