From d771dd598b93c4d82c396a69e70b6e7b297e69f1 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jul 2022 05:12:22 +0900 Subject: [PATCH] =?UTF-8?q?fix(client):=20=E3=83=87=E3=83=83=E3=82=ADUI?= =?UTF-8?q?=E6=99=82=E3=81=AB=20=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7?= =?UTF-8?q?=E8=A1=A8=E7=A4=BA=20=E3=83=9C=E3=82=BF=E3=83=B3=E3=81=8C?= =?UTF-8?q?=E6=A9=9F=E8=83=BD=E3=81=97=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #9010 --- CHANGELOG.md | 7 +++++++ packages/client/src/components/page-window.vue | 2 +- packages/client/src/nirax.ts | 6 +++--- packages/client/src/ui/deck.vue | 3 ++- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf7522493..63f6c7f4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,13 @@ You should also include the user name that made the change. --> +## 12.x.x (unreleased) + +### Improvements + +### Bugfixes +- Client: デッキUI時に ページで表示 ボタンが機能しない問題を修正 @syuilo + ## 12.116.0 (2022/07/16) ### Improvements diff --git a/packages/client/src/components/page-window.vue b/packages/client/src/components/page-window.vue index 5b06c7718..98140b95c 100644 --- a/packages/client/src/components/page-window.vue +++ b/packages/client/src/components/page-window.vue @@ -122,7 +122,7 @@ function close() { } function expand() { - mainRouter.push(router.getCurrentPath()); + mainRouter.push(router.getCurrentPath(), 'forcePage'); windowEl.close(); } diff --git a/packages/client/src/nirax.ts b/packages/client/src/nirax.ts index 4efa0345a..4ba1fe70f 100644 --- a/packages/client/src/nirax.ts +++ b/packages/client/src/nirax.ts @@ -71,7 +71,7 @@ export class Router extends EventEmitter<{ private currentKey = Date.now().toString(); public currentRoute: ShallowRef = shallowRef(null); - public navHook: ((path: string) => boolean) | null = null; + public navHook: ((path: string, flag?: any) => boolean) | null = null; constructor(routes: Router['routes'], currentPath: Router['currentPath']) { super(); @@ -213,14 +213,14 @@ export class Router extends EventEmitter<{ return this.currentKey; } - public push(path: string) { + public push(path: string, flag?: any) { const beforePath = this.currentPath; if (path === beforePath) { this.emit('same'); return; } if (this.navHook) { - const cancel = this.navHook(path); + const cancel = this.navHook(path, flag); if (cancel) return; } this.navigate(path, null); diff --git a/packages/client/src/ui/deck.vue b/packages/client/src/ui/deck.vue index 8c9e52063..20b955ddb 100644 --- a/packages/client/src/ui/deck.vue +++ b/packages/client/src/ui/deck.vue @@ -89,7 +89,8 @@ import { mainRouter } from '@/router'; import { unisonReload } from '@/scripts/unison-reload'; const XStatusBars = defineAsyncComponent(() => import('@/ui/_common_/statusbars.vue')); -mainRouter.navHook = (path): boolean => { +mainRouter.navHook = (path, flag): boolean => { + if (flag === 'forcePage') return false; const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main'); if (deckStore.state.navWindow || noMainColumn) { os.pageWindow(path);