feat: timeline page for non-login users (#9795)
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
<XKanban v-if="narrow && !root" class="banner" :powered-by="root"/>
|
||||
|
||||
<div class="contents">
|
||||
<XHeader v-if="!root" class="header" :info="pageInfo"/>
|
||||
<XHeader v-if="!root" class="header"/>
|
||||
<main style="container-type: inline-size;">
|
||||
<RouterView/>
|
||||
</main>
|
||||
@@ -33,9 +33,14 @@
|
||||
<Transition :name="$store.state.animation ? 'tray' : ''">
|
||||
<div v-if="showMenu" class="menu">
|
||||
<MkA to="/" class="link" active-class="active"><i class="ti ti-home icon"></i>{{ $ts.home }}</MkA>
|
||||
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" active-class="active"><i class="ti ti-message icon"></i>{{ $ts.timeline }}</MkA>
|
||||
<MkA to="/explore" class="link" active-class="active"><i class="ti ti-hash icon"></i>{{ $ts.explore }}</MkA>
|
||||
<MkA to="/featured" class="link" active-class="active"><i class="ti ti-flare icon"></i>{{ $ts.featured }}</MkA>
|
||||
<MkA to="/announcements" class="link" active-class="active"><i class="ti ti-speakerphone icon"></i>{{ $ts.announcements }}</MkA>
|
||||
<MkA to="/channels" class="link" active-class="active"><i class="ti ti-device-tv icon"></i>{{ $ts.channel }}</MkA>
|
||||
<div class="divider"></div>
|
||||
<MkA to="/pages" class="link" active-class="active"><i class="ti ti-news icon"></i>{{ $ts.pages }}</MkA>
|
||||
<MkA to="/play" class="link" active-class="active"><i class="ti ti-player-play icon"></i>Play</MkA>
|
||||
<MkA to="/gallery" class="link" active-class="active"><i class="ti ti-icons icon"></i>{{ $ts.gallery }}</MkA>
|
||||
<div class="action">
|
||||
<button class="_buttonPrimary" @click="signup()">{{ $ts.signup }}</button>
|
||||
<button class="_button" @click="signin()">{{ $ts.login }}</button>
|
||||
@@ -52,6 +57,7 @@ import XKanban from './kanban.vue';
|
||||
import { host, instanceName } from '@/config';
|
||||
import { search } from '@/scripts/search';
|
||||
import * as os from '@/os';
|
||||
import { instance } from '@/instance';
|
||||
import MkPagination from '@/components/MkPagination.vue';
|
||||
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
||||
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||
@@ -76,6 +82,9 @@ const announcements = {
|
||||
endpoint: 'announcements',
|
||||
limit: 10,
|
||||
};
|
||||
|
||||
const isTimelineAvailable = instance.policies.ltlAvailable || instance.policies.gtlAvailable;
|
||||
|
||||
let showMenu = $ref(false);
|
||||
let isDesktop = $ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
||||
let narrow = $ref(window.innerWidth < 1280);
|
||||
@@ -223,6 +232,12 @@ defineExpose({
|
||||
}
|
||||
}
|
||||
|
||||
> .divider {
|
||||
margin: 8px auto;
|
||||
width: calc(100% - 32px);
|
||||
border-top: solid 0.5px var(--divider);
|
||||
}
|
||||
|
||||
> .action {
|
||||
padding: 16px;
|
||||
|
||||
|
Reference in New Issue
Block a user