2022-11-17 16:09:05 +03:00
|
|
|
<script setup lang="ts">
|
2022-11-28 17:25:32 +03:00
|
|
|
const { t } = useI18n()
|
|
|
|
|
2022-12-11 13:52:36 +03:00
|
|
|
const tabs = $computed(() => [
|
|
|
|
{
|
2023-01-11 17:50:47 +03:00
|
|
|
to: isHydrated.value ? `/${currentServer.value}/explore` : '/explore',
|
2023-01-12 21:35:26 +03:00
|
|
|
display: isHydrated.value ? t('tab.posts') : '',
|
2022-12-11 13:52:36 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-11 17:50:47 +03:00
|
|
|
to: isHydrated.value ? `/${currentServer.value}/explore/tags` : '/explore/tags',
|
2023-01-12 21:35:26 +03:00
|
|
|
display: isHydrated.value ? t('tab.hashtags') : '',
|
2022-12-11 13:52:36 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-11 17:50:47 +03:00
|
|
|
to: isHydrated.value ? `/${currentServer.value}/explore/links` : '/explore/links',
|
2023-01-12 21:35:26 +03:00
|
|
|
display: isHydrated.value ? t('tab.news') : '',
|
2022-12-11 13:52:36 +03:00
|
|
|
},
|
|
|
|
// This section can only be accessed after logging in
|
2022-12-26 08:39:18 +03:00
|
|
|
{
|
2023-01-11 17:50:47 +03:00
|
|
|
to: isHydrated.value ? `/${currentServer.value}/explore/users` : '/explore/users',
|
2023-01-12 21:35:26 +03:00
|
|
|
display: isHydrated.value ? t('tab.for_you') : '',
|
2023-01-15 11:38:02 +03:00
|
|
|
disabled: !isHydrated.value || !currentUser.value,
|
2022-12-26 08:39:18 +03:00
|
|
|
},
|
2022-12-11 13:52:36 +03:00
|
|
|
] as const)
|
2022-11-17 16:09:05 +03:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
2022-12-30 21:16:23 +03:00
|
|
|
<MainContent>
|
2022-11-17 16:09:05 +03:00
|
|
|
<template #title>
|
2023-01-05 02:17:30 +03:00
|
|
|
<span timeline-title-style flex items-center gap-2 cursor-pointer @click="$scrollToTop">
|
2022-11-29 23:15:53 +03:00
|
|
|
<div i-ri:hashtag />
|
2022-12-27 20:49:15 +03:00
|
|
|
<span>{{ t('nav.explore') }}</span>
|
2022-12-11 13:52:36 +03:00
|
|
|
</span>
|
2022-11-17 16:09:05 +03:00
|
|
|
</template>
|
2022-11-24 09:42:26 +03:00
|
|
|
|
2022-12-11 13:52:36 +03:00
|
|
|
<template #header>
|
|
|
|
<CommonRouteTabs replace :options="tabs" />
|
|
|
|
</template>
|
2023-01-15 11:38:02 +03:00
|
|
|
<NuxtPage v-if="isHydrated" />
|
2022-11-17 16:09:05 +03:00
|
|
|
</MainContent>
|
|
|
|
</template>
|