feat(game): 添加最大投注金额限制功能

- 在 UserStreakMessageData 接口中添加 maxBetPerNumber 字段
- 在 WebSocket 消息解析器中处理 max_bet_per_number 数据
- 实现游戏实时同步中最大投注金额的更新逻辑
- 将最大投注金额同步到游戏会话状态的仪表板数据
- 更新通知弹窗组件样式以支持当前文本颜色
- 在通知弹窗标题区域应用主题色调类名
This commit is contained in:
JiaJun
2026-06-10 14:34:52 +08:00
parent 3b35c9817b
commit 23416df765
6 changed files with 12 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
<!-- gitnexus:start -->
# GitNexus — Code Intelligence
This project is indexed by GitNexus as **36-character-flower** (3087 symbols, 6103 relationships, 263 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
This project is indexed by GitNexus as **36-character-flower** (3095 symbols, 6119 relationships, 264 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.

View File

@@ -1,7 +1,7 @@
<!-- gitnexus:start -->
# GitNexus — Code Intelligence
This project is indexed by GitNexus as **36-character-flower** (3087 symbols, 6103 relationships, 263 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
This project is indexed by GitNexus as **36-character-flower** (3095 symbols, 6119 relationships, 264 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.

View File

@@ -181,6 +181,7 @@ export function AppNotificationAlert() {
isMobileViewport
? 'flex min-h-design-28'
: 'flex min-h-design-38',
tone.title,
)}
>
<AlertTitle
@@ -196,7 +197,7 @@ export function AppNotificationAlert() {
{activeDialog.description ? (
<AlertDescription
className={cn(
'whitespace-pre-line text-white/62',
'whitespace-pre-line !text-current',
isMobileViewport
? 'pt-design-2 text-design-9 leading-[1.35]'
: 'pt-design-3 text-design-12 leading-[1.45]',

View File

@@ -217,6 +217,12 @@ function applyUserStreakMessage(message: GameSocketMessage) {
oddsFactor: streakData.oddsFactor ?? currentUser.oddsFactor,
streakLevel: streakData.streakLevel ?? currentUser.streakLevel,
})
if (typeof streakData.maxBetPerNumber === 'number') {
useGameSessionStore.getState().syncDashboard({
tableLimitMax: streakData.maxBetPerNumber,
})
}
}
function applyWalletChangedMessage(message: GameSocketMessage) {

View File

@@ -114,6 +114,7 @@ export function extractUserStreakMessageData(
return {
currentStreak: source.current_streak,
maxBetPerNumber: toOptionalNumber(source.max_bet_per_number),
oddsFactor: toOptionalNumber(source.odds_factor),
streakLevel: toOptionalNumber(source.streak_level),
}

View File

@@ -203,6 +203,7 @@ export interface JackpotBroadcastItem {
export interface UserStreakMessageData {
currentStreak: number
maxBetPerNumber?: number
oddsFactor?: number
streakLevel?: number
}