mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-23 09:55:28 +03:00
29 lines
836 B
Vue
29 lines
836 B
Vue
<script setup lang="ts">
|
|
import type { Account } from 'masto'
|
|
|
|
const { account, link = true, fullServer = false } = defineProps<{
|
|
account: Account
|
|
link?: boolean
|
|
fullServer?: boolean
|
|
}>()
|
|
|
|
const id = computed(() => fullServer && !account.acct.includes('@') ? `@${account.acct}@${account.url.match(UserLinkRE)?.[1]}` : `@${account.acct}`)
|
|
</script>
|
|
|
|
<template>
|
|
<div flex gap-2>
|
|
<div p1>
|
|
<NuxtLink :to="link ? `/@${account.acct}` : null">
|
|
<AccountAvatar :account="account" w-10 h-10 />
|
|
</NuxtLink>
|
|
</div>
|
|
<NuxtLink flex flex-col :to="link ? `/@${account.acct}` : null">
|
|
<CommonRichContent font-bold :content="getDisplayName(account)" :emojis="account.emojis" />
|
|
<p op35 text-sm>
|
|
{{ id }}
|
|
</p>
|
|
<slot name="bottom" />
|
|
</NuxtLink>
|
|
<slot />
|
|
</div>
|
|
</template>
|