refactor(router): introduce app navigation manager

This commit is contained in:
2026-07-03 14:09:13 +08:00
parent 8a586e4471
commit 91dde42f92
23 changed files with 669 additions and 277 deletions
-20
View File
@@ -48,26 +48,6 @@ export const ROUTE_BUILDERS = {
`${ROUTES.auth}?redirect=${encodeURIComponent(redirectTo)}` as const,
} as const;
/** 仅未登录态可见的路由(命中后已登录用户应跳走) */
export const AUTH_ONLY_ROUTES: readonly StaticRoute[] = [
ROUTES.splash,
ROUTES.auth,
] as const;
/** 仅登录态可见的路由(命中后未登录用户应跳走) */
export const PROTECTED_ROUTES: readonly StaticRoute[] = [
ROUTES.chat,
ROUTES.sidebar,
ROUTES.subscription,
] as const;
/** 公开路由(游客态也允许访问) */
export const PUBLIC_ROUTES: readonly StaticRoute[] = [
ROUTES.chat,
ROUTES.sidebar,
ROUTES.coinsRules,
] as const;
/** 所有静态路由,供 `proxy.ts` matcher 与未来 sitemap 使用 */
export const ALL_STATIC_ROUTES: readonly StaticRoute[] = [
ROUTES.splash,