feat: 增强封盘状态处理与用户界面反馈

- 在 draw-status-meta.ts 中新增 isHallSealedCountdownUi 函数以判断封盘状态
- 在 hall-bet-preview-dialog.tsx 中添加 allowSubmit 属性,控制提交按钮状态
- 更新 hall-betting-grid.tsx 以显示封盘提示与禁用下注功能
- 在 hall-draw-panel.tsx 中优化封盘状态的视觉反馈
- 修改 hall-screen.tsx 的注释以反映封盘相关的界面变化
This commit is contained in:
2026-05-11 14:00:51 +08:00
parent 09ef46e171
commit 1922a29f49
5 changed files with 75 additions and 17 deletions

View File

@@ -22,6 +22,8 @@ type HallBetPreviewDialogProps = {
currencyCode: string;
data: TicketPreviewData | null;
placing: boolean;
/** 界面 §4.2:封盘后禁止提交,主按钮文案为「已封盘」 */
allowSubmit?: boolean;
onConfirmPlace: () => void;
};
@@ -56,6 +58,7 @@ export function HallBetPreviewDialog({
currencyCode,
data,
placing,
allowSubmit = true,
onConfirmPlace,
}: HallBetPreviewDialogProps) {
const summary = data?.summary;
@@ -71,6 +74,15 @@ export function HallBetPreviewDialog({
§6.3
</DialogDescription>
</DialogHeader>
{!allowSubmit ? (
<Alert className="mt-3 border-[#ff4d4f]/35 bg-[#ff4d4f]/8 text-[#ff4d4f] dark:bg-[#ff4d4f]/12">
<AlertTriangleIcon />
<AlertTitle></AlertTitle>
<AlertDescription className="text-xs leading-relaxed">
§4.2
</AlertDescription>
</Alert>
) : null}
</div>
<ScrollArea className="max-h-[min(52vh,360px)] border-y px-4">
@@ -160,8 +172,8 @@ export function HallBetPreviewDialog({
<Button type="button" variant="outline" onClick={() => onOpenChange(false)} disabled={placing}>
</Button>
<Button type="button" onClick={onConfirmPlace} disabled={!data || placing}>
{placing ? "提交中…" : "确认提交"}
<Button type="button" onClick={onConfirmPlace} disabled={!data || placing || !allowSubmit}>
{placing ? "提交中…" : allowSubmit ? "确认提交" : "已封盘"}
</Button>
</div>
</DialogContent>