From c5cea77bcdb1a14f91d65044f058dadc6ef68558 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 9 Aug 2022 16:27:43 -0700 Subject: [PATCH] fix: :bug: Remove header tabs if guest not enabled and not logged in --- packages/client/src/pages/timeline.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index 7afb233f7..035db9e97 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -126,12 +126,7 @@ const headerActions = $computed(() => [{ title: i18n.ts.antennas, iconOnly: true, handler: chooseAntenna, -}, /* { - icon: 'fas fa-satellite-dish', - title: i18n.ts.channel, - iconOnly: true, - handler: chooseChannel, -}, */ { +}, { icon: 'fas fa-calendar-alt', title: i18n.ts.jumpToSpecifiedDate, iconOnly: true, @@ -168,7 +163,7 @@ const headerTabs = $computed(() => [{ iconOnly: true, }] : [])]); -const headerTabsWhenNotLogin = $computed(() => [ +let headerTabsWhenNotLogin = $computed(() => [ ...(isLocalTimelineAvailable ? [{ key: 'local', title: i18n.ts._timelines.local, @@ -183,6 +178,10 @@ const headerTabsWhenNotLogin = $computed(() => [ }] : []), ]); +if (!enableGuestTimeline) { + headerTabsWhenNotLogin = []; +} + definePageMetadata(computed(() => ({ title: i18n.ts.timeline, icon: src === 'local' ? 'fas fa-user-group' : src === 'social' ? 'fas fa-handshake-simple' : src === 'recommended' ? 'fas fa-signs-post' : src === 'global' ? 'fas fa-globe' : 'fas fa-home',