From 76dc7affe0fef3cc8d8c20a12f3a8cb182d4cb42 Mon Sep 17 00:00:00 2001
From: syuilo <4439005+syuilo@users.noreply.github.com>
Date: Fri, 14 Mar 2025 20:29:39 +0900
Subject: [PATCH] wip
---
packages/frontend/src/components/MkNote.vue | 15 ++++++++++++---
packages/frontend/src/components/global/MkA.vue | 8 +++++++-
packages/frontend/src/di.ts | 3 ++-
packages/frontend/src/nirax.ts | 2 +-
4 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/packages/frontend/src/components/MkNote.vue b/packages/frontend/src/components/MkNote.vue
index 2467a423e9..360f80d6fe 100644
--- a/packages/frontend/src/components/MkNote.vue
+++ b/packages/frontend/src/components/MkNote.vue
@@ -177,7 +177,7 @@ SPDX-License-Identifier: AGPL-3.0-only
diff --git a/packages/frontend/src/di.ts b/packages/frontend/src/di.ts
index d96eeebca1..58695f4772 100644
--- a/packages/frontend/src/di.ts
+++ b/packages/frontend/src/di.ts
@@ -4,7 +4,7 @@
*/
import type { InjectionKey, Ref } from 'vue';
-import type { IRouter } from '@/nirax.js';
+import type { IRouter, RouterFlag } from '@/nirax.js';
export const DI = {
routerCurrentDepth: Symbol() as InjectionKey,
@@ -12,4 +12,5 @@ export const DI = {
viewId: Symbol() as InjectionKey,
viewTransitionId: Symbol() as InjectionKey[>,
mock: Symbol() as InjectionKey,
+ navHook: Symbol() as InjectionKey<(path: string, flag?: RouterFlag) => void>,
};
diff --git a/packages/frontend/src/nirax.ts b/packages/frontend/src/nirax.ts
index ea3f1fb01a..31d15faf73 100644
--- a/packages/frontend/src/nirax.ts
+++ b/packages/frontend/src/nirax.ts
@@ -37,7 +37,7 @@ interface RouteDefWithRedirect extends RouteDefBase {
export type RouteDef = RouteDefWithComponent | RouteDefWithRedirect;
-export type RouterFlag = 'forcePage';
+export type RouterFlag = 'forcePage' | null;
type ParsedPath = (string | {
name: string;
]