Commit Graph

67 Commits

Author SHA1 Message Date
34b851d7e1 ```
Some checks failed
lotteryfront CI / build (push) Has been cancelled
feat(player-auth): 登录接口增加站点代码参数

登录请求中添加 site_code 参数,该参数从环境变量
NEXT_PUBLIC_PLAYER_SITE_CODE 中获取,并通过
spread 操作符合并到请求体中
```
2026-06-18 14:45:28 +08:00
2f1793e0cf 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.
2026-06-17 15:27:06 +08:00
9711909893 feat: enhance iframe communication and caching mechanisms
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Improved the entry lifecycle management to prevent duplicate token requests and ensure smooth transitions.
- Updated the `resolvePostMessageTargetOrigin` function to return null when no allowed origins are present, enhancing security.
- Cached runtime origins to optimize performance and reduce unnecessary API calls.
- Added a new error message for frozen lottery wallets in the player notifications.
2026-06-16 17:08:34 +08:00
9a42f47ac7 feat: improve entry gate logic and lifecycle management
- Introduced a ref to manage entry lifecycle states, preventing duplicate entry attempts during loading and error handling.
- Updated entry handling to ensure proper state transitions and avoid flickering on success or failure pages.
- Enhanced token validation logic to streamline the entry process and improve user experience.
2026-06-14 23:09:45 +08:00
0b14e77f64 feat: enhance player login validation and update betting preview
- Added username and password validation to the player login screen, improving user feedback for input errors.
- Updated the betting preview dialog to conditionally display rebate information based on the applied instant rebate status.
- Enhanced documentation in AGENTS.md to clarify credit flow and settlement processes.
- Modified .env.example to provide clearer instructions for multi-site deployment configurations.
2026-06-14 21:13:24 +08:00
7c283627d3 docs: 新增 AI 代理学习偏好与信用盘术语规范
feat: 优化登录与入口页面加载体验

- 为登录页面添加 Suspense 边界,统一 fallback 样式
- 重构入口守卫逻辑,在布局阶段处理未登录重定向,避免闪烁
- 登录页面支持会话过期提示,并自动清理 URL 参数

feat: 信用盘与钱包盘文案差异化展示

