From 3c81926f71f04b43455dd6a5e6302eb2c35f58ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=8B=E3=81=A3=E3=81=93=E3=81=8B=E3=82=8A?= <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Sun, 22 Dec 2024 13:36:17 +0900 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20serverContext=E3=81=AE?= =?UTF-8?q?=E5=80=A4=E3=82=92=E5=88=A9=E7=94=A8=E3=81=99=E3=82=8B=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=E3=81=8C=E9=96=93=E9=81=95=E3=81=A3=E3=81=A6=E3=81=84?= =?UTF-8?q?=E3=81=9F=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20(#15166)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/pages/clip.vue | 2 +- packages/frontend/src/pages/note.vue | 2 +- packages/frontend/src/pages/user/index.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/frontend/src/pages/clip.vue b/packages/frontend/src/pages/clip.vue index c925bac4d9c4..224bc51599e9 100644 --- a/packages/frontend/src/pages/clip.vue +++ b/packages/frontend/src/pages/clip.vue @@ -49,7 +49,7 @@ import { genEmbedCode } from '@/scripts/get-embed-code.js'; import { assertServerContext, serverContext } from '@/server-context.js'; // contextは非ログイン状態の情報しかないためログイン時は利用できない -const CTX_CLIP = $i && assertServerContext(serverContext, 'clip') ? serverContext.clip : null; +const CTX_CLIP = !$i && assertServerContext(serverContext, 'clip') ? serverContext.clip : null; const props = defineProps<{ clipId: string, diff --git a/packages/frontend/src/pages/note.vue b/packages/frontend/src/pages/note.vue index 6eca04db8da8..e6b4a0b2226e 100644 --- a/packages/frontend/src/pages/note.vue +++ b/packages/frontend/src/pages/note.vue @@ -67,7 +67,7 @@ import { serverContext, assertServerContext } from '@/server-context.js'; import { $i } from '@/account.js'; // contextは非ログイン状態の情報しかないためログイン時は利用できない -const CTX_NOTE = $i && assertServerContext(serverContext, 'note') ? serverContext.note : null; +const CTX_NOTE = !$i && assertServerContext(serverContext, 'note') ? serverContext.note : null; const props = defineProps<{ noteId: string; diff --git a/packages/frontend/src/pages/user/index.vue b/packages/frontend/src/pages/user/index.vue index c5cda7993591..4787db5dbe78 100644 --- a/packages/frontend/src/pages/user/index.vue +++ b/packages/frontend/src/pages/user/index.vue @@ -54,7 +54,7 @@ const XGallery = defineAsyncComponent(() => import('./gallery.vue')); const XRaw = defineAsyncComponent(() => import('./raw.vue')); // contextは非ログイン状態の情報しかないためログイン時は利用できない -const CTX_USER = $i && assertServerContext(serverContext, 'user') ? serverContext.user : null; +const CTX_USER = !$i && assertServerContext(serverContext, 'user') ? serverContext.user : null; const props = withDefaults(defineProps<{ acct: string;