2024-04-15 03:16:57 +02:00
|
|
|
<template>
|
2024-12-02 17:20:27 +01:00
|
|
|
<div class="mx-auto max-w-2xl w-full space-y-2">
|
|
|
|
|
<div v-if="isLoading" class="p-4 flex items-center justify-center h-48">
|
|
|
|
|
<Loader class="size-8 animate-spin" />
|
2024-06-12 06:41:27 +02:00
|
|
|
</div>
|
2024-12-02 17:20:27 +01:00
|
|
|
<TimelineScroller v-else-if="account">
|
2025-03-28 01:16:24 +01:00
|
|
|
<div class="p-4 pb-0">
|
|
|
|
|
<AccountProfile :account="account" />
|
|
|
|
|
</div>
|
|
|
|
|
<AccountTimeline
|
|
|
|
|
v-if="accountId"
|
|
|
|
|
:id="accountId"
|
|
|
|
|
:key="accountId"
|
|
|
|
|
/>
|
2024-12-02 17:20:27 +01:00
|
|
|
</TimelineScroller>
|
2025-03-28 01:16:24 +01:00
|
|
|
<NotFound v-else />
|
2024-12-02 17:20:27 +01:00
|
|
|
</div>
|
2024-04-15 03:16:57 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-12-02 17:20:27 +01:00
|
|
|
import { Loader } from "lucide-vue-next";
|
2025-03-28 01:16:24 +01:00
|
|
|
import NotFound from "~/components/errors/NotFound.vue";
|
2024-12-02 16:07:52 +01:00
|
|
|
import AccountProfile from "~/components/profiles/profile.vue";
|
2024-06-21 04:09:09 +02:00
|
|
|
import AccountTimeline from "~/components/timelines/account.vue";
|
|
|
|
|
import TimelineScroller from "~/components/timelines/timeline-scroller.vue";
|
2025-07-16 07:48:39 +02:00
|
|
|
import * as m from "~~/paraglide/messages.js";
|
2024-04-25 08:56:01 +02:00
|
|
|
|
2024-04-26 07:54:02 +02:00
|
|
|
const route = useRoute();
|
2024-07-17 01:34:21 +02:00
|
|
|
const username = (route.params.username as string).startsWith("@")
|
|
|
|
|
? (route.params.username as string).substring(1)
|
|
|
|
|
: (route.params.username as string);
|
2024-04-25 08:56:01 +02:00
|
|
|
|
2024-12-04 15:17:47 +01:00
|
|
|
definePageMeta({
|
|
|
|
|
layout: "app",
|
2024-12-07 23:05:26 +01:00
|
|
|
breadcrumbs: () => [
|
2024-12-04 15:17:47 +01:00
|
|
|
{
|
2024-12-07 22:17:22 +01:00
|
|
|
text: m.tough_nice_ox_drum(),
|
2024-12-04 15:17:47 +01:00
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
});
|
|
|
|
|
|
2025-08-28 07:41:51 +02:00
|
|
|
const { account, isLoading } = useAccountFromAcct(username);
|
2024-05-08 14:15:21 +02:00
|
|
|
const accountId = computed(() => account.value?.id ?? undefined);
|
2024-04-26 07:54:02 +02:00
|
|
|
|
2024-12-07 11:21:13 +01:00
|
|
|
useSeoMeta({
|
2024-05-08 14:15:21 +02:00
|
|
|
title: computed(() =>
|
2024-12-07 22:17:22 +01:00
|
|
|
account.value ? account.value.display_name : m.steep_sour_warthog_aim(),
|
2024-05-08 14:15:21 +02:00
|
|
|
),
|
|
|
|
|
ogTitle: computed(() =>
|
2024-12-07 22:17:22 +01:00
|
|
|
account.value ? account.value.display_name : m.steep_sour_warthog_aim(),
|
2024-05-08 14:15:21 +02:00
|
|
|
),
|
|
|
|
|
ogImage: computed(() => (account.value ? account.value.avatar : undefined)),
|
|
|
|
|
ogType: "profile",
|
|
|
|
|
ogDescription: computed(() =>
|
|
|
|
|
account.value ? account.value.note : undefined,
|
|
|
|
|
),
|
|
|
|
|
description: computed(() =>
|
|
|
|
|
account.value ? account.value.note : undefined,
|
|
|
|
|
),
|
2024-06-21 08:01:33 +02:00
|
|
|
robots: computed(() => ({
|
|
|
|
|
noindex: !!account.value?.noindex,
|
|
|
|
|
nofollow: !!account.value?.noindex,
|
|
|
|
|
noarchive: !!account.value?.noindex,
|
|
|
|
|
noimageindex: !!account.value?.noindex,
|
|
|
|
|
})),
|
2024-04-25 08:56:01 +02:00
|
|
|
});
|
2025-03-28 01:16:24 +01:00
|
|
|
</script>
|