mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-22 20:23:49 +01:00
Revert "feature(client): Timeline page for non-login users"
This reverts commit 49beee532b82972333e49da3647b6451f1a138a0.
This commit is contained in:
parent
2c6f84eab5
commit
68b628628a
@ -3,7 +3,7 @@
|
||||
<template #header><MkPageHeader v-model:tab="src" :actions="headerActions" :tabs="$i ? headerTabs : headerTabsWhenNotLogin"/></template>
|
||||
<MkSpacer :content-max="800">
|
||||
<div ref="rootEl" v-hotkey.global="keymap" class="cmuxhskf">
|
||||
<XTutorial v-if="$i && $store.reactiveState.tutorial.value != -1" class="tutorial _block"/>
|
||||
<XTutorial v-if="$store.reactiveState.tutorial.value != -1" class="tutorial _block"/>
|
||||
<XPostForm v-if="$store.reactiveState.showFixedPostForm.value" class="post-form _block" fixed/>
|
||||
|
||||
<div v-if="queue > 0" class="new"><button class="_buttonPrimary" @click="top()">{{ i18n.ts.newNoteRecived }}</button></div>
|
||||
@ -46,8 +46,7 @@ const tlComponent = $ref<InstanceType<typeof XTimeline>>();
|
||||
const rootEl = $ref<HTMLElement>();
|
||||
|
||||
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<void> {
|
||||
@ -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',
|
||||
}] : []), {
|
||||
icon: 'fas fa-list-ul',
|
||||
title: i18n.ts.lists,
|
||||
iconOnly: true,
|
||||
}] : []),
|
||||
...(isGlobalTimelineAvailable ? [{
|
||||
key: 'global',
|
||||
title: i18n.ts._timelines.global,
|
||||
icon: 'fas fa-globe',
|
||||
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,
|
||||
|
@ -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: '/',
|
||||
|
Loading…
Reference in New Issue
Block a user