elk/pages/[[server]]/explore.vue

41 lines
985 B
Vue
Raw Normal View History

2022-11-17 14:09:05 +01:00
<script setup lang="ts">
2023-01-09 21:20:26 +01:00
const { $t } = useFluent()
2022-11-28 15:25:32 +01:00
2022-12-11 11:52:36 +01:00
const tabs = $computed(() => [
{
to: `/${currentServer.value}/explore`,
2023-01-09 21:20:26 +01:00
display: $t('tab_posts'),
2022-12-11 11:52:36 +01:00
},
{
to: `/${currentServer.value}/explore/tags`,
2023-01-09 21:20:26 +01:00
display: $t('tab_hashtags'),
2022-12-11 11:52:36 +01:00
},
{
to: `/${currentServer.value}/explore/links`,
2023-01-09 21:20:26 +01:00
display: $t('tab_news'),
2022-12-11 11:52:36 +01:00
},
// This section can only be accessed after logging in
{
to: `/${currentServer.value}/explore/users`,
2023-01-09 21:20:26 +01:00
display: $t('tab_for_you'),
disabled: !isMastoInitialised.value || !currentUser.value,
},
2022-12-11 11:52:36 +01:00
] as const)
2022-11-17 14:09:05 +01:00
</script>
<template>
2022-12-30 19:16:23 +01:00
<MainContent>
2022-11-17 14:09:05 +01:00
<template #title>
2023-01-05 00:17:30 +01:00
<span timeline-title-style flex items-center gap-2 cursor-pointer @click="$scrollToTop">
2022-11-29 21:15:53 +01:00
<div i-ri:hashtag />
2023-01-09 21:20:26 +01:00
<span>{{ $t('nav_explore') }}</span>
2022-12-11 11:52:36 +01:00
</span>
2022-11-17 14:09:05 +01:00
</template>
2022-11-24 07:42:26 +01:00
2022-12-11 11:52:36 +01:00
<template #header>
<CommonRouteTabs replace :options="tabs" />
</template>
<NuxtPage v-if="isMastoInitialised" />
2022-11-17 14:09:05 +01:00
</MainContent>
</template>