feat: enhance API error handling and UI improvements
Some checks failed
lotteryfront CI / build (push) Has been cancelled

- Updated `getPublicCurrencies` and `getPlayerAuthCaptcha` functions to include `skipGlobalServerError` option, improving error handling for API requests.
- Refactored the NotFoundPage component to enhance mobile responsiveness and UI consistency, integrating `PlayerMobileViewport`.
- Improved the NetworkStatusBanner and OfflineBanner components by adding player banner height reference for better layout management.
- Updated Wallet components to utilize `PlayerMoneyDisplay` for consistent currency representation and added credit mode handling in various screens.
- Enhanced the WalletScreen and Transfer screens with loading panels and credit guard logic for better user experience during wallet operations.
This commit is contained in:
2026-06-22 10:50:52 +08:00
parent 34b851d7e1
commit ecb032f8cc
43 changed files with 756 additions and 297 deletions

View File

@@ -64,7 +64,9 @@
"captchaLoadFailed": "Failed to load captcha. Try again.",
"captchaLoading": "Loading…",
"captchaRefresh": "Refresh captcha",
"captchaFetch": "Tap to load"
"captchaFetch": "Tap to load",
"usernameInvalidCharset": "Username may only contain letters, numbers, dots (.), underscores, and hyphens",
"passwordMinLength": "Password must be at least 6 characters"
},
"errors": {
"noToken": "No authorization token found",

View File

@@ -47,7 +47,8 @@
"markRead": "Mark as read",
"markAllRead": "Mark all read",
"unreadCount_one": "{{count}} unread",
"unreadCount_other": "{{count}} unread"
"unreadCount_other": "{{count}} unread",
"creditEmptyHint": "Credit accounts have no main-site transfers; no pending reconciliation notifications."
},
"panel": {
"home": "Home"
@@ -88,7 +89,24 @@
"home": "Back home",
"hall": "Betting hall",
"results": "Results",
"wallet": "My wallet"
"wallet": "My wallet",
"funds": "Wallet / Credit"
},
"calendar": {
"months": {
"1": "January",
"2": "February",
"3": "March",
"4": "April",
"5": "May",
"6": "June",
"7": "July",
"8": "August",
"9": "September",
"10": "October",
"11": "November",
"12": "December"
}
},
"player": {
"fallback": "Player #{{id}}"
@@ -265,7 +283,9 @@
"processingProgress": "Processing tickets...",
"noWarnings": "No obvious risk was found in this preview.",
"warningsTitle": "Payout pool warning",
"warningsDescription": "The following numbers have high payout pool usage for this issue. Betting is still allowed, but the order may be rejected as sold out if capacity is insufficient."
"warningsDescription": "The following numbers have high payout pool usage for this issue. Betting is still allowed, but the order may be rejected as sold out if capacity is insufficient.",
"periodRebate": "Period rebate",
"periodRebateHint": "Rebate for this bet is settled in the billing period, not deducted at bet time."
},
"result": {
"title": "Bet placed",
@@ -283,6 +303,7 @@
"actual": "Actual deduction",
"orderNo": "Order No.",
"balanceAfter": "Remaining balance",
"creditBalanceAfter": "Available credit",
"items": "Successful line details",
"number": "Number",
"actualDeduct": "Deducted",
@@ -394,6 +415,7 @@
"outExceeds": "Transfer-out amount cannot exceed available balance.",
"pendingTitle": "Pending reconciliation",
"pendingDescription": "The following transfers have not been finally confirmed by the main site. Contact support if they do not arrive after a long time.",
"viewPendingReconcile": "View pending reconciliation ({{count}})",
"pendingStatus": "Processing",
"flowsTitle": "Wallet logs",
"creditFlowsTitle": "Credit activity",
@@ -521,7 +543,20 @@
"backToGroup": "Back to order detail",
"notFound": "Ticket does not exist or cannot be viewed.",
"noData": "No data",
"loadFailed": "Failed to load"
"loadFailed": "Failed to load",
"failReason": {
"2001": "This draw is closed; betting is not allowed",
"2003": "Insufficient balance or available credit",
"2004": "Invalid number format",
"2005": "Invalid play parameters",
"2006": "Invalid or non-bettable draw",
"2007": "Play not found or disabled",
"2008": "Odds config updated; please preview again",
"2009": "Order cannot be resubmitted",
"4001": "This number is sold out for this draw",
"draw_no_longer_open": "Draw is closed or not bettable",
"draw_cancelled": "Draw cancelled; stake refunded"
}
},
"results": {
"title": "Results",
@@ -588,6 +623,8 @@
"rules": {
"title": "Play Rules",
"subtitle": "2D / 3D / 4D, box plays, rebate, closing and sold-out rules",
"empty": "No play rules available",
"loadFailed": "Failed to load rules",
"quick": {
"title": "Prize Structure",
"description": "Each draw publishes 23 four-digit numbers. Settlement uses the odds snapshot locked when the bet was placed.",

View File

@@ -64,7 +64,9 @@
"captchaLoadFailed": "क्याप्चा लोड असफल। फेरि प्रयास गर्नुहोस्।",
"captchaLoading": "लोड हुँदै…",
"captchaRefresh": "क्याप्चा रिफ्रेस",
"captchaFetch": "लोड गर्न ट्याप गर्नुहोस्"
"captchaFetch": "लोड गर्न ट्याप गर्नुहोस्",
"usernameInvalidCharset": "प्रयोगकर्ता नाममा अक्षर, अंक, डट (.), अन्डरस्कोर र हाइफन मात्र हुन सक्छ",
"passwordMinLength": "पासवर्ड कम्तीमा ६ वर्ण हुनुपर्छ"
},
"errors": {
"noToken": "कुनै प्राधिकरण टोकन फेला परेन",

View File

@@ -47,7 +47,8 @@
"markRead": "पढिएको चिन्ह लगाउनुहोस्",
"markAllRead": "सबै पढिएको",
"unreadCount_one": "{{count}} नपढिएको",
"unreadCount_other": "{{count}} नपढिएको"
"unreadCount_other": "{{count}} नपढिएको",
"creditEmptyHint": "क्रेडिट खातामा मुख्य साइट ट्रान्सफर हुँदैन; मिलान बाँकी सूचना छैन।"
},
"panel": {
"home": "गृह"
@@ -88,7 +89,24 @@
"home": "गृहमा फर्कनुहोस्",
"hall": "बेटिङ हल",
"results": "नतिजा",
"wallet": "मेरो वालेट"
"wallet": "मेरो वालेट",
"funds": "वालेट / क्रेडिट"
},
"calendar": {
"months": {
"1": "जनवरी",
"2": "फेब्रुअरी",
"3": "मार्च",
"4": "अप्रिल",
"5": "मे",
"6": "जुन",
"7": "जुलाई",
"8": "अगस्त",
"9": "सेप्टेम्बर",
"10": "अक्टोबर",
"11": "नोभेम्बर",
"12": "डिसेम्बर"
}
},
"player": {
"fallback": "खेलाडी #{{id}}"
@@ -265,7 +283,9 @@
"processingProgress": "टिकट प्रक्रिया हुँदैछ...",
"noWarnings": "यस पूर्वावलोकनमा स्पष्ट जोखिम भेटिएन।",
"warningsTitle": "भुक्तानी पूल चेतावनी",
"warningsDescription": "यी नम्बरहरूमा यस इश्यूमा भुक्तानी पूल प्रयोग उच्च छ। बेट अझै गर्न सकिन्छ, तर क्षमता अपुग भए अर्डर sold out हुन सक्छ।"
"warningsDescription": "यी नम्बरहरूमा यस इश्यूमा भुक्तानी पूल प्रयोग उच्च छ। बेट अझै गर्न सकिन्छ, तर क्षमता अपुग भए अर्डर sold out हुन सक्छ।",
"periodRebate": "अवधि रिबेट",
"periodRebateHint": "यो बेटको रिबेट बिलिङ अवधिमा मिलाइन्छ, बेट समयमा कट्दैन।"
},
"result": {
"title": "बेट सफल",
@@ -283,6 +303,7 @@
"actual": "वास्तविक कट्टा",
"orderNo": "अर्डर नं.",
"balanceAfter": "बाँकी ब्यालेन्स",
"creditBalanceAfter": "उपलब्ध क्रेडिट",
"items": "सफल लाइन विवरण",
"number": "नम्बर",
"actualDeduct": "कट्टा",
@@ -386,6 +407,7 @@
"outExceeds": "ट्रान्सफर आउट रकम उपलब्ध ब्यालेन्सभन्दा बढी हुन सक्दैन।",
"pendingTitle": "मिलान बाँकी",
"pendingDescription": "यी ट्रान्सफरहरू मुख्य साइटबाट अन्तिम पुष्टि भएका छैनन्। लामो समयसम्म नआए support सम्पर्क गर्नुहोस्।",
"viewPendingReconcile": "मिलान बाँकी हेर्नुहोस् ({{count}})",
"pendingStatus": "प्रक्रिया हुँदैछ",
"flowsTitle": "वालेट लग",
"creditTitle": "क्रेडिट",
@@ -520,7 +542,20 @@
"backToGroup": "अर्डर विवरणमा फर्कनुहोस्",
"notFound": "टिकट छैन वा हेर्न अनुमति छैन।",
"noData": "डेटा छैन",
"loadFailed": "लोड असफल"
"loadFailed": "लोड असफल",
"failReason": {
"2001": "यो ड्र बन्द भयो; बेट गर्न मिल्दैन",
"2003": "ब्यालेन्स वा उपलब्ध क्रेडिट अपुग",
"2004": "अवैध नम्बर ढाँचा",
"2005": "अवैध play parameter",
"2006": "अवैध वा non-bettable ड्र",
"2007": "Play फेला परेन वा बन्द",
"2008": "Odds config अपडेट; पुन: preview गर्नुहोस्",
"2009": "अर्डर पुन: पेश गर्न मिल्दैन",
"4001": "यो नम्बर यस ड्रमा sold out",
"draw_no_longer_open": "ड्र बन्द वा बेट योग्य छैन",
"draw_cancelled": "ड्र रद्द; stake फिर्ता"
}
},
"results": {
"title": "नतिजा",
@@ -587,6 +622,8 @@
"rules": {
"title": "प्ले नियम",
"subtitle": "2D / 3D / 4D, box play, rebate, closing र sold-out नियम",
"empty": "खेल नियम उपलब्ध छैन",
"loadFailed": "नियम लोड असफल",
"quick": {
"title": "पुरस्कार संरचना",
"description": "हरेक ड्रमा 23 वटा 4 अंकका नम्बर प्रकाशित हुन्छन्। सेटलमेन्ट बेट राख्दा लक भएको odds snapshot अनुसार हुन्छ।",

View File

@@ -64,7 +64,9 @@
"captchaLoadFailed": "验证码加载失败,请重试",
"captchaLoading": "加载中…",
"captchaRefresh": "刷新验证码",
"captchaFetch": "点击获取"
"captchaFetch": "点击获取",
"usernameInvalidCharset": "账号只能使用字母、数字、点(.)、下划线和连字符",
"passwordMinLength": "密码至少需要 6 个字符"
},
"errors": {
"noToken": "未发现授权令牌",

View File

@@ -46,7 +46,8 @@
"markRead": "标记已读",
"markAllRead": "全部已读",
"unreadCount_one": "未读 {{count}} 条",
"unreadCount_other": "未读 {{count}} 条"
"unreadCount_other": "未读 {{count}} 条",
"creditEmptyHint": "信用盘无主站划转,暂无待对账通知。"
},
"panel": {
"home": "首页"
@@ -87,7 +88,24 @@
"home": "返回首页",
"hall": "投注大厅",
"results": "开奖结果",
"wallet": "我的钱包"
"wallet": "我的钱包",
"funds": "钱包 / 信用"
},
"calendar": {
"months": {
"1": "1月",
"2": "2月",
"3": "3月",
"4": "4月",
"5": "5月",
"6": "6月",
"7": "7月",
"8": "8月",
"9": "9月",
"10": "10月",
"11": "11月",
"12": "12月"
}
},
"player": {
"fallback": "玩家 #{{id}}"
@@ -263,7 +281,9 @@
"processingProgress": "正在处理注单...",
"noWarnings": "当前预览未发现明显风险。",
"warningsTitle": "赔付池预警",
"warningsDescription": "以下号码本期赔付池占用较高,仍允许下注;若实际占用不足将售罄拒单。"
"warningsDescription": "以下号码本期赔付池占用较高,仍允许下注;若实际占用不足将售罄拒单。",
"periodRebate": "账期回水",
"periodRebateHint": "本单回水计入账期统一结算,不在下注时即时抵扣。"
},
"placeAllFailed": "本次 {{failed}} 条注项均未成功",
"result": {
@@ -282,6 +302,7 @@
"actual": "实扣金额",
"orderNo": "订单号",
"balanceAfter": "剩余余额",
"creditBalanceAfter": "可用信用",
"items": "成功注项明细",
"number": "号码",
"actualDeduct": "实扣",
@@ -393,6 +414,7 @@
"outExceeds": "转出金额不能超过可用余额。",
"pendingTitle": "待对账",
"pendingDescription": "以下划转主站结果未最终确认;若长时间未到账请联系客服。",
"viewPendingReconcile": "查看待对账详情({{count}}",
"pendingStatus": "处理中",
"flowsTitle": "资金流水",
"creditFlowsTitle": "信用流水",
@@ -520,7 +542,20 @@
"backToGroup": "返回订单详情",
"notFound": "注单不存在或无权查看",
"noData": "无数据",
"loadFailed": "加载失败"
"loadFailed": "加载失败",
"failReason": {
"2001": "当期已封盘,无法下注",
"2003": "余额或可用信用不足",
"2004": "号码格式不合法",
"2005": "玩法参数无效",
"2006": "期号无效或不可下注",
"2007": "玩法不存在或已关闭",
"2008": "赔率配置已更新,请重新预览",
"2009": "订单不可重复提交",
"4001": "该号码本期额度已售罄",
"draw_no_longer_open": "期号已封盘或不可下注",
"draw_cancelled": "本期已取消,注单已退本"
}
},
"results": {
"title": "开奖结果",
@@ -587,6 +622,8 @@
"rules": {
"title": "玩法规则",
"subtitle": "2D / 3D / 4D、包号、回水、封盘与售罄说明",
"empty": "暂无玩法规则说明",
"loadFailed": "规则加载失败",
"quick": {
"title": "开奖结构",
"description": "每期开奖 23 组 4 位号码,结算以下注时锁定的赔率快照为准。",