fix(chat): redirect unauthenticated users from chat

This commit is contained in:
2026-06-17 19:44:22 +08:00
parent bb40f3c042
commit e4b1690b45
4 changed files with 47 additions and 22 deletions
+3
View File
@@ -15,6 +15,8 @@ export interface AuthState {
errorMessage: string | null;
/** 当前登录状态(未登录 / 游客 / OAuth / 邮箱) */
loginStatus: LoginStatus;
/** 启动时的本地登录态恢复是否已经完成 */
hasInitialized: boolean;
/**
* 一次性的"刚按了"信号 —— Skip / Facebook / 邮箱登录按钮刚派事件 → 置 true
* → splash-screen / auth-screen 看到 `pendingRedirect && loginStatus !== "notLoggedIn"` 触发跳转
@@ -35,5 +37,6 @@ export const initialState: AuthState = {
confirmPassword: "",
errorMessage: null,
loginStatus: "notLoggedIn",
hasInitialized: false,
pendingRedirect: false,
};