1
0
mirror of https://github.com/elk-zone/elk synced 2024-12-27 04:57:59 +09:00
elk/pages/[[server]]/explore.vue

47 lines
1022 B
Vue
Raw Normal View History

2022-11-17 22:09:05 +09:00
<script setup lang="ts">
2022-12-11 19:52:36 +09:00
import { invoke } from '@vueuse/shared'
2022-11-25 20:48:48 +09:00
2022-11-28 23:25:32 +09:00
const { t } = useI18n()
2022-12-11 19:52:36 +09:00
const tabs = $computed(() => [
{
to: `/${currentServer.value}/explore`,
display: t('tab.posts'),
},
{
to: `/${currentServer.value}/explore/tags`,
display: t('tab.hashtags'),
},
{
to: `/${currentServer.value}/explore/links`,
display: t('tab.news'),
},
// This section can only be accessed after logging in
...invoke(() => currentUser.value
? [
{
to: `/${currentServer.value}/explore/users`,
display: t('tab.for_you'),
},
]
: [],
),
] as const)
2022-11-17 22:09:05 +09:00
</script>
<template>
<MainContent>
<template #title>
2022-12-11 19:52:36 +09:00
<span text-lg font-bold flex items-center gap-2 cursor-pointer @click="$scrollToTop">
2022-11-30 05:15:53 +09:00
<div i-ri:hashtag />
<span>{{ t('nav_side.explore') }}</span>
2022-12-11 19:52:36 +09:00
</span>
2022-11-17 22:09:05 +09:00
</template>
2022-11-24 15:42:26 +09:00
2022-12-11 19:52:36 +09:00
<template #header>
<CommonRouteTabs replace :options="tabs" />
</template>
<NuxtPage />
2022-11-17 22:09:05 +09:00
</MainContent>
</template>