Commit Graph

101 Commits

Author SHA1 Message Date
wchino
5ef2e09b04 fix(iframe): validate trusted parent messages 2026-07-21 23:41:18 +08:00
wchino
9b3eae1896 fix(hall): freeze ticket preview submissions 2026-07-21 23:41:18 +08:00
wchino
912cd01383 chore(deps): secure local frontend build 2026-07-21 23:41:18 +08:00
wchino
8307cc3f88 feat(player): 优化桌面投注布局与账号功能 2026-07-21 21:11:07 +08:00
406ebb7671 feat(hall): 支持全保金额整除校验与规则提示,优化桌面端转账按钮布局
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-15 13:40:19 +08:00
295cfb97cd feat(player): PC 端列表/布局适配与分页
玩家端桌面:全宽居中 Logo、圆角侧栏与主内容面板;开奖结果/注单改 shadcn Table+分页(移动仍无限滚动),注单组默认折叠;信用/钱包筛选与分页;详情页与奖号网格密度优化。
2026-07-15 10:38:49 +08:00
c74bd5f701 feat(hall): 优化桌面端投注表格布局与国际化文本支持
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-13 10:23:44 +08:00
99d49f457f feat(hall): 支持按行选择开注商与选号种类并优化下注表格
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-10 17:04:54 +08:00
960b10e02a chore(deploy): 调整上传目录并优化 PM2 重启流程
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-10 10:24:01 +08:00
56ba12fbfc refactor(hall): 优化投注格子行数与号码输入逻辑
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 引入默认草稿行数常量及批量生成草稿行函数
- 根据玩法类别调整号码最大输入长度和清洗规则
- 更新号码输入组件以适应动态最大长度和格式规范
- 修正相关回调依赖,确保玩法类别变更时生效
- 改善行状态、占位符和样式传递,增强代码可读性

feat(results): 添加多提供商开奖结果切换功能

- 新增状态管理并展示多提供商按钮切换激活项
- 根据选中的提供商动态展示对应开奖结果数据
- 细化UI显示,支持多提供商名称并列渲染

feat(results): 在结果列表中显示多提供商名称

- 当存在多个提供商结果时展示其名称或代码
- 改善界面信息丰富度,方便用户辨识来源

feat(wallet): 支持账期还款释额类型的流水显示

- 调整账期流水类型文案,精准反映释额含义
- 引入账期时区参数以支持多时区时间格式化
- 自定义信用盘账期释额流水的颜色和文案显示
- 在流水明细和列表中根据时区格式化展示时间

feat(wallet): 支持钱包账期账单区间时区格式化

- 允许传入账期时区参数格式化账单区间时间
- 在账期账单区间显示组件中显示对应时区格式
- 根据玩家配置自动获取并传递账期时区信息
- 条件渲染中信用盘区块支持账期时区参数传递

chore(i18n): 更新中文钱包模块多处文案

- 新增“释额 {{amount}}”等账期释额相关文案
- 修改“账期收款”为“账期还款释额”以符合业务描述

refactor(types): 扩展开奖结果支持多提供商结构

- 新增DrawResultProviderRow类型定义以描述提供商结果
- 在DrawResultListItem中增加provider_results字段支持多结果
- 在玩家信息类型中新增settlement_timezone字段表示账期时区
2026-07-09 15:48:36 +08:00
4a6f021304 refactor(hall): 移除 JACKPOT 类别并优化类型定义
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 删除未使用的 MAX_ROWS 常量及相关添加行逻辑
- 将 HallCategory 类型排除 JACKPOT,改为 PlayHallCategory,简化代码逻辑
- 更新所有涉及类别类型的函数和变量使用 PlayHallCategory
- 优化 playCategories、categoryTabs 等数据结构定义的类型一致性
- 使用 Set 替换includes 方法以提升过滤性能
- 统一所有数字槽相关函数参数类型,增强类型安全性
2026-07-09 11:19:56 +08:00
5cbabb5d0f feat(api): 按开注商支持获取赔率数据并完善相关功能
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 在getPlayEffective接口中增加provider_code参数支持
- 优化接口调用时对currency和provider_code的传递逻辑
- hall-bet-preview-dialog新增previewLineKey方法,解决列表渲染key冲突问题
- 修改投注和结果弹窗中开注商标题的国际化调用方式
- hall-betting-grid中增加选中开注商的默认逻辑,接口调用时传递provider_code
- 优化provider名称显示逻辑,完善开注商选择及摘要文本显示
- 订单详情页中显示开注商名称,提升显示准确性
- 补充i18n中开注商相关文案,支持多语言环境
- 更新PlayEffectiveOddsSlice和PlayEffectivePayload类型,加入provider_code字段支持
2026-07-09 10:51:45 +08:00
add3d1fc05 feat: enhance wallet strip for mobile responsiveness
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- Added mobile-specific styles to the HallWalletStrip component for better usability on smaller screens.
- Adjusted padding, font sizes, and spacing based on device type.
- Introduced a new hook `useIsMobile` to determine the device type.

feat: sort ticket items by provider code

- Updated the sorting logic in `sortTicketGroupItems` to include provider code for better organization of ticket items.

feat: display provider information in ticket order details

- Added a `providerLabel` function to format provider information.
- Updated `TicketOrderDetailScreen` and `TicketOrdersListScreen` to display provider name and code.

feat: enhance ticket item types with provider information

- Extended `TicketItemListRow` and `TicketItemDetailPayload` types to include optional provider code and name.

feat: add API for fetching bet providers

- Created a new API endpoint to retrieve bet providers.
- Defined types for bet provider data in `bet-provider.ts`.

chore: update player spacing constants

- Adjusted padding values in `player-spacing.ts` for improved layout consistency.
2026-07-08 15:57:09 +08:00
45376473f3 feat(hall-betting-grid): 增加对投注行的优化和重构,提升代码可读性和维护性
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-08 14:18:18 +08:00
a86e8a2c67 chore(deploy): 完善 lotteryfront 单机部署流程
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-07 15:32:03 +08:00
396b3c47de fix(server-error): 处理服务端错误信息缺失问题
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 当服务端错误信息为空时,显示“不可用”提示文本
- 完善服务器错误组件中的错误消息展示逻辑
- 在多语言文件中新增账期结算相关的文本资源
- 补充英文、尼泊尔语及中文的账单状态、资金加载和对账提示翻译内容
2026-07-07 09:44:19 +08:00
f612493f88 feat(i18n): 更新尼泊尔语翻译,增强用户体验
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-02 10:35:14 +08:00
9496a3ac57 feat(i18n): 添加中文玩家待对账提醒的副标题文本
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-07-01 17:35:50 +08:00
646c139697 feat(wallet): 新增信用盘玩家待结算账单功能
Some checks failed
lotteryfront CI / build (push) Has been cancelled
- 新增接口 getWalletSettlementBills 获取信用盘玩家账期账单数据
- 在钱包日志块中添加业务类型标签支持,增强日志类型显示
- WalletScreen 中增加账期账单数据的加载和展示逻辑
- 新增 CreditSettlementBillsBlock 组件用于展示账期账单摘要和详情列表
- 支持账单状态显示和账期区间格式化
- 仅信用盘玩家显示账期账单模块,其他类型玩家隐藏
- 新增 wallet-settlement-bills.ts 类型定义文件,完善账期账单数据结构
2026-07-01 15:35:13 +08:00
efb1bcdda8 feat: 更新钱包日志和资金模式相关的国际化文本,增强用户体验
Some checks failed
lotteryfront CI / build (push) Has been cancelled
2026-06-30 17:55:06 +08:00
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