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
+31
View File
@@ -0,0 +1,31 @@
import type { PayChannel } from "@/data/dto/payment";
import type {
PendingChatUnlockKind,
PendingChatUnlockStage,
} from "@/data/storage/navigation";
export type AppSubscriptionType = "vip" | "topup";
export type AppSubscriptionReturnTo = "chat" | null;
export interface OpenSubscriptionInput {
type: AppSubscriptionType;
payChannel?: PayChannel;
returnTo?: AppSubscriptionReturnTo;
replace?: boolean;
}
export interface StartMessageUnlockInput {
messageId: string;
kind: PendingChatUnlockKind;
returnUrl: string;
stage?: PendingChatUnlockStage;
onAuthenticated: () => void;
}
export interface OpenSubscriptionForPendingUnlockInput {
messageId: string;
kind: PendingChatUnlockKind;
returnUrl: string;
type: AppSubscriptionType;
payChannel?: PayChannel;
}