refactor(game): 优化游戏组件并实现国际化支持

- 在AppBootResourceGate组件中集成react-i18next实现资源加载文本的国际化
- 修改DesktopAnimal组件中的loading dots key以提高渲染性能
- 在DesktopControl组件中添加useRef和useEffect钩子管理定时器清理逻辑
- 将DesktopTitle组件重构为MessageBroadcast组件并增强其响应式设计
- 更新DesktopSupportModal组件中的客户服务文本为国际化格式
- 在AuthSession模块中实现本地存储数据清理时保留关键偏好设置
- 调整多个游戏组件的样式类以改进移动端适配效果
- 移除未使用的桌面提取功能相关代码文件
- 更新GitNexus索引统计数据反映最新的代码变更
This commit is contained in:
JiaJun
2026-06-04 18:01:40 +08:00
parent bfb4b76611
commit a6b34660ad
48 changed files with 3185 additions and 1216 deletions

View File

@@ -168,6 +168,15 @@ export function useGameControlVm() {
return
}
const latestBalance = parseBalance(
useAuthStore.getState().currentUser?.coin,
)
if (totalBetAmount > latestBalance) {
notify.warning(t('commonUi.toast.insufficientBalance'))
return
}
const betId = toBetId(selections[0]?.chipId ?? activeChipId)
const singleBetAmount = selections[0]?.amount ?? selectedChip?.amount ?? 0
@@ -236,6 +245,7 @@ export function useGameControlVm() {
setCurrentUser,
setModalOpen,
t,
totalBetAmount,
])
const handleRepeatSelections = useCallback(() => {