refactor(auth): rename loginType to loginStatus and update related logic

This commit is contained in:
2026-06-11 12:04:48 +08:00
parent 72941d9c9f
commit b50191ed50
7 changed files with 41 additions and 30 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* 登录状态枚举
*
* 原始 Dart: lib/ui/auth/bloc/auth_state.dart 的 `LoginType` 枚举(v7.0 新增)。
*
* 2025-XX 改造:语义从"登录方式"扩展为"当前登录状态"——
* 包含 notLoggedIn / guest / 各 OAuth provider 登录后态。
*
* 字段命名(state)从 `loginType` 改为 `loginStatus`,更贴合语义。
*/
export const LoginStatus = {
/** 未登录(默认初值) */
NotLoggedIn: "notLoggedIn",
/** 游客登录(无需账号,10 轮免费消息) */
Guest: "guest",
/** Facebook OAuth 登录 */
Facebook: "facebook",
/** Google OAuth 登录 */
Google: "google",
/** 邮箱 + 密码登录 */
Email: "email",
/** Apple ID 登录 */
Apple: "apple",
} as const;
export type LoginStatus = (typeof LoginStatus)[keyof typeof LoginStatus];