2024-04-15 03:16:57 +02:00
|
|
|
<template>
|
2024-06-21 04:09:09 +02:00
|
|
|
<ErrorBoundary>
|
2024-12-02 16:07:52 +01:00
|
|
|
<div class="mx-auto max-w-2xl w-full space-y-2">
|
|
|
|
|
<TimelineScroller v-if="account">
|
|
|
|
|
<AccountProfile :account="account" />
|
2024-06-29 05:05:50 +02:00
|
|
|
<AccountTimeline v-if="accountId" :id="accountId" :key="accountId" />
|
2024-06-21 04:09:09 +02:00
|
|
|
</TimelineScroller>
|
2024-06-12 06:41:27 +02:00
|
|
|
</div>
|
2024-06-21 04:09:09 +02:00
|
|
|
</ErrorBoundary>
|
2024-04-15 03:16:57 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
2024-06-21 04:09:09 +02:00
|
|
|
import ErrorBoundary from "~/components/errors/ErrorBoundary.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";
|
2024-04-25 08:56:01 +02:00
|
|
|
|
2024-04-26 07:54:02 +02:00
|
|
|
definePageMeta({
|
2024-05-08 14:15:21 +02:00
|
|
|
layout: "app",
|
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-02 16:07:52 +01:00
|
|
|
const account = useAccountFromAcct(client, 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-05-08 14:15:21 +02:00
|
|
|
useServerSeoMeta({
|
|
|
|
|
title: computed(() =>
|
|
|
|
|
account.value ? account.value.display_name : "Loading",
|
|
|
|
|
),
|
|
|
|
|
ogTitle: computed(() =>
|
|
|
|
|
account.value ? account.value.display_name : "Loading",
|
|
|
|
|
),
|
|
|
|
|
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
|
|
|
});
|
2024-04-22 09:38:51 +02:00
|
|
|
</script>
|