From 68b628628aa6e096cb1b786cb5189269ecdb3ed2 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 9 Aug 2022 19:49:23 -0700 Subject: [PATCH] Revert "feature(client): Timeline page for non-login users" This reverts commit 49beee532b82972333e49da3647b6451f1a138a0. --- packages/client/src/pages/timeline.vue | 46 ++++++++++++++------------ packages/client/src/router.ts | 3 -- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/packages/client/src/pages/timeline.vue b/packages/client/src/pages/timeline.vue index 21fc8080f..a727c849a 100644 --- a/packages/client/src/pages/timeline.vue +++ b/packages/client/src/pages/timeline.vue @@ -3,7 +3,7 @@
- +
@@ -46,8 +46,7 @@ const tlComponent = $ref>(); const rootEl = $ref(); let queue = $ref(0); -let srcWhenNotSignin = $ref(isLocalTimelineAvailable ? 'local' : 'global'); -const src = $computed({ get: () => ($i ? defaultStore.reactiveState.tl.value.src : srcWhenNotSignin), set: (x) => saveSrc(x) }); +const src = $computed({ get: () => defaultStore.reactiveState.tl.value.src, set: (x) => saveSrc(x) }); watch ($$(src), () => queue = 0); @@ -96,7 +95,7 @@ function saveSrc(newSrc: 'home' | 'local' | 'social' | 'global'): void { ...defaultStore.state.tl, src: newSrc, }); - srcWhenNotSignin = newSrc ; + logoutSrc = newSrc ; } async function timetravel(): Promise { @@ -156,28 +155,31 @@ const headerTabs = $computed(() => [{ title: i18n.ts._timelines.social, icon: 'fas fa-handshake-simple', iconOnly: true, -}] : []), - ...(isGlobalTimelineAvailable ? [{ + loginRequired: true, +}] : []), ...(isGlobalTimelineAvailable ? [{ key: 'global', title: i18n.ts._timelines.global, icon: 'fas fa-globe', iconOnly: true, -}] : [])]); - -const headerTabsWhenNotLogin = $computed(() => [ - ...(isLocalTimelineAvailable ? [{ - key: 'local', - title: i18n.ts._timelines.local, - icon: 'fas fa-user-group', - iconOnly: true, - }] : []), - ...(isGlobalTimelineAvailable ? [{ - key: 'global', - title: i18n.ts._timelines.global, - icon: 'fas fa-globe', - iconOnly: true, - }] : []), -]); +}] : []), { + icon: 'fas fa-list-ul', + title: i18n.ts.lists, + iconOnly: true, + loginRequired: true, + onClick: chooseList, +}, { + icon: 'fas fa-satellite', + title: i18n.ts.antennas, + iconOnly: true, + loginRequired: true, + onClick: chooseAntenna, +}, { + icon: 'fas fa-satellite-dish', + title: i18n.ts.channel, + iconOnly: true, + loginRequired: true, + onClick: chooseChannel, +}]); definePageMetadata(computed(() => ({ title: i18n.ts.timeline, diff --git a/packages/client/src/router.ts b/packages/client/src/router.ts index 29b2eb590..343f0d29e 100644 --- a/packages/client/src/router.ts +++ b/packages/client/src/router.ts @@ -453,9 +453,6 @@ export const routes = [{ path: '/timeline/antenna/:antennaId', component: page(() => import('./pages/antenna-timeline.vue')), loginRequired: true, -}, { - path: '/timeline', - component: page(() => import('./pages/timeline.vue')), }, { name: 'index', path: '/',