1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2024-12-13 14:18:26 +09:00

fix: change header for not logged in users

just for not show any error message when exploring
This commit is contained in:
オスカー、 2023-12-01 11:44:24 +09:00 committed by GitHub
parent ce8ed1fe04
commit 42fe311524
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<template>
<MkStickyContainer>
<template #header><MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/></template>
<template #header>
<MkPageHeader v-model:tab="tab" :actions="$i ? headerActions : null" :tabs="$i ? headerTabs : headerTabsWhenNotLogin" :displayMyAvatar="true"/>
</template>
<MkSpacer :contentMax="700">
<div v-if="tab === 'search'">
<div class="_gaps">
@ -59,6 +61,7 @@ import MkRadios from '@/components/MkRadios.vue';
import MkButton from '@/components/MkButton.vue';
import MkFoldableSection from '@/components/MkFoldableSection.vue';
import { useRouter } from '@/router.js';
import { $i } from '@/account.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import { i18n } from '@/i18n.js';
@ -149,6 +152,16 @@ const headerTabs = $computed(() => [{
icon: 'ti ti-edit',
}]);
const headerTabsWhenNotLogin = $computed(() => [{
key: 'search',
title: i18n.ts.search,
icon: 'ti ti-search',
}, {
key: 'featured',
title: i18n.ts._channel.featured,
icon: 'ti ti-comet',
}]);
definePageMetadata(computed(() => ({
title: i18n.ts.channel,
icon: 'ti ti-device-tv',