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