elk/components/account/AccountInfo.vue

27 lines
784 B
Vue
Raw Normal View History

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