feat: basic mutli-accounts support
This commit is contained in:
parent
24c573ccf0
commit
241b28241c
15 changed files with 170 additions and 34 deletions
|
@ -1,10 +1,13 @@
|
|||
<script setup lang="ts">
|
||||
import type { Account } from 'masto'
|
||||
|
||||
const { link = true } = defineProps<{
|
||||
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>
|
||||
|
@ -17,7 +20,7 @@ const { link = true } = defineProps<{
|
|||
<NuxtLink flex flex-col :to="link ? `/@${account.acct}` : null">
|
||||
<CommonRichContent font-bold :content="getDisplayName(account)" :emojis="account.emojis" />
|
||||
<p op35 text-sm>
|
||||
@{{ account.acct }}
|
||||
{{ id }}
|
||||
</p>
|
||||
<slot name="bottom" />
|
||||
</NuxtLink>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue