From 72b6de499e0b6938cd212d81d22f3652a49da26a Mon Sep 17 00:00:00 2001 From: JiaJun <2394389886@qq.com> Date: Mon, 1 Jun 2026 17:46:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(auth):=20=E8=A7=A3=E5=86=B3=E8=AE=A4?= =?UTF-8?q?=E8=AF=81=E9=94=99=E8=AF=AF=E5=A4=84=E7=90=86=E5=92=8C=E4=BC=9A?= =?UTF-8?q?=E8=AF=9D=E7=AE=A1=E7=90=86=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 替换 AUTH_INVALID_TOKEN_CODE 为 AUTH_RELOGIN_REQUIRED_CODES 数组支持多种错误码 - 实现 hasClearableSessionState 和 hasRecordedUnauthorizedSession 函数优化会话清理逻辑 - 添加 clearQueryCache 选项控制查询缓存清理行为 - 修复马来西亚手机号正则验证模式导致的用户名验证问题 - 更新 API 错误消息处理优先级,优先使用服务端返回的消息 - 添加服务器消息检查函数 hasServerMessage 避免重复错误提示 - 在登录表单中实现密码可见性切换功能 - 添加密码可见性国际化文案支持 - 实现页面历史记录抽屉组件和相关动效 - 优化模态框背景遮罩样式和键盘事件处理 - 调整多个组件的 z-index 层级避免显示冲突 --- AGENTS.md | 2 +- CLAUDE.md | 2 +- figma/img.jpg | Bin 0 -> 901544 bytes public/favicon.svg | 2989 ++++++++++++++++- src/assets/system/chat.webp | Bin 0 -> 8304 bytes src/components/app-boot-resource-gate.tsx | 2 +- src/components/center-modal.tsx | 35 +- src/components/fullscreen-lottie-overlay.tsx | 13 +- src/components/ui/notification-alert.tsx | 2 +- src/constants/auth.ts | 7 + src/constants/game.ts | 1 + src/constants/system.ts | 4 +- src/features/auth/api/auth-api.ts | 7 +- .../components/desktop-auth-form-parts.tsx | 40 +- .../components/desktop-login-form-view.tsx | 10 +- .../auth/components/desktop-login-form.tsx | 8 +- .../components/desktop-register-form-view.tsx | 14 +- .../auth/components/desktop-register-form.tsx | 8 +- src/features/auth/hooks/auth-error-key.ts | 20 + src/features/auth/schema/auth-schema.ts | 3 - src/features/game/api/game-api.ts | 4 +- src/features/game/api/period-history-api.ts | 47 + .../desktop/desktop-animal-overlay.tsx | 8 +- .../components/desktop/desktop-control.tsx | 17 +- .../components/desktop/desktop-status.tsx | 9 +- .../game/components/desktop/desktop-title.tsx | 34 +- .../shared/entry-notice-gate-modal.tsx | 22 +- .../components/shared/period-history-list.tsx | 113 + .../shared/round-betting-start-alert.tsx | 2 +- src/features/game/entry/entry-page.tsx | 10 + src/features/game/entry/pc-entry.tsx | 4 + src/features/game/hooks/use-animal-vm.ts | 12 +- src/features/game/hooks/use-app-language.ts | 9 +- .../game/hooks/use-deposit-tier-list.ts | 4 +- .../game/hooks/use-deposit-withdraw-config.ts | 4 +- .../game/hooks/use-game-realtime-sync.ts | 33 +- .../game/hooks/use-period-history-vm.ts | 73 + .../modal/desktop/desktop-login-modal.tsx | 1 + .../desktop/desktop-period-history-drawer.tsx | 181 + .../modal/desktop/desktop-register-modal.tsx | 1 + src/i18n/index.ts | 37 +- src/lib/api/api-client.ts | 7 +- src/lib/auth/auth-session.ts | 51 +- src/lib/dom/body-scroll-lock.ts | 24 + src/locales/en-US/common.ts | 12 + src/locales/id-ID/common.ts | 12 + src/locales/ms-MY/common.ts | 12 + src/locales/zh-CN/common.ts | 12 + src/store/auth/auth-store.ts | 4 + src/store/modal/modal-store.ts | 9 + src/style/index.css | 26 +- 51 files changed, 3812 insertions(+), 149 deletions(-) create mode 100644 figma/img.jpg create mode 100644 src/assets/system/chat.webp create mode 100644 src/features/game/api/period-history-api.ts create mode 100644 src/features/game/components/shared/period-history-list.tsx create mode 100644 src/features/game/hooks/use-period-history-vm.ts create mode 100644 src/features/game/modal/desktop/desktop-period-history-drawer.tsx create mode 100644 src/lib/dom/body-scroll-lock.ts diff --git a/AGENTS.md b/AGENTS.md index 9d24f43..e4b2b30 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,7 +1,7 @@ # GitNexus — Code Intelligence -This project is indexed by GitNexus as **36-character-flower** (2566 symbols, 4898 relationships, 220 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **36-character-flower** (2639 symbols, 5033 relationships, 226 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. diff --git a/CLAUDE.md b/CLAUDE.md index 9d24f43..e4b2b30 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,7 +1,7 @@ # GitNexus — Code Intelligence -This project is indexed by GitNexus as **36-character-flower** (2566 symbols, 4898 relationships, 220 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. +This project is indexed by GitNexus as **36-character-flower** (2639 symbols, 5033 relationships, 226 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely. > If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first. diff --git a/figma/img.jpg b/figma/img.jpg new file mode 100644 index 0000000000000000000000000000000000000000..633cb606f663a5fab27fd43a9fc18c9798c67ad7 GIT binary patch literal 901544 zcmbrlbzD?W^f!KCmsq+5sRfo61ZnBsrCCY|r4eN5?o?2^q!FZ3X%Q)rmPJ~YP66re zAD`#@`n{g#pXc|_@7&kDb9T;|nfKg@opbKY-SpieK&GaGPyw*8008U$0`8WvrV)yY zFLjXGDhLhb{}J>7_XHLI0F;x58&XvP`s}$e6mRi=Qv4^guyS|#FZ{pIeZHrY|K$z< zV|@P?o&T?Bh_#Ko)xE<0{S9-wFZ>=X)jdyT_dh(>f4t@Y@KXQr-X1O<_c}WN@oxG^ z#e3fRp69arKX}XkgST>V`%gdSUPlV$==on+|IvSliENw<^zK9a`r}M*tv=0DwmH|Bn0L@5IHz&EkJ$2flw| z+u8!aVF>^bKL-HH5da`C`Cqd8$NvQz^j^epkIVV~vI86e8vqI*04Kl-;J@dd00Mv@ zAbN)Z6z`k!{~!IA$^X9`?o;1&0Oa_fD%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