From a16bdec524b04e01e06ef01319359816bdf02807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=AA=E3=82=B9=E3=82=AB=E3=83=BC=E3=80=81?= Date: Thu, 31 Oct 2024 22:41:24 +0900 Subject: [PATCH] fix: no visitor data access --- packages/frontend/src/router/definition.ts | 14 ++++++++++++++ packages/frontend/src/ui/visitor.vue | 11 ----------- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts index b5fd6b6ec..cd99f9b1e 100644 --- a/packages/frontend/src/router/definition.ts +++ b/packages/frontend/src/router/definition.ts @@ -46,6 +46,7 @@ const routes: RouteDef[] = [{ }, { path: '/instance-info/:host', component: page(() => import('@/pages/instance-info.vue')), + loginRequired: true, }, { name: 'settings', path: '/settings', @@ -192,9 +193,11 @@ const routes: RouteDef[] = [{ }, { path: '/announcements', component: page(() => import('@/pages/announcements.vue')), + loginRequired: true, }, { path: '/announcements/:announcementId', component: page(() => import('@/pages/announcement.vue')), + loginRequired: true, }, { path: '/about', component: page(() => import('@/pages/about.vue')), @@ -209,6 +212,7 @@ const routes: RouteDef[] = [{ path: '/invite', name: 'invite', component: page(() => import('@/pages/invite.vue')), + loginRequired: true, }, { path: '/ads', component: page(() => import('@/pages/ads.vue')), @@ -226,9 +230,11 @@ const routes: RouteDef[] = [{ path: '/explore', component: page(() => import('@/pages/explore.vue')), hash: 'initialTab', + loginRequired: true, }, { path: '/search', component: page(() => import('@/pages/search.vue')), + loginRequired: true, query: { q: 'query', userId: 'userId', @@ -263,6 +269,7 @@ const routes: RouteDef[] = [{ }, { path: '/scratchpad', component: page(() => import('@/pages/scratchpad.vue')), + loginRequired: true }, { path: '/preview', component: page(() => import('@/pages/preview.vue')), @@ -284,6 +291,7 @@ const routes: RouteDef[] = [{ }, { path: '/tags/:tag', component: page(() => import('@/pages/tag.vue')), + loginRequired: true, }, { path: '/pages/new', component: page(() => import('@/pages/page-editor/page-editor.vue')), @@ -306,9 +314,11 @@ const routes: RouteDef[] = [{ }, { path: '/play/:id', component: page(() => import('@/pages/flash/flash.vue')), + loginRequired: true, }, { path: '/play', component: page(() => import('@/pages/flash/flash-index.vue')), + loginRequired: true, }, { path: '/gallery/:postId/edit', component: page(() => import('@/pages/gallery/edit.vue')), @@ -320,9 +330,11 @@ const routes: RouteDef[] = [{ }, { path: '/gallery/:postId', component: page(() => import('@/pages/gallery/post.vue')), + loginRequired: true, }, { path: '/gallery', component: page(() => import('@/pages/gallery/index.vue')), + loginRequired: true, }, { path: '/channels/:channelId/edit', component: page(() => import('@/pages/channel-editor.vue')), @@ -334,9 +346,11 @@ const routes: RouteDef[] = [{ }, { path: '/channels/:channelId', component: page(() => import('@/pages/channel.vue')), + loginRequired: true, }, { path: '/channels', component: page(() => import('@/pages/channels.vue')), + loginRequired: true, }, { path: '/custom-emojis-manager', component: page(() => import('@/pages/custom-emojis-manager.vue')), diff --git a/packages/frontend/src/ui/visitor.vue b/packages/frontend/src/ui/visitor.vue index 7d8677e3b..ef5b2556b 100644 --- a/packages/frontend/src/ui/visitor.vue +++ b/packages/frontend/src/ui/visitor.vue @@ -18,9 +18,6 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.ts.home }} - {{ i18n.ts.timeline }} - {{ i18n.ts.explore }} - {{ i18n.ts.channel }}