- 底部导航「钱包」标签在信用盘模式下显示为「信用」
- 大厅余额条在信用盘模式下使用「可
2026-06-12 20:48:10 +08:00
20d2befa55 refactor: 引入 SWR 统一钱包余额查询与轮询逻辑 2026-06-10 13:58:26 +08:00
4707101da4 refactor: 统一玩家端时间格式化方法并移除冗余本地时间工具 2026-06-09 15:06:48 +08:00
2ddba8462e fix: 优化嵌入登录等待态并修复大厅与订单筛选交互 2026-06-08 17:42:04 +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
3cd87ce014 fix: update draw results list to skip the first item and modify translation for processed status
- Adjusted the draw results list to skip the first item in the display.
- Updated translations for "manually_processed" in English, Nepali, and Chinese to "Case closed" and its equivalents.
2026-06-03 10:57:01 +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
10bee1b857 refactor: update environment configuration and enhance notification handling
- Refactored ecosystem configuration to utilize .env for sensitive variables, improving security and flexibility.
- Replaced direct notification button implementation with a dedicated PlayerNotificationBell component for better code organization.
- Updated various screens to integrate the new notification component and adjusted prefetch settings for links to optimize performance.
- Added new translations for notifications and wallet logs to enhance user experience across multiple languages.
2026-06-01 09:29:02 +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
adae4a0be1 feat: 集成玩家余额 WebSocket 监听并增强风控预警处理
新增 PlayerBalanceWsListener,用于处理玩家余额的实时更新。
引入 RiskWarningWsEvent 类型,并更新 HallBettingGrid 以支持实时风控预警处理。
增强 cellRiskState 方法,新增 warning 状态支持,提升风控管理能力。
更新英文、尼泊尔语及中文翻译,新增玩家余额更新相关文案。
2026-05-26 17:13:49 +08:00
ab81da3199 feat: 增强注单处理逻辑并优化用户反馈体验
新增注单错误处理逻辑,支持已退款及待确认状态的异常场景处理。
更新 HallBetResultDialog:针对部分失败与已退款订单显示对应提示信息。
优化注单分组逻辑,新增订单状态处理,提升整体订单管理能力。
新增订单状态与用户通知相关多语言翻译,进一步提升用户体验。
2026-05-26 16:32:53 +08:00
51b2a36cc5 feat: 增强投注结果弹窗与投注网格功能
更新 HallBetResultDialog:根据成功与失败数量显示不同的结果图标与标题。
优化 HallBettingGrid:新增 place trace ID 管理机制,更好地处理投注提交流程,并防止重复扣费。
增强注单详情页面:针对临时状态中的注单自动刷新,提升用户体验。
新增多语言翻译:补充投注结果与状态相关文案,支持更完善的用户反馈。
2026-05-26 14:50:21 +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
81870bd010 feat: update draw scheduling logic and add new translation keys
- Refactored HallDrawPanel to improve the logic for determining scheduled start and end times.
- Introduced a new translation key for "scheduledEnd" in English, Nepali, and Chinese to support enhanced scheduling features.
- Improved user experience by clearly differentiating between scheduled start, end, and close times.
2026-05-25 18:04:35 +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
3b83c6627c feat: enhance draw processing and ticket validation logic
- Added a new function to check if the hall is awaiting draw processing, improving the draw status handling.
- Implemented validation for roll numbers in ticket orders, ensuring compliance with specified formats.
- Enhanced the draft line issue reasoning to provide detailed feedback on invalid ticket entries.
- Updated HallDrawPanel and related components to utilize the new draw processing checks and improve user notifications.
- Added new translations for draw processing and ticket validation messages in multiple languages.
2026-05-25 16:44:00 +08:00
3bcbf7d256 feat: enhance ticket order detail and status display
- Updated ticket status display logic to handle "failed" status and improve "settled_win" condition.
- Refactored TicketOrderDetailScreen to utilize search parameters for dynamic navigation and grouping of tickets.
- Enhanced TicketOrdersListScreen to group ticket items and improve rendering of order details.
- Added new translations for order-related terms in multiple languages to support enhanced user experience.
2026-05-25 16:02:23 +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
52702c9fbb feat: integrate public settings into Play Rules screen and update button properties
- Added functionality to fetch and display dynamic rules content in the Play Rules screen.
- Updated button components in HallBetResultDialog and WinningResultDialog to include nativeButton property for improved behavior.
2026-05-22 16:11:58 +08:00
b61a2ab07b feat: 优化大厅 Jackpot 参与提示与玩家页头布局 2026-05-22 14:34:11 +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
496ed10981 refactor: enhance wallet transfer dialogs and forms
- Removed unused trigger styles and refactored button variants for improved consistency.
- Introduced new components for transfer information, previews, and error handling to streamline the UI.
- Updated layout and styling for better user experience in transfer dialogs and forms.
2026-05-21 16:33:32 +08:00
6b18e25766 feat: 接入公开币种目录并统一多币种金额与语言初始化处理 2026-05-21 15:14:00 +08:00
626914feb6 feat: 优化多语言文案接入并升级大厅与钱包交互体验
- 补充大厅下注结果、快速填单、查中奖、分页与通用操作多语言文案
- 移除多处界面默认文案回退,统一改用 i18n 配置输出
- 优化大厅快速填单、开奖结果入口与注单筛选区域视觉交互
- 重构钱包转入转出弹窗与流水卡片样式,增强金额与状态信息展示
2026-05-20 17:56:18 +08:00
a2a29107f8 feat: 优化开奖结果查询与下注弹窗视觉交互,新增中奖查询页 2026-05-19 14:40:00 +08:00
321b56e997 feat: 增加 Jackpot 爆池实时弹层与奖池信息展示 2026-05-18 15:08:29 +08:00
418b446c09 feat: 优化下注结果展示与大厅表单交互,适配新端口配置 2026-05-18 11:28:41 +08:00
5f5ce6c29d feat: 新增玩法规则页并增强注单筛选与结果展示 2026-05-16 18:00:42 +08:00
500d7ec816 fix: 修复大厅倒计时空数据覆盖问题 2026-05-16 10:53:01 +08:00
9a1dea59de feat: 优化大厅期号倒计时并改用服务端时间同步 2026-05-16 10:32:05 +08:00
d5415888e6 feat: 优化下注异常清理与开奖结果详情展示
- 支持玩法关闭错误返回 cleanup_lines 时自动清空对应下注格并提示原因
- 调整下注预览与下注结果金额汇总文案,补充金额、回水、合计多语言翻译
- 下注结果弹窗新增注单状态展示
- 重构开奖结果详情页样式,强化前三名、派奖提示与查看中奖入口展示
- 精简底部导航激活态视觉效果
2026-05-16 09:54:28 +08:00
01baf9c18b feat: 优化注单与钱包流水分页加载体验
- 注单列表与钱包流水支持 10 条分页、滚动触底自动加载和手动加载更多
- 新增钱包流水无更多数据提示与分页末页计算工具
- 精简钱包首页快捷入口与页面标题眉标展示
- 将下注表格草稿合计文案调整为投注金额并同步多语言翻译
2026-05-15 16:52:25 +08:00
7472a61db0 feat: 优化大厅下注表格与开奖结果筛选加载体验
- 精简大厅下注表格布局,缩小列宽与输入框,优化移动端可读性
- 调整默认草稿行与行激活逻辑,简化草稿合计展示
- 新增开奖结果日期选择器、清除日期与加载更多功能
- 支持开奖结果分页滚动加载与无更多数据提示
- 新增 react-day-picker 与 date-fns 依赖
- 补充下注表格相关多语言文案
2026-05-15 16:36:40 +08:00
a83920aa2a feat: 优化大厅下注结果与风险提示展示,重构期号与订单详情样式 2026-05-15 15:31:00 +08:00
f2c7f5e4f1 refactor: 完成全站国际化改造,统一多语言支持
此提交完成了全项目的国际化适配:
1. 新增多语言翻译文件与基础配置
2. 替换所有硬编码文本为i18n调用
3. 优化语言切换与文档语言同步逻辑
4. 重构部分业务逻辑以支持动态翻译
5. 移除过时代码与硬编码配置
2026-05-15 10:41:14 +08:00