feat: enhance player login process with captcha validation and improve wallet display logic
Some checks failed
lotteryfront CI / build (push) Has been cancelled

- Added captcha validation to the player login screen, requiring users to input a captcha code for authentication.
- Implemented a new API call to fetch captcha images, improving security during login.
- Updated wallet display logic to ensure accurate representation of available and total balances based on player funding modes.
- Enhanced documentation in AGENTS.md to clarify changes in credit flow and login requirements.
This commit is contained in:
2026-06-17 15:27:06 +08:00
parent 9711909893
commit 2f1793e0cf
13 changed files with 211 additions and 20 deletions

View File

@@ -72,7 +72,7 @@ export function syncPreferredLanguage(): void {
}
if (!i18n.isInitialized) {
void i18n.use(initReactI18next).init({
i18n.use(initReactI18next).init({
resources,
fallbackLng: DEFAULT_LANGUAGE,
supportedLngs: ["en", "ne", "zh"],
@@ -81,6 +81,7 @@ if (!i18n.isInitialized) {
/** 与 SSR 一致首屏固定默认语言hydration 后再由 syncPreferredLanguage 切换 */
load: "languageOnly",
lng: DEFAULT_LANGUAGE,
initAsync: false,
interpolation: {
escapeValue: false,

View File

@@ -57,7 +57,14 @@
"submit": "Sign in",
"missingFields": "Please enter username and password",
"failed": "Sign-in failed",
"backEntry": "Back to entry"
"backEntry": "Back to entry",
"captcha": "Captcha",
"captchaPlaceholder": "Enter captcha",
"captchaRequired": "Please load the captcha first",
"captchaLoadFailed": "Failed to load captcha. Try again.",
"captchaLoading": "Loading…",
"captchaRefresh": "Refresh captcha",
"captchaFetch": "Tap to load"
},
"errors": {
"noToken": "No authorization token found",

View File

@@ -57,7 +57,14 @@
"submit": "लगइन",
"missingFields": "कृपया प्रयोगकर्ता नाम र पासवर्ड भर्नुहोस्",
"failed": "लगइन असफल",
"backEntry": "प्रवेशमा फर्कनुहोस्"
"backEntry": "प्रवेशमा फर्कनुहोस्",
"captcha": "क्याप्चा",
"captchaPlaceholder": "क्याप्चा प्रविष्ट गर्नुहोस्",
"captchaRequired": "कृपया पहिले क्याप्चा लोड गर्नुहोस्",
"captchaLoadFailed": "क्याप्चा लोड असफल। फेरि प्रयास गर्नुहोस्।",
"captchaLoading": "लोड हुँदै…",
"captchaRefresh": "क्याप्चा रिफ्रेस",
"captchaFetch": "लोड गर्न ट्याप गर्नुहोस्"
},
"errors": {
"noToken": "कुनै प्राधिकरण टोकन फेला परेन",

View File

@@ -57,7 +57,14 @@
"submit": "登录",
"missingFields": "请填写账号和密码",
"failed": "登录失败",
"backEntry": "返回入口"
"backEntry": "返回入口",
"captcha": "验证码",
"captchaPlaceholder": "请输入验证码",
"captchaRequired": "请先加载验证码",
"captchaLoadFailed": "验证码加载失败,请重试",
"captchaLoading": "加载中…",
"captchaRefresh": "刷新验证码",
"captchaFetch": "点击获取"
},
"errors": {
"noToken": "未发现授权令牌",