From 16b50fc6a90c88f100fbd3d30110f13d4b910700 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sat, 27 May 2023 12:01:00 +0000 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E3=83=87=E3=83=83=E3=82=AD?= =?UTF-8?q?=E3=83=A2=E3=83=BC=E3=83=89=E3=81=8B=E3=81=A4=E7=9B=B4=E6=8E=A5?= =?UTF-8?q?/=E4=BB=A5=E5=A4=96=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=97?= =?UTF-8?q?=E3=81=9F=E3=81=A8=E3=81=8D=E3=81=AB=E3=83=87=E3=83=83=E3=82=AD?= =?UTF-8?q?=E3=81=8C=E8=A1=A8=E7=A4=BA=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20Fix=20#10905?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/boot/main-boot.ts | 2 +- packages/frontend/src/ui/deck.vue | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/boot/main-boot.ts b/packages/frontend/src/boot/main-boot.ts index 76e8c5072..c0bfa4603 100644 --- a/packages/frontend/src/boot/main-boot.ts +++ b/packages/frontend/src/boot/main-boot.ts @@ -16,7 +16,7 @@ import { initializeSw } from '@/scripts/initialize-sw'; export async function mainBoot() { const { isClientUpdated } = await common(() => createApp( - new URLSearchParams(window.location.search).has('zen') || (ui === 'deck' && location.pathname !== '/') ? defineAsyncComponent(() => import('@/ui/zen.vue')) : + new URLSearchParams(window.location.search).has('zen') ? defineAsyncComponent(() => import('@/ui/zen.vue')) : !$i ? defineAsyncComponent(() => import('@/ui/visitor.vue')) : ui === 'deck' ? defineAsyncComponent(() => import('@/ui/deck.vue')) : ui === 'classic' ? defineAsyncComponent(() => import('@/ui/classic.vue')) : diff --git a/packages/frontend/src/ui/deck.vue b/packages/frontend/src/ui/deck.vue index 126aa807a..18595d434 100644 --- a/packages/frontend/src/ui/deck.vue +++ b/packages/frontend/src/ui/deck.vue @@ -130,6 +130,14 @@ mainRouter.navHook = (path, flag): boolean => { return false; }; +if (mainRouter.currentRoute.value.path !== '/') { + const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main'); + if (deckStore.state.navWindow || noMainColumn) { + os.pageWindow(mainRouter.currentRoute.value.path); + mainRouter.replace('/'); + } +} + const isMobile = ref(window.innerWidth <= 500); window.addEventListener('resize', () => { isMobile.value = window.innerWidth <= 500;