增加自动亮色/暗色主题切换 + 清理 pyc 文件

- 新建 store/theme.tsx: 亮色/暗色/跟随系统三种模式
- App.tsx: ThemeProvider + ConfigProvider 暗色算法
- MainLayout: 侧边栏主题切换按钮,Sider/Content 随主题变化
- 所有页面硬编码颜色替换为 antd token
- AssignmentsPage: Tag 用预设颜色名适配暗色,未选中背景用 colorBgContainer
- LoginPage: 暗色深色渐变背景
- 从 git 移除所有 __pycache__/*.pyc 文件

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
yml2213
2026-06-22 20:09:57 +08:00
co-authored by Claude Fable 5
parent 2f9b1a8eb2
commit 4522421293
26 changed files with 212 additions and 73 deletions
+4 -3
View File
@@ -1,5 +1,5 @@
import { useEffect, useState } from 'react';
import { Table, Button, Card, Row, Col, Statistic, message, Tag, Popconfirm, Space, Typography, Input } from 'antd';
import { Table, Button, Card, Row, Col, Statistic, message, Tag, Popconfirm, Space, Typography, Input, theme } from 'antd';
import { DownloadOutlined, DeleteOutlined, CopyOutlined, SearchOutlined } from '@ant-design/icons';
import { cookieApi } from '../api/modules';
import { getUser, hasPerm } from '../store/auth';
@@ -8,6 +8,7 @@ import { formatTime } from '../utils/time';
const { Text } = Typography;
export default function CookiePage() {
const { token } = theme.useToken();
const [cookies, setCookies] = useState<any[]>([]);
const [loading, setLoading] = useState(false);
const [selectedRowKeys, setSelectedRowKeys] = useState<React.Key[]>([]);
@@ -184,7 +185,7 @@ export default function CookiePage() {
<Statistic
title="已分配"
value={assignedCount}
valueStyle={{ color: '#3f8600' }}
valueStyle={{ color: token.colorSuccess }}
/>
</Card>
</Col>
@@ -193,7 +194,7 @@ export default function CookiePage() {
<Statistic
title="未分配"
value={unassignedCount}
valueStyle={{ color: '#cf1322' }}
valueStyle={{ color: token.colorError }}
/>
</Card>
</Col>