Commit Graph

32 Commits

Author SHA1 Message Date
4707101da4 refactor: 统一玩家端时间格式化方法并移除冗余本地时间工具 2026-06-09 15:06:48 +08:00
36adf8699d feat: enhance wallet functionality and improve error handling
- Updated .env.example to include optional player site code configuration.
- Modified error messages in hall-bet-errors for better clarity.
- Improved the betting grid logic to handle invalid draw IDs and reload draws when necessary.
- Adjusted wallet components to differentiate between credit and main wallet balances, including new translations for credit-related terms.
- Enhanced wallet logs to support credit activity tracking and improved UI for displaying credit information.
2026-06-05 18:01:11 +08:00
b819894e75 feat: 增强 iframe 通信机制与通知处理功能
实现 resolvePostMessageTargetOrigin,优化 iframe 消息通信中的目标来源(origin)解析与校验。
更新 IframeBridge:支持定期刷新允许的来源列表,并优化消息事件管理机制。
重构 usePendingWalletReconcile:优化待对账通知的获取与缓存逻辑,提升性能与用户体验。
增强 NotificationsScreen:新增待对账通知内容,并优化界面展示效果。
更新英文、尼泊尔语与中文语言包,新增待对账通知相关翻译文案。
2026-06-01 13:38:30 +08:00
aeaba5eea3 feat: enhance notification system and integrate DOMPurify for HTML sanitization
- Added `dompurify` for improved HTML sanitization in the play rules.
- Updated `PlayerNotificationBell` component to handle unread notifications and improve user interaction.
- Enhanced `usePendingWalletReconcile` hook to manage unread notifications and mark them as read.
- Added new translations for notification-related texts in English, Nepali, and Chinese to support multilingual users.
2026-06-01 11:32:18 +08:00
9f43d07778 fix: improve Reverb WebSocket connect and reconnect handling
Avoid premature polling fallback while Pusher is connecting, schedule
reconnect after disconnect, and disable Pusher stats for Reverb.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-30 09:52:42 +08:00
4fc2b38a40 refactor: 更新环境配置与 API 代理逻辑
- 修改 .env.example,优化玩家端配置说明,明确本地与线上环境的使用方式。
- 重构 API 代理逻辑,移除过时的开发代理文件,统一使用 Next.js 代理 API 请求。
- 更新 CSP 配置,简化连接来源说明,提升安全性。
- 调整 lottery-api-base.ts 中的注释,增强代码可读性。
2026-05-29 15:55:19 +08:00
2bc1d4748a chore: 更新 .gitignore 文件以排除 pm2 日志目录
更新 .gitignore,新增对 pm2 日志目录的忽略规则,以优化项目文件管理。
2026-05-29 14:52:48 +08:00
55bd56116d feat: 重构环境配置与 API 处理逻辑
更新 .env.example,补充玩家端本地开发配置说明,并新增直连 Laravel 服务及局域网访问相关配置选项。
重构 middleware.ts:使用新的 API 请求路径构建方法,提升代码清晰度与可维护性。
移除 next.config.ts 中已弃用的 API_BASE_URL 配置,简化 API 请求处理流程。
调整 lottery-http 以适配新的 API 基础地址解析机制,提升代码维护性。
优化 CSP(内容安全策略)配置,精简连接来源白名单管理,进一步增强安全性。
2026-05-29 11:48:33 +08:00
03faed1db6 feat: 更新 API 路径配置并优化环境变量管理
- 修改 .env.example,更新玩家端本地配置说明,新增直连 Laravel 和局域网 IP 访问配置项,提升开发灵活性。
- 更新 middleware.ts,使用新的 LOTTERY_API_V1_BASE 常量构建 API 请求路径,简化代码结构。
- 在 next.config.ts 中引入 parseAllowedDevOrigins 函数,动态解析允许的开发来源,增强安全性。
- 重构多个 API 模块,移除 API_V1_PREFIX,直接使用相对路径,简化 API 调用逻辑,提高可维护性。
2026-05-29 10:28:43 +08:00
1316a62ce3 feat: 更新环境配置并增强 iframe 安全处理机制
修改 .env.example,优化环境切换说明,并新增 API_BASE_URL 配置项,提升配置管理能力。
更新 next.config.ts:使用 API_BASE_URL 代理 API 请求,增强开发与生产环境的灵活性。
重构 iframe-bridge 与 use-token-refresh 组件,采用新的 iframe 来源校验方法,提升安全性检查能力。
优化 csp-config.ts:动态注入允许的父级来源(parent origins)到 CSP 配置中,强化安全策略。
调整 lottery-http:通过 Next.js 代理转发 API 请求,简化 API 调用流程。
2026-05-28 10:12:24 +08:00
58afa8e844 feat: 增强开奖 API 的币种支持并优化钱包处理逻辑
更新 getDrawCurrent、getDrawResults 与 getDrawResultByNo 方法,新增币种参数支持,以适配玩家币种偏好。
优化 HallBettingGrid 及相关组件:支持币种切换时自动刷新钱包数据。
重构钱包处理逻辑,简化余额更新流程并提升用户体验。
新增会话过期相关多语言提示文案,并优化现有翻译内容,提升多语言环境下的提示清晰度。
2026-05-27 16:52:12 +08:00
ab81da3199 feat: 增强注单处理逻辑并优化用户反馈体验
新增注单错误处理逻辑,支持已退款及待确认状态的异常场景处理。
更新 HallBetResultDialog:针对部分失败与已退款订单显示对应提示信息。
优化注单分组逻辑,新增订单状态处理,提升整体订单管理能力。
新增订单状态与用户通知相关多语言翻译,进一步提升用户体验。
2026-05-26 16:32:53 +08:00
d768a3f6ba feat: enhance wallet transfer handling and improve HTML safety
- Added emitWalletRefresh function to trigger wallet refresh events after successful transfers and error handling.
- Introduced removeScriptTags function to sanitize HTML content by removing script tags, preventing potential security issues.
- Updated transfer handling logic to ensure wallet refresh is emitted in relevant scenarios, improving user experience.
2026-05-26 09:57:08 +08:00
3c2664e02c feat: enhance draw status and scheduling display
- Updated DrawStatusHud to include a new countdown kind "start" for better status representation.
- Refactored HallDrawPanel to improve time display logic, differentiating between scheduled start and close times.
- Added new translations for scheduled start and close times in multiple languages.
- Enhanced time formatting functions to support new scheduling features and improve user experience.
2026-05-25 18:01:26 +08:00
ca3a1db770 feat: enhance player panel and draw status handling
- Refactored PlayerPanel layout for improved title positioning and responsiveness.
- Added new function to check if betting is blocked based on hall status.
- Updated HallDrawPanel to utilize the new betting status check and display appropriate messages.
- Enhanced i18n support with new notices for review and non-bettable states across multiple languages.
2026-05-25 15:35:50 +08:00
3649bb9300 feat: implement initial language resolution for SSR and local storage support
- Added a function to determine the initial language based on server-side rendering and local storage.
- Updated i18n initialization to use the resolved initial language instead of the default.
2026-05-25 14:54:31 +08:00
9bd7cc9b9e feat: add jackpot animations and enhance currency handling across components
- Introduced new CSS animations for jackpot effects to improve visual engagement.
- Integrated CurrencySwitcher into PlayerPanel and HallScreen for better currency management.
- Updated various components to utilize active player currency for consistent display.
- Enhanced event handling for currency changes to ensure real-time updates across the application.
2026-05-25 14:31:38 +08:00
2bf44e4c29 feat: 优化语言切换下拉交互并支持玩法规则多语言内容 2026-05-22 16:55:45 +08:00
0cd85ae287 feat: enhance UI consistency and improve spacing across components
- Added styles for player-side toast notifications to improve user feedback.
- Adjusted padding and spacing in various components for a more cohesive layout.
- Updated card and dialog components to streamline visual hierarchy and enhance readability.
- Refactored player panel and navigation elements for better alignment and user experience.
2026-05-21 17:28:06 +08:00
6b18e25766 feat: 接入公开币种目录并统一多币种金额与语言初始化处理 2026-05-21 15:14:00 +08:00
418b446c09 feat: 优化下注结果展示与大厅表单交互,适配新端口配置 2026-05-18 11:28:41 +08:00
f2c7f5e4f1 refactor: 完成全站国际化改造,统一多语言支持
此提交完成了全项目的国际化适配:
1. 新增多语言翻译文件与基础配置
2. 替换所有硬编码文本为i18n调用
3. 优化语言切换与文档语言同步逻辑
4. 重构部分业务逻辑以支持动态翻译
5. 移除过时代码与硬编码配置
2026-05-15 10:41:14 +08:00
587a6ad66c feat: 增强国际化支持与安全头配置
- 在 .env.example 中新增 i18next 相关配置项以支持多语言功能
- 在 next.config.ts 中添加安全头配置以支持 iframe 嵌入
- 更新 Providers 组件以引入 i18n 配置
- 在 PlayerAppShell 中集成 LanguageSwitcher 组件以实现语言切换功能
- 优化 HallWalletStrip 组件的网络状态管理逻辑
- 更新多个组件以支持国际化文本
2026-05-13 17:53:56 +08:00
c8f8f90515 feat: 集成错误处理与网络状态管理
- 在 Providers 组件中引入 ErrorProvider 以处理全局错误状态
- 更新 PlayerAppShell 组件的注释,说明网络状态横幅的用途
- 在 lotteryHttp 中添加对 500、502、503 错误的处理,更新全局错误状态
- 导出 useNetworkStatus 和 useIsOffline 钩子以支持网络状态管理
2026-05-13 15:14:02 +08:00
377e03e167 feat: 增强结果展示与用户交互
- 在 PlayerBottomNav 中新增注单导航选项
- 在 DrawResultDetailScreen 中添加高亮显示用户命中号码的功能,并显示个人派彩信息
- 在 DrawResultsListScreen 中引入 JackpotResultsStrip 组件以展示奖池信息
- 在 TwentyThreeResultsGrid 中实现命中号码的高亮效果,提升用户体验
2026-05-11 15:40:42 +08:00
ea75120269 feat: 增强大厅与结果展示功能
- 在 .env.example 中新增可选配置项 NEXT_PUBLIC_LOTTERY_PLAY_CURRENCY
- 在 API 模块中导出 getPlayEffective 函数
- 在 HallScreen 组件中引入 HallPlayCatalogPanel 以展示玩法目录
- 在多个屏幕组件中使用 queueMicrotask 优化数据加载逻辑
- 在 lottery-locale.ts 中新增 getLotteryRequestLocale 函数以支持语言选择
- 在类型定义中新增与玩法相关的类型导出
2026-05-11 10:09:06 +08:00
7e28cc154a feat: 更新依赖与增强功能
- 在 package.json 和 package-lock.json 中新增 laravel-echo 和 pusher-js 依赖
- 在 API 模块中新增 draw 相关函数的导出
- 在 PlayerAppShell 组件中引入 PlayerBottomNav 以增强底部导航
- 在 HallScreen 组件中引入 HallDrawPanel 以展示当前期号
2026-05-09 17:40:26 +08:00
3ae2c0e7d1 feat:根据浏览器日期格式化 2026-05-09 15:32:58 +08:00
7743c14e83 feat: 增强钱包 API 与玩家会话管理
- 新增钱包 API 函数:getWalletLogs(获取钱包日志)、postWalletTransferIn(充值)及 postWalletTransferOut(提现)
- 更新钱包相关类型定义,提升类型安全性
- 改进玩家会话管理:若当前无玩家资料,则自动拉取玩家信息
- 增强入口网关对过期会话的错误处理能力
- 更新 UI 组件,以适配新的结构与功能
2026-05-09 15:22:08 +08:00
14c297fe1a feat: 接入玩家入口与API代理
- 新增 /api 重写代理,支持 LOTTERY_API_PROXY_TARGET 配置
- 玩家首页切换为 EntryGate,并移除 layout 对 PlayerAppShell 的包裹
- 请求层拆分语言头与玩家鉴权注入逻辑,引入 zustand 依赖
- 允许提交 .env.example 供本地配置参考
2026-05-09 10:17:39 +08:00
7bed43ac96 refactor: 封装请求 2026-05-09 09:25:13 +08:00
765b84e2b4 feat:初始化业务目录 2026-05-08 18:03:43 +08:00