chore: account link

This commit is contained in:
Anthony Fu 2022-11-21 18:16:04 +08:00
parent 2267ca6122
commit 89845517e3
2 changed files with 6 additions and 5 deletions

View file

@ -1,19 +1,20 @@
<script setup lang="ts">
import type { Account } from 'masto'
defineProps<{
const { link = true } = defineProps<{
account: Account
link?: boolean
}>()
</script>
<template>
<div flex gap-2>
<div p1>
<NuxtLink :to="`/@${account.acct}`">
<NuxtLink :to="link ? `/@${account.acct}` : null">
<img :src="account.avatar" rounded w-10 h-10 bg-gray:10>
</NuxtLink>
</div>
<NuxtLink flex flex-col :to="`/@${account.acct}`">
<NuxtLink flex flex-col :to="link ? `/@${account.acct}` : null">
<CommonRichContent font-bold :content="account.displayName" />
<p op35 text-sm>
@{{ account.acct }}

View file

@ -7,8 +7,8 @@ defineProps<{
</script>
<template>
<a :href="`/@${account.acct}`" flex gap-2 font-bold items-center>
<NuxtLink :href="`/@${account.acct}`" flex gap-2 font-bold items-center>
<img :src="account.avatar" class="w-5 h-5 rounded">
<CommonRichContent :content="account.displayName" />
</a>
</NuxtLink>
</template>