0
0

fix: no visitor data access

This commit is contained in:
オスカー、 2024-10-31 22:41:24 +09:00
parent c71de4ce59
commit a16bdec524
Signed by: SWREI
GPG Key ID: 139D6573F92DA9F7
2 changed files with 14 additions and 11 deletions

View File

@ -46,6 +46,7 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/instance-info/:host', path: '/instance-info/:host',
component: page(() => import('@/pages/instance-info.vue')), component: page(() => import('@/pages/instance-info.vue')),
loginRequired: true,
}, { }, {
name: 'settings', name: 'settings',
path: '/settings', path: '/settings',
@ -192,9 +193,11 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/announcements', path: '/announcements',
component: page(() => import('@/pages/announcements.vue')), component: page(() => import('@/pages/announcements.vue')),
loginRequired: true,
}, { }, {
path: '/announcements/:announcementId', path: '/announcements/:announcementId',
component: page(() => import('@/pages/announcement.vue')), component: page(() => import('@/pages/announcement.vue')),
loginRequired: true,
}, { }, {
path: '/about', path: '/about',
component: page(() => import('@/pages/about.vue')), component: page(() => import('@/pages/about.vue')),
@ -209,6 +212,7 @@ const routes: RouteDef[] = [{
path: '/invite', path: '/invite',
name: 'invite', name: 'invite',
component: page(() => import('@/pages/invite.vue')), component: page(() => import('@/pages/invite.vue')),
loginRequired: true,
}, { }, {
path: '/ads', path: '/ads',
component: page(() => import('@/pages/ads.vue')), component: page(() => import('@/pages/ads.vue')),
@ -226,9 +230,11 @@ const routes: RouteDef[] = [{
path: '/explore', path: '/explore',
component: page(() => import('@/pages/explore.vue')), component: page(() => import('@/pages/explore.vue')),
hash: 'initialTab', hash: 'initialTab',
loginRequired: true,
}, { }, {
path: '/search', path: '/search',
component: page(() => import('@/pages/search.vue')), component: page(() => import('@/pages/search.vue')),
loginRequired: true,
query: { query: {
q: 'query', q: 'query',
userId: 'userId', userId: 'userId',
@ -263,6 +269,7 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/scratchpad', path: '/scratchpad',
component: page(() => import('@/pages/scratchpad.vue')), component: page(() => import('@/pages/scratchpad.vue')),
loginRequired: true
}, { }, {
path: '/preview', path: '/preview',
component: page(() => import('@/pages/preview.vue')), component: page(() => import('@/pages/preview.vue')),
@ -284,6 +291,7 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/tags/:tag', path: '/tags/:tag',
component: page(() => import('@/pages/tag.vue')), component: page(() => import('@/pages/tag.vue')),
loginRequired: true,
}, { }, {
path: '/pages/new', path: '/pages/new',
component: page(() => import('@/pages/page-editor/page-editor.vue')), component: page(() => import('@/pages/page-editor/page-editor.vue')),
@ -306,9 +314,11 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/play/:id', path: '/play/:id',
component: page(() => import('@/pages/flash/flash.vue')), component: page(() => import('@/pages/flash/flash.vue')),
loginRequired: true,
}, { }, {
path: '/play', path: '/play',
component: page(() => import('@/pages/flash/flash-index.vue')), component: page(() => import('@/pages/flash/flash-index.vue')),
loginRequired: true,
}, { }, {
path: '/gallery/:postId/edit', path: '/gallery/:postId/edit',
component: page(() => import('@/pages/gallery/edit.vue')), component: page(() => import('@/pages/gallery/edit.vue')),
@ -320,9 +330,11 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/gallery/:postId', path: '/gallery/:postId',
component: page(() => import('@/pages/gallery/post.vue')), component: page(() => import('@/pages/gallery/post.vue')),
loginRequired: true,
}, { }, {
path: '/gallery', path: '/gallery',
component: page(() => import('@/pages/gallery/index.vue')), component: page(() => import('@/pages/gallery/index.vue')),
loginRequired: true,
}, { }, {
path: '/channels/:channelId/edit', path: '/channels/:channelId/edit',
component: page(() => import('@/pages/channel-editor.vue')), component: page(() => import('@/pages/channel-editor.vue')),
@ -334,9 +346,11 @@ const routes: RouteDef[] = [{
}, { }, {
path: '/channels/:channelId', path: '/channels/:channelId',
component: page(() => import('@/pages/channel.vue')), component: page(() => import('@/pages/channel.vue')),
loginRequired: true,
}, { }, {
path: '/channels', path: '/channels',
component: page(() => import('@/pages/channels.vue')), component: page(() => import('@/pages/channels.vue')),
loginRequired: true,
}, { }, {
path: '/custom-emojis-manager', path: '/custom-emojis-manager',
component: page(() => import('@/pages/custom-emojis-manager.vue')), component: page(() => import('@/pages/custom-emojis-manager.vue')),

View File

@ -18,9 +18,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<div v-if="!isRoot" class="header"> <div v-if="!isRoot" class="header">
<div v-if="narrow === false" class="wide"> <div v-if="narrow === false" class="wide">
<MkA to="/" class="link" activeClass="active"><i class="ti ti-home icon"></i> {{ i18n.ts.home }}</MkA> <MkA to="/" class="link" activeClass="active"><i class="ti ti-home icon"></i> {{ i18n.ts.home }}</MkA>
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" activeClass="active"><i class="ti ti-message icon"></i> {{ i18n.ts.timeline }}</MkA>
<MkA to="/explore" class="link" activeClass="active"><i class="ti ti-hash icon"></i> {{ i18n.ts.explore }}</MkA>
<MkA to="/channels" class="link" activeClass="active"><i class="ti ti-device-tv icon"></i> {{ i18n.ts.channel }}</MkA>
</div> </div>
<div v-else-if="narrow === true" class="narrow"> <div v-else-if="narrow === true" class="narrow">
<button class="menu _button" @click="showMenu = true"> <button class="menu _button" @click="showMenu = true">
@ -50,14 +47,6 @@ SPDX-License-Identifier: AGPL-3.0-only
<Transition :name="'tray'"> <Transition :name="'tray'">
<div v-if="showMenu" class="menu"> <div v-if="showMenu" class="menu">
<MkA to="/" class="link" activeClass="active"><i class="ti ti-home icon"></i>{{ i18n.ts.home }}</MkA> <MkA to="/" class="link" activeClass="active"><i class="ti ti-home icon"></i>{{ i18n.ts.home }}</MkA>
<MkA v-if="isTimelineAvailable" to="/timeline" class="link" activeClass="active"><i class="ti ti-message icon"></i>{{ i18n.ts.timeline }}</MkA>
<MkA to="/explore" class="link" activeClass="active"><i class="ti ti-hash icon"></i>{{ i18n.ts.explore }}</MkA>
<MkA to="/announcements" class="link" activeClass="active"><i class="ti ti-speakerphone icon"></i>{{ i18n.ts.announcements }}</MkA>
<MkA to="/channels" class="link" activeClass="active"><i class="ti ti-device-tv icon"></i>{{ i18n.ts.channel }}</MkA>
<div class="divider"></div>
<MkA to="/pages" class="link" activeClass="active"><i class="ti ti-news icon"></i>{{ i18n.ts.pages }}</MkA>
<MkA to="/play" class="link" activeClass="active"><i class="ti ti-player-play icon"></i>Play</MkA>
<MkA to="/gallery" class="link" activeClass="active"><i class="ti ti-icons icon"></i>{{ i18n.ts.gallery }}</MkA>
<div class="action"> <div class="action">
<button class="_buttonPrimary" @click="signup()">{{ i18n.ts.signup }}</button> <button class="_buttonPrimary" @click="signup()">{{ i18n.ts.signup }}</button>
<button class="_button" @click="signin()">{{ i18n.ts.login }}</button> <button class="_button" @click="signin()">{{ i18n.ts.login }}</button>