fix: 🐛 Remove header tabs if guest not enabled and not logged in
This commit is contained in:
parent
dc00651c61
commit
c5cea77bcd
|
@ -126,12 +126,7 @@ const headerActions = $computed(() => [{
|
||||||
title: i18n.ts.antennas,
|
title: i18n.ts.antennas,
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
handler: chooseAntenna,
|
handler: chooseAntenna,
|
||||||
}, /* {
|
}, {
|
||||||
icon: 'fas fa-satellite-dish',
|
|
||||||
title: i18n.ts.channel,
|
|
||||||
iconOnly: true,
|
|
||||||
handler: chooseChannel,
|
|
||||||
}, */ {
|
|
||||||
icon: 'fas fa-calendar-alt',
|
icon: 'fas fa-calendar-alt',
|
||||||
title: i18n.ts.jumpToSpecifiedDate,
|
title: i18n.ts.jumpToSpecifiedDate,
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
|
@ -168,7 +163,7 @@ const headerTabs = $computed(() => [{
|
||||||
iconOnly: true,
|
iconOnly: true,
|
||||||
}] : [])]);
|
}] : [])]);
|
||||||
|
|
||||||
const headerTabsWhenNotLogin = $computed(() => [
|
let headerTabsWhenNotLogin = $computed(() => [
|
||||||
...(isLocalTimelineAvailable ? [{
|
...(isLocalTimelineAvailable ? [{
|
||||||
key: 'local',
|
key: 'local',
|
||||||
title: i18n.ts._timelines.local,
|
title: i18n.ts._timelines.local,
|
||||||
|
@ -183,6 +178,10 @@ const headerTabsWhenNotLogin = $computed(() => [
|
||||||
}] : []),
|
}] : []),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
if (!enableGuestTimeline) {
|
||||||
|
headerTabsWhenNotLogin = [];
|
||||||
|
}
|
||||||
|
|
||||||
definePageMetadata(computed(() => ({
|
definePageMetadata(computed(() => ({
|
||||||
title: i18n.ts.timeline,
|
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',
|
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',
|
||||||
|
|
Loading…
Reference in New Issue