From ac612cb32cce3710714badd7c3f3a8e475110169 Mon Sep 17 00:00:00 2001 From: kang Date: Thu, 14 May 2026 11:18:08 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E9=87=8D=E6=9E=84=E6=95=B4?= =?UTF-8?q?=E4=BD=93=E9=A1=B5=E9=9D=A2=E5=B8=83=E5=B1=80=E4=B8=8E=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=EF=BC=8C=E7=BB=9F=E4=B8=80UI=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 重构PlayerAppShell,移除冗余头部导航与国际化依赖,统一页面背景与内边距 - 新增通用页面容器组件PlayerPanel,统一页面头部布局与样式 - 重构底部导航栏,调整图标、文案与样式,新增激活状态指示器 - 重构所有页面组件:大厅页、注单页、结果页、开奖面板等,统一使用新的UI组件与设计风格 - 优化状态标签、卡片、按钮等组件的视觉样式,统一配色与圆角规范 - 移除冗余依赖与注释代码,整理代码结构 --- src/components/layout/player-app-shell.tsx | 23 +- src/components/layout/player-bottom-nav.tsx | 37 +- src/components/layout/player-panel.tsx | 79 ++ src/features/hall/hall-betting-grid.tsx | 874 ++++++++++++------ src/features/hall/hall-draw-panel.tsx | 245 +++-- src/features/hall/hall-screen.tsx | 41 +- src/features/hall/hall-wallet-strip.tsx | 59 +- src/features/orders/ticket-item-status.tsx | 4 +- .../orders/ticket-orders-list-screen.tsx | 240 ++--- .../results/draw-results-list-screen.tsx | 181 ++-- .../results/jackpot-results-strip.tsx | 6 +- 11 files changed, 1054 insertions(+), 735 deletions(-) create mode 100644 src/components/layout/player-panel.tsx diff --git a/src/components/layout/player-app-shell.tsx b/src/components/layout/player-app-shell.tsx index 0278657..0bfaf96 100644 --- a/src/components/layout/player-app-shell.tsx +++ b/src/components/layout/player-app-shell.tsx @@ -1,13 +1,9 @@ "use client"; -import Link from "next/link"; import type { ReactNode } from "react"; -import { useTranslation } from "react-i18next"; -import { LanguageSwitcher } from "@/components/language-switcher"; import { NetworkStatusBanner } from "@/components/network-status-banner"; import { PlayerBottomNav } from "@/components/layout/player-bottom-nav"; -import { PlayerSessionBar } from "@/features/player/player-session-bar"; type PlayerAppShellProps = { children: ReactNode; @@ -21,25 +17,10 @@ type PlayerAppShellProps = { * 这里的 NetworkStatusBanner 仅用于 WebSocket 状态显示 */ export function PlayerAppShell({ children }: PlayerAppShellProps): ReactNode { - const { t } = useTranslation("layout"); - return ( -
- {/* WebSocket 连接状态横幅(降级模式提示) */} +
-
-
- - {t("brand.title")} - - - -
-
-
+
{children}
diff --git a/src/components/layout/player-bottom-nav.tsx b/src/components/layout/player-bottom-nav.tsx index c5eb907..3bf5419 100644 --- a/src/components/layout/player-bottom-nav.tsx +++ b/src/components/layout/player-bottom-nav.tsx @@ -3,30 +3,30 @@ import Link from "next/link"; import { usePathname } from "next/navigation"; -import { LayoutGrid, Receipt, Trophy, Wallet } from "lucide-react"; +import { BarChart3, ClipboardList, Home, Wallet } from "lucide-react"; import { cn } from "@/lib/utils"; const tabs = [ - { href: "/hall", label: "大厅", icon: LayoutGrid, match: (p: string) => p === "/hall" }, + { href: "/hall", label: "Home", icon: Home, match: (p: string) => p === "/hall" }, + { + href: "/results", + label: "Results", + icon: BarChart3, + match: (p: string) => p === "/results" || p.startsWith("/results/"), + }, { href: "/orders", - label: "注单", - icon: Receipt, + label: "My Bets", + icon: ClipboardList, match: (p: string) => p === "/orders" || p.startsWith("/orders/"), }, { href: "/wallet", - label: "钱包", + label: "Wallet", icon: Wallet, match: (p: string) => p === "/wallet" || p.startsWith("/wallet/"), }, - { - href: "/results", - label: "开奖", - icon: Trophy, - match: (p: string) => p === "/results" || p.startsWith("/results/"), - }, ] as const; /** @@ -37,10 +37,10 @@ export function PlayerBottomNav() { return (