Commit Graph

81 Commits

Author SHA1 Message Date
ce1aca8905 feat: 重构和优化多个组件,增强性能和可维护性
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-06-30 11:42:05 +08:00
7bfc713b14 feat: remove pending reconcile notifications section from wallet screen
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Deleted WalletPendingReconcileSection component and usePendingWalletReconcile hook
- Removed pending reconcile notification helpers and translation key functions
- Cleaned up wallet logs refresh event dispatching and pending reconcile cache logic
- Simplified wallet screen section deep linking to only handle logs section
2026-06-29 17:54:12 +08:00
7702bc90e0 Refactor code structure for improved readability and maintainability
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-06-29 15:53:02 +08:00
ebc6f4d349 feat: 添加国际化支持,优化语言切换器和登录界面,增强用户体验
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-06-29 15:27:37 +08:00
1a43e81fb4 feat: 增加登录页面的桌面和移动端支持,优化语言切换器和表单组件
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-06-29 13:56:47 +08:00
7d03ffa30b feat(player): PC 侧栏布局、顶栏与页内间距优化
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 桌面端侧栏 + 全局顶栏(Logo 在侧栏顶、激活态对齐后台红底白字)
- 移除各页重复页内顶栏,统一主区与卡片顶部留白
- 视口遮罩/弹层约束到主内容区,移动端保留底栏与顶栏 Logo
2026-06-26 18:02:19 +08:00
e5622c58cb feat: 精简玩家端页面结构并支持局域网开发热更新
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 合并钱包、订单、开奖、通知等独立 screen 到页面层,减少重复壳组件
- 优化订单列表/详情、钱包划转与待对账展示、开奖核对与结果详情交互
- 改进入口 gate、移动端视口与下拉刷新在窄屏下的表现
- dev 绑定 0.0.0.0 并默认放行 192.168/10 网段,修复局域网 HMR WebSocket
2026-06-26 14:10:47 +08:00
dd1155978a feat: configure responsive image sizes for optimized loading
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Added custom deviceSizes configuration in next.config.ts to support common mobile and desktop breakpoints
- Added responsive sizes attribute to hall wallet strip background image for proper srcset generation
2026-06-26 09:30:44 +08:00
4d24906d45 feat: refine wallet credit mode detection and improve UI consistency across multiple screens
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Updated wallet screens to check both balance and profile for credit funding mode, ensuring consistent credit player detection
- Removed currency switcher from hall header and schedule timezone display from draw panel for cleaner UI
- Simplified ticket orders status filter to single-select mode with improved visual hierarchy
- Added sizes="100vw" attribute to entry and login background images for proper
2026-06-24 14:35:59 +08:00
cff6470031 feat: implement global pull-to-refresh functionality and refine UI typography and layout scaling for improved mobile UX.
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-06-24 11:46:49 +08:00
f46ccaac6e feat: add D4 play grouping with tab navigation and improve header layout
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Introduced D4 play groups (big/small, position, combo, roll/straight, head/tail/odd/even, digit big/small) with tab-based filtering to improve betting grid usability
- Updated PlayerPanel header grid layout from percentage-based to auto/1fr/auto columns with increased gap for better responsiveness
- Removed "placed" status from ticket orders list filter options
- Added D4 group translations in English, Nepali, and Chinese
- Refactored play columns
2026-06-24 11:18:45 +08:00
588d62a381 feat: improve mobile responsiveness across login, entry, and result screens
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Updated HallDrawPanel to use responsive grid layout, switching from 3-column to single-column on mobile with appropriate dividers
- Refactored EntryGate to use useMemo for gateReady state instead of useLayoutEffect, improving initialization logic
- Reduced minimum height of hero sections from 320px to 200px on mobile (sm:320px) in login and entry screens
- Enhanced WinningResultDialog layout with flexbox structure and
2026-06-23 16:50:25 +08:00
15b7cca9f5 feat: enhance timeline event display with localization support
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Updated the TicketOrderDetailScreen to utilize localized labels for timeline events, improving user experience across different languages.
- Added new timeline event translations in English, Nepali, and Chinese to support the updated display logic.
2026-06-22 10:51:58 +08:00
ecb032f8cc 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.
2026-06-22 10:50:52 +08:00
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