elk/pages/[[server]]/@[account]/index/index.vue

32 wiersze
898 B
Vue
Czysty Zwykły widok Historia

<script setup lang="ts">
import type { Account } from 'masto'
2022-12-13 21:01:25 +00:00
import AccountTabs from '~/components/account/AccountTabs.vue'
const params = useRoute().params
2022-11-30 07:08:10 +00:00
const handle = $(computedEager(() => params.account as string))
definePageMeta({ name: 'account-index' })
2022-12-13 21:01:25 +00:00
const { t } = useI18n()
const { data: account } = await useAsyncData(`account:${handle}`, async () => (
window.history.state?.account as Account | undefined)
2022-12-13 21:01:25 +00:00
?? await fetchAccountByHandle(handle),
)
2022-12-13 21:01:25 +00:00
const paginator = useMasto().accounts.iterateStatuses(account.value!.id, { excludeReplies: true })
2022-11-26 17:36:23 +00:00
2022-12-13 21:01:25 +00:00
if (account) {
useHeadFixed({
title: () => `${t('account.posts')} | ${getDisplayName(account.value!)} (@${account.value!.acct})`,
})
}
</script>
<template>
<div>
2022-12-13 21:01:25 +00:00
<AccountTabs />
2022-12-29 16:25:04 +00:00
<TimelinePaginator :paginator="paginator" :preprocess="timelineWithReorderedReplies" context="account" />
</div>
</template>