1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-19 23:40:07 +00:00
elk/pages/@[account].vue
2022-11-24 14:18:05 +08:00

32 lines
848 B
Vue

<script setup lang="ts">
const props = defineProps<{
modelValue?: boolean
}>()
const params = useRoute().params
const accountName = $computed(() => params.account as string)
const account = await fetchAccountByName(accountName)
const tabNames = ['Posts', 'Posts and replies'] as const
// Don't use local storage because it is better to default to Posts every time you visit a user's profile.
const tab = $ref('Posts')
const paginator = $computed(() => {
return masto.accounts.getStatusesIterable(account.id, { excludeReplies: tab === 'Posts' } as any)
})
</script>
<template>
<MainContent>
<template v-if="account">
<AccountHeader :account="account" border="b base" />
<NuxtPage />
</template>
<CommonNotFound v-else>
Account @{{ params.user }} not found
</CommonNotFound>
</MainContent>
</template>