feat(game): 添加最大投注金额限制功能
- 在 UserStreakMessageData 接口中添加 maxBetPerNumber 字段 - 在 WebSocket 消息解析器中处理 max_bet_per_number 数据 - 实现游戏实时同步中最大投注金额的更新逻辑 - 将最大投注金额同步到游戏会话状态的仪表板数据 - 更新通知弹窗组件样式以支持当前文本颜色 - 在通知弹窗标题区域应用主题色调类名
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<!-- gitnexus:start -->
|
<!-- gitnexus:start -->
|
||||||
# GitNexus — Code Intelligence
|
# 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.
|
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<!-- gitnexus:start -->
|
<!-- gitnexus:start -->
|
||||||
# GitNexus — Code Intelligence
|
# 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.
|
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
|
||||||
|
|
||||||
|
|||||||
@@ -181,6 +181,7 @@ export function AppNotificationAlert() {
|
|||||||
isMobileViewport
|
isMobileViewport
|
||||||
? 'flex min-h-design-28'
|
? 'flex min-h-design-28'
|
||||||
: 'flex min-h-design-38',
|
: 'flex min-h-design-38',
|
||||||
|
tone.title,
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<AlertTitle
|
<AlertTitle
|
||||||
@@ -196,7 +197,7 @@ export function AppNotificationAlert() {
|
|||||||
{activeDialog.description ? (
|
{activeDialog.description ? (
|
||||||
<AlertDescription
|
<AlertDescription
|
||||||
className={cn(
|
className={cn(
|
||||||
'whitespace-pre-line text-white/62',
|
'whitespace-pre-line !text-current',
|
||||||
isMobileViewport
|
isMobileViewport
|
||||||
? 'pt-design-2 text-design-9 leading-[1.35]'
|
? 'pt-design-2 text-design-9 leading-[1.35]'
|
||||||
: 'pt-design-3 text-design-12 leading-[1.45]',
|
: 'pt-design-3 text-design-12 leading-[1.45]',
|
||||||
|
|||||||
@@ -217,6 +217,12 @@ function applyUserStreakMessage(message: GameSocketMessage) {
|
|||||||
oddsFactor: streakData.oddsFactor ?? currentUser.oddsFactor,
|
oddsFactor: streakData.oddsFactor ?? currentUser.oddsFactor,
|
||||||
streakLevel: streakData.streakLevel ?? currentUser.streakLevel,
|
streakLevel: streakData.streakLevel ?? currentUser.streakLevel,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (typeof streakData.maxBetPerNumber === 'number') {
|
||||||
|
useGameSessionStore.getState().syncDashboard({
|
||||||
|
tableLimitMax: streakData.maxBetPerNumber,
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyWalletChangedMessage(message: GameSocketMessage) {
|
function applyWalletChangedMessage(message: GameSocketMessage) {
|
||||||
|
|||||||
@@ -114,6 +114,7 @@ export function extractUserStreakMessageData(
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
currentStreak: source.current_streak,
|
currentStreak: source.current_streak,
|
||||||
|
maxBetPerNumber: toOptionalNumber(source.max_bet_per_number),
|
||||||
oddsFactor: toOptionalNumber(source.odds_factor),
|
oddsFactor: toOptionalNumber(source.odds_factor),
|
||||||
streakLevel: toOptionalNumber(source.streak_level),
|
streakLevel: toOptionalNumber(source.streak_level),
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ export interface JackpotBroadcastItem {
|
|||||||
|
|
||||||
export interface UserStreakMessageData {
|
export interface UserStreakMessageData {
|
||||||
currentStreak: number
|
currentStreak: number
|
||||||
|
maxBetPerNumber?: number
|
||||||
oddsFactor?: number
|
oddsFactor?: number
|
||||||
streakLevel?: number
|
streakLevel?: number
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user