From 598cd3026bcb1366b2f5c126b6ded4cef6846c4f Mon Sep 17 00:00:00 2001 From: Stev_Wang <304865932@qq.com> Date: Sat, 27 Dec 2025 20:31:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E2=99=BB=EF=B8=8F=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8Ant=20Design=E5=85=A8=E5=B1=80=E5=8C=96=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 6 ++-- frontend/src/components/PlayerLayout.tsx | 11 ++++--- frontend/src/main.tsx | 11 +++++-- frontend/src/theme/index.ts | 39 ++++++++++++++++++++++++ 4 files changed, 58 insertions(+), 9 deletions(-) create mode 100644 frontend/src/theme/index.ts diff --git a/.gitignore b/.gitignore index a56dfa5..93f61c6 100644 --- a/.gitignore +++ b/.gitignore @@ -58,14 +58,14 @@ Thumbs.db *.temp .cache/ -# Frontend specific +# Frontend specific (React + Vite) frontend/dist/ frontend/node_modules/ frontend/.env frontend/.env.local frontend/.env.*.local -# Backend specific +# Backend specific (NestJS) backend/dist/ backend/node_modules/ backend/.env @@ -73,7 +73,7 @@ backend/.env.local backend/.env.*.local backend/test-game-server.js -# Package manager files +# Package manager lock files package-lock.json yarn.lock pnpm-lock.yaml diff --git a/frontend/src/components/PlayerLayout.tsx b/frontend/src/components/PlayerLayout.tsx index e157099..3155a3d 100644 --- a/frontend/src/components/PlayerLayout.tsx +++ b/frontend/src/components/PlayerLayout.tsx @@ -1,4 +1,4 @@ -import { Layout, Menu, Button, Dropdown } from 'antd'; +import { Layout, Menu, Button, Dropdown, theme } from 'antd'; import { HomeOutlined, UserOutlined, @@ -12,6 +12,9 @@ import { playerAuthService } from '../services/playerAuthService'; const { Header, Content, Footer } = Layout; const PlayerLayout = () => { + const { + token: { colorBgContainer, colorBgLayout }, + } = theme.useToken(); const navigate = useNavigate(); const location = useLocation(); @@ -55,7 +58,7 @@ const PlayerLayout = () => { display: 'flex', alignItems: 'center', justifyContent: 'space-between', - background: '#001529', + background: colorBgLayout, padding: '0 24px', }} > @@ -93,7 +96,7 @@ const PlayerLayout = () => { style={{ padding: '24px 50px', minHeight: 'calc(100vh - 128px)', - background: '#f0f2f5', + background: colorBgContainer, }} >