elk/components/account/AccountTabs.vue

42 lines
946 B
Vue
Raw Normal View History

2022-12-13 22:01:25 +01:00
<script setup lang="ts">
2023-01-09 21:20:26 +01:00
const { $t } = useFluent()
2022-12-13 22:01:25 +01:00
const route = useRoute()
const server = $(computedEager(() => route.params.server as string))
const account = $(computedEager(() => route.params.account as string))
const tabs = $computed(() => [
{
name: 'account-index',
to: {
name: 'account-index',
params: { server, account },
},
2023-01-09 21:20:26 +01:00
display: $t('tab_posts'),
2022-12-13 22:01:25 +01:00
icon: 'i-ri:file-list-2-line',
},
{
name: 'account-replies',
to: {
name: 'account-replies',
params: { server, account },
},
2023-01-09 21:20:26 +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',
params: { server, account },
},
2023-01-09 21:20:26 +01:00
display: $t('tab_media'),
2022-12-13 22:01:25 +01:00
icon: 'i-ri:camera-2-line',
},
] as const)
</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>