feat: 更新依赖与增强功能

- 在 package.json 和 package-lock.json 中新增 laravel-echo 和 pusher-js 依赖
- 在 API 模块中新增 draw 相关函数的导出
- 在 PlayerAppShell 组件中引入 PlayerBottomNav 以增强底部导航
- 在 HallScreen 组件中引入 HallDrawPanel 以展示当前期号
This commit is contained in:
2026-05-09 17:40:26 +08:00
parent 3ae2c0e7d1
commit 7e28cc154a
19 changed files with 1067 additions and 31 deletions

View File

@@ -0,0 +1,35 @@
export type DrawStatusHud = {
label: string;
/** Tailwind 颜色类:状态圆点 */
dotClass: string;
/** 文案条(如「距封盘」) */
countdownKind: "close" | "draw" | "cooldown" | "none";
};
/** 对齐界面文档 §4.2 状态文案与 PRD 期号状态 */
export function drawStatusHud(status: string): DrawStatusHud {
switch (status) {
case "pending":
return { label: "未开始", dotClass: "bg-muted-foreground", countdownKind: "none" };
case "open":
return { label: "可下注", dotClass: "bg-emerald-500", countdownKind: "close" };
case "closing":
return { label: "已封盘", dotClass: "bg-rose-500", countdownKind: "draw" };
case "closed":
return { label: "待开奖", dotClass: "bg-amber-500", countdownKind: "draw" };
case "drawing":
return { label: "开奖中", dotClass: "bg-sky-500", countdownKind: "none" };
case "review":
return { label: "待审核", dotClass: "bg-violet-500", countdownKind: "none" };
case "cooldown":
return { label: "冷静期", dotClass: "bg-cyan-500", countdownKind: "cooldown" };
case "settling":
return { label: "结算中", dotClass: "bg-blue-600", countdownKind: "none" };
case "settled":
return { label: "已结算", dotClass: "bg-muted-foreground", countdownKind: "none" };
case "cancelled":
return { label: "已取消", dotClass: "bg-muted-foreground", countdownKind: "none" };
default:
return { label: status, dotClass: "bg-muted-foreground", countdownKind: "none" };
}
}