2022-12-13 22:01:25 +01:00
|
|
|
<script setup lang="ts">
|
2024-02-24 13:24:21 +01:00
|
|
|
import type { CommonRouteTabOption } from '~/types'
|
2023-01-24 19:52:48 +01:00
|
|
|
|
2022-12-13 22:01:25 +01:00
|
|
|
const { t } = useI18n()
|
|
|
|
const route = useRoute()
|
|
|
|
|
2024-02-24 13:24:21 +01:00
|
|
|
const server = computed(() => route.params.server as string)
|
|
|
|
const account = computed(() => route.params.account as string)
|
2022-12-13 22:01:25 +01:00
|
|
|
|
2024-02-21 16:20:08 +01:00
|
|
|
const tabs = computed<CommonRouteTabOption[]>(() => [
|
2022-12-13 22:01:25 +01:00
|
|
|
{
|
|
|
|
name: 'account-index',
|
|
|
|
to: {
|
|
|
|
name: 'account-index',
|
2024-02-21 16:20:08 +01:00
|
|
|
params: { server: server.value, account: account.value },
|
2022-12-13 22:01:25 +01:00
|
|
|
},
|
|
|
|
display: t('tab.posts'),
|
|
|
|
icon: 'i-ri:file-list-2-line',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'account-replies',
|
|
|
|
to: {
|
|
|
|
name: 'account-replies',
|
2024-02-21 16:20:08 +01:00
|
|
|
params: { server: server.value, account: account.value },
|
2022-12-13 22:01:25 +01:00
|
|
|
},
|
|
|
|
display: t('tab.posts_with_replies'),
|
2023-01-08 10:03:23 +01:00
|
|
|
icon: 'i-ri:chat-1-line',
|
2022-12-13 22:01:25 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'account-media',
|
|
|
|
to: {
|
|
|
|
name: 'account-media',
|
2024-02-21 16:20:08 +01:00
|
|
|
params: { server: server.value, account: account.value },
|
2022-12-13 22:01:25 +01:00
|
|
|
},
|
|
|
|
display: t('tab.media'),
|
|
|
|
icon: 'i-ri:camera-2-line',
|
|
|
|
},
|
2023-01-24 19:52:48 +01:00
|
|
|
])
|
2022-12-13 22:01:25 +01:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2023-01-04 10:00:58 +01:00
|
|
|
<CommonRouteTabs force replace :options="tabs" prevent-scroll-top command border="base b" />
|
2022-12-13 22:01:25 +01:00
|
|
|
</template>
|