1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-13 22:28:05 +09:00
elk/components/account/AccountTabs.vue

44 lines
1.0 KiB
Vue
Raw Normal View History

2022-12-14 06:01:25 +09:00
<script setup lang="ts">
2023-01-25 03:52:48 +09:00
import type { CommonRouteTabOption } from '../common/CommonRouteTabs.vue'
2022-12-14 06:01:25 +09:00
const { t } = useI18n()
const route = useRoute()
const server = $(computedEager(() => route.params.server as string))
const account = $(computedEager(() => route.params.account as string))
2023-01-25 03:52:48 +09:00
const tabs = $computed<CommonRouteTabOption[]>(() => [
2022-12-14 06:01:25 +09:00
{
name: 'account-index',
to: {
name: 'account-index',
params: { server, account },
},
display: t('tab.posts'),
icon: 'i-ri:file-list-2-line',
},
{
name: 'account-replies',
to: {
name: 'account-replies',
params: { server, account },
},
display: t('tab.posts_with_replies'),
2023-01-08 18:03:23 +09:00
icon: 'i-ri:chat-1-line',
2022-12-14 06:01:25 +09:00
},
{
name: 'account-media',
to: {
name: 'account-media',
params: { server, account },
},
display: t('tab.media'),
icon: 'i-ri:camera-2-line',
},
2023-01-25 03:52:48 +09:00
])
2022-12-14 06:01:25 +09:00
</script>
<template>
2023-01-04 18:00:58 +09:00
<CommonRouteTabs force replace :options="tabs" prevent-scroll-top command border="base b" />
2022-12-14 06:01:25 +09:00
</template>