2024-12-04 12:47:17 +01:00
|
|
|
<template>
|
|
|
|
|
<div class="relative">
|
|
|
|
|
<div class="bg-muted rounded overflow-hidden h-32 w-full">
|
2025-03-28 01:16:24 +01:00
|
|
|
<img
|
|
|
|
|
:src="account.header"
|
|
|
|
|
alt=""
|
|
|
|
|
class="object-cover w-full h-full"
|
|
|
|
|
/>
|
2024-12-04 12:47:17 +01:00
|
|
|
<!-- Shadow overlay at the bottom -->
|
2025-03-28 01:16:24 +01:00
|
|
|
<div
|
|
|
|
|
class="absolute bottom-0 w-full h-1/3 bg-gradient-to-b from-black/0 to-black/40"
|
|
|
|
|
></div>
|
2024-12-04 12:47:17 +01:00
|
|
|
</div>
|
2025-03-28 01:16:24 +01:00
|
|
|
<div
|
|
|
|
|
class="absolute bottom-0 left-1/2 translate-y-1/3 -translate-x-1/2 flex flex-row items-start gap-2"
|
|
|
|
|
>
|
|
|
|
|
<Avatar
|
|
|
|
|
size="base"
|
|
|
|
|
class="border"
|
|
|
|
|
:src="account.avatar"
|
|
|
|
|
:name="account.display_name"
|
|
|
|
|
/>
|
2024-12-04 12:47:17 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex flex-col justify-center items-center mt-8">
|
|
|
|
|
<span class="font-semibold" v-render-emojis="account.emojis">
|
|
|
|
|
{{ account.display_name }}
|
|
|
|
|
</span>
|
|
|
|
|
<CopyableText :text="account.acct" class="text-sm">
|
|
|
|
|
<span
|
2025-03-28 01:16:24 +01:00
|
|
|
class="font-semibold bg-gradient-to-tr from-pink-700 dark:from-indigo-400 via-purple-700 dark:via-purple-400 to-indigo-700 dark:to-indigo-400 text-transparent bg-clip-text"
|
|
|
|
|
>
|
2024-12-04 12:47:17 +01:00
|
|
|
@{{ username }}
|
|
|
|
|
</span>
|
2025-03-28 01:16:24 +01:00
|
|
|
<span class="text-muted-foreground"
|
|
|
|
|
>{{ instance && "@" }}{{ instance }}</span
|
|
|
|
|
>
|
2024-12-04 12:47:17 +01:00
|
|
|
</CopyableText>
|
|
|
|
|
</div>
|
2025-03-28 01:16:24 +01:00
|
|
|
<ProfileContent
|
|
|
|
|
:content="account.note"
|
|
|
|
|
:emojis="account.emojis"
|
|
|
|
|
class="mt-4 max-h-72 overflow-y-auto"
|
|
|
|
|
/>
|
2024-12-04 12:47:17 +01:00
|
|
|
<Separator v-if="account.fields.length > 0" class="mt-4" />
|
2025-03-28 01:16:24 +01:00
|
|
|
<ProfileFields
|
|
|
|
|
v-if="account.fields.length > 0"
|
|
|
|
|
:fields="account.fields"
|
|
|
|
|
:emojis="account.emojis"
|
|
|
|
|
class="mt-4 max-h-48 overflow-y-auto"
|
|
|
|
|
/>
|
2024-12-04 12:47:17 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
2025-05-26 11:19:15 +02:00
|
|
|
import type { Account } from "@versia/client/schemas";
|
|
|
|
|
import type { z } from "zod";
|
2025-03-28 01:16:24 +01:00
|
|
|
import { Separator } from "~/components/ui/separator";
|
2024-12-04 12:47:17 +01:00
|
|
|
import CopyableText from "../notes/copyable-text.vue";
|
|
|
|
|
import Avatar from "./avatar.vue";
|
|
|
|
|
import ProfileContent from "./profile-content.vue";
|
|
|
|
|
import ProfileFields from "./profile-fields.vue";
|
|
|
|
|
|
|
|
|
|
const { account } = defineProps<{
|
2025-05-26 11:19:15 +02:00
|
|
|
account: z.infer<typeof Account>;
|
2024-12-04 12:47:17 +01:00
|
|
|
}>();
|
|
|
|
|
|
|
|
|
|
const [username, instance] = account.acct.split("@");
|
2025-03-28 01:16:24 +01:00
|
|
|
</script>
|