summaryrefslogtreecommitdiff
path: root/packages/client
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2022-07-17 05:12:22 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2022-07-17 05:12:22 +0900
commit77d4d6e3777d33615cb874a3ed2c71fb24e62f11 (patch)
treec53d8a09ae4867265b0846e9fa04ada0cf1efde0 /packages/client
parent12.116.0 (diff)
downloadmisskey-77d4d6e3777d33615cb874a3ed2c71fb24e62f11.tar.gz
misskey-77d4d6e3777d33615cb874a3ed2c71fb24e62f11.tar.bz2
misskey-77d4d6e3777d33615cb874a3ed2c71fb24e62f11.zip
fix(client): デッキUI時に ページで表示 ボタンが機能しない問題を修正
Fix #9010
Diffstat (limited to 'packages/client')
-rw-r--r--packages/client/src/components/page-window.vue2
-rw-r--r--packages/client/src/nirax.ts6
-rw-r--r--packages/client/src/ui/deck.vue3
3 files changed, 6 insertions, 5 deletions
diff --git a/packages/client/src/components/page-window.vue b/packages/client/src/components/page-window.vue
index 5b06c7718c..98140b95c0 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 4efa0345af..4ba1fe70f6 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<RouteDef | null> = 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 8c9e52063d..20b955ddb9 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);