2024-09-07 10:38:18 +03:00
|
|
|
<script setup lang="ts">
|
2023-01-08 09:21:09 +03:00
|
|
|
import type { mastodon } from 'masto'
|
|
|
|
|
2023-07-02 19:26:23 +03:00
|
|
|
defineOptions({
|
|
|
|
inheritAttrs: false,
|
|
|
|
})
|
|
|
|
|
2024-02-21 18:20:08 +03:00
|
|
|
const { account, as = 'div' } = defineProps<{
|
2023-01-08 09:21:09 +03:00
|
|
|
account: mastodon.v1.Account
|
2022-12-11 13:52:36 +03:00
|
|
|
as?: string
|
|
|
|
}>()
|
|
|
|
|
|
|
|
cacheAccount(account)
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<component :is="as" block focus:outline-none focus-visible:ring="2 primary" v-bind="$attrs">
|
|
|
|
<!-- Banner -->
|
|
|
|
<div px2 pt2>
|
|
|
|
<div rounded of-hidden bg="gray-500/20" aspect="3.19">
|
|
|
|
<img h-full w-full object-cover :src="account.header" :alt="$t('account.profile_description', [account.username])">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div px-4 pb-4 space-y-2>
|
|
|
|
<!-- User info -->
|
|
|
|
<div flex sm:flex-row flex-col flex-gap-2>
|
|
|
|
<div flex items-center justify-between>
|
2023-01-01 17:29:11 +03:00
|
|
|
<div w-17 h-17 rounded-full border-4 border-bg-base z-2 mt--2 ms--1>
|
2022-12-11 13:52:36 +03:00
|
|
|
<AccountAvatar :account="account" />
|
|
|
|
</div>
|
2023-01-09 16:22:19 +03:00
|
|
|
<NuxtLink block sm:hidden href="javascript:;" @click.stop>
|
2022-12-11 13:52:36 +03:00
|
|
|
<AccountFollowButton :account="account" />
|
2023-01-09 16:22:19 +03:00
|
|
|
</NuxtLink>
|
2022-12-11 13:52:36 +03:00
|
|
|
</div>
|
|
|
|
<div sm:mt-2>
|
2023-01-06 22:12:00 +03:00
|
|
|
<AccountDisplayName :account="account" font-bold text-lg line-clamp-1 ws-pre-wrap break-all />
|
2022-12-11 13:52:36 +03:00
|
|
|
<AccountHandle text-sm :account="account" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!-- Note -->
|
2022-12-30 23:54:23 +03:00
|
|
|
<div v-if="account.note" max-h-100 overflow-y-auto>
|
2022-12-11 13:52:36 +03:00
|
|
|
<ContentRich
|
|
|
|
:content="account.note" :emojis="account.emojis"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<!-- Follow info -->
|
|
|
|
<div flex justify-between items-center>
|
|
|
|
<AccountPostsFollowers text-sm :account="account" />
|
2023-01-09 16:22:19 +03:00
|
|
|
<NuxtLink sm:block hidden href="javascript:;" @click.stop>
|
2022-12-11 13:52:36 +03:00
|
|
|
<AccountFollowButton :account="account" />
|
2023-01-09 16:22:19 +03:00
|
|
|
</NuxtLink>
|
2022-12-11 13:52:36 +03:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</component>
|
|
|
|
</template>
|