feat: 增加深色/浅色主题切换功能

- types 新增 Theme 类型(dark/light)
- storage 新增 loadTheme/saveTheme 持久化主题偏好
- ConfigPanel 新增外观分组,主题下拉选择
- App.tsx 通过 data-theme 属性挂载到 html 元素
- App.css 新增 [data-theme=light] 亮色变量覆盖

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-06-13 17:08:56 +08:00
parent f17c3c24a7
commit 0227822120
5 changed files with 75 additions and 7 deletions

View File

@@ -19,6 +19,20 @@
--radius-sm: 6px;
}
[data-theme="light"] {
--color-primary: #2563eb;
--color-primary-hover: #1d4ed8;
--color-bg: #f1f5f9;
--color-surface: #ffffff;
--color-surface-2: #f8fafc;
--color-text: #0f172a;
--color-text-muted: #64748b;
--color-border: #e2e8f0;
--color-success: #16a34a;
--color-warning: #d97706;
--color-error: #dc2626;
}
* {
margin: 0;
padding: 0;
@@ -151,7 +165,7 @@ body {
.video-container {
position: relative;
aspect-ratio: 4 / 3;
background: #0a0e17;
background: var(--color-surface-2);
border-radius: var(--radius);
overflow: hidden;
border: 1px solid var(--color-border);
@@ -167,7 +181,7 @@ body {
width: 100%;
height: 100%;
object-fit: cover;
background: #000;
background: #1a1a2e;
}
.video-placeholder {