2022-11-26 00:49:56 +01:00
|
|
|
<script setup lang="ts">
|
2023-01-23 20:33:21 +01:00
|
|
|
import type { mastodon } from 'masto'
|
|
|
|
|
2022-11-26 00:49:56 +01:00
|
|
|
const params = useRoute().params
|
2024-02-21 16:20:08 +01:00
|
|
|
const handle = computedEager(() => params.account as string)
|
2022-11-26 00:49:56 +01:00
|
|
|
|
2022-11-30 18:15:18 +01:00
|
|
|
definePageMeta({ name: 'account-index' })
|
|
|
|
|
2022-12-13 22:01:25 +01:00
|
|
|
const { t } = useI18n()
|
|
|
|
|
2024-02-21 16:20:08 +01:00
|
|
|
const account = await fetchAccountByHandle(handle.value)
|
2022-11-26 00:49:56 +01:00
|
|
|
|
2023-03-30 21:01:24 +02:00
|
|
|
function reorderAndFilter(items: mastodon.v1.Status[]) {
|
|
|
|
return reorderedTimeline(items, 'account')
|
|
|
|
}
|
2023-01-23 20:33:21 +01:00
|
|
|
|
2024-01-09 09:56:15 +01:00
|
|
|
const paginator = useMastoClient().v1.accounts.$select(account.id).statuses.list({ limit: 30, excludeReplies: true })
|
2022-11-26 18:36:23 +01:00
|
|
|
|
2022-12-13 22:01:25 +01:00
|
|
|
if (account) {
|
2023-04-16 21:33:51 +02:00
|
|
|
useHydratedHead({
|
2023-01-02 01:00:13 +01:00
|
|
|
title: () => `${t('account.posts')} | ${getDisplayName(account)} (@${account.acct})`,
|
2022-12-13 22:01:25 +01:00
|
|
|
})
|
|
|
|
}
|
2022-11-26 00:49:56 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-12-03 06:42:00 +01:00
|
|
|
<div>
|
2022-12-13 22:01:25 +01:00
|
|
|
<AccountTabs />
|
2023-01-23 20:33:21 +01:00
|
|
|
<TimelinePaginator :paginator="paginator" :preprocess="reorderAndFilter" context="account" :account="account" />
|
2022-11-26 00:49:56 +01:00
|
|
|
</div>
|
|
|
|
</template>
|