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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user