video-shuoshan/web/src/components/Toolbar.module.css
seaislee1209 f0f47e8368 feat(theme): 亮色主题切换完整实现 — dark/light 双套 var + Sidebar 切换 + 浅色色板
Stage 1 (var 化, 350 处): 425 处硬编码颜色 → CSS var, 涉及 49 个 tsx/css module 文件,
   按 hot files (DashboardPage/TeamDashboardPage/RecordDetailModal/ReferenceList) →
   Modal/Asset/Profile/Login → 生成页家族/管理后台/公共 UI 三波 8 个 sub-agent 并行处理。
   index.css :root 加 ~70 个新 var (modal/text 层级/状态色 bg 变体/chart/mention pill 等)。
Stage 2 (双套 var): :root 保留 DARK 默认值, [data-theme="light"] 覆盖 ~95 个 token。
   浅色色板按 Vercel Geist (#fafafa / #171717 / shadow-border) + Linear Light surface 分层规范,
   主色 #6c63ff → #5048cc 加深 18% 满足 WCAG AA。aurora 极光在 light 下 display:none。
Stage 3 (切换机制): 新建 store/theme.ts (Zustand + localStorage 持久化),
   Sidebar 加月亮/太阳 SVG 切换按钮 (位于头像上方),
   DashboardPage/TeamDashboardPage/ProfilePage 的 ECharts 配 key={theme} 强制重渲染。
Stage 4 (微调): LandingPage 强制 data-theme="dark" 保持品牌识别 (登录流程一直深色),
   sidebar bg / card bg / border 在浅色下加深 0.02 提升轮廓辨识度。
Stage 5 (验证): Playwright 头无浏览器自动登录 admin + screenshot_user, 截深/浅各 12 个页面 = 24 张
   到 docs/screenshots/ (本地档, .gitignore 排除 png 不入库)。
   vitest 71fail/162pass 与改造前基线完全一致, 无新增回归。

完成报告: docs/todo/亮色主题切换-完成报告.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-11 11:10:35 +08:00

83 lines
1.4 KiB
CSS

.toolbar {
display: flex;
align-items: center;
padding: 6px 12px 8px;
gap: 4px;
}
.btn {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 0 12px;
height: var(--toolbar-btn-height);
border-radius: var(--radius-btn);
font-size: 13px;
color: var(--color-text-secondary);
background: transparent;
border: none;
cursor: pointer;
transition: all 0.15s;
white-space: nowrap;
font-family: inherit;
}
.btn:hover {
background: var(--color-bg-hover);
color: var(--color-text-light);
}
.btn.primary {
color: var(--color-primary);
}
.btn.primary:hover {
color: var(--color-info-hover-2);
}
.spacer {
flex: 1;
}
.sendBtn {
width: var(--send-btn-size);
height: var(--send-btn-size);
border-radius: 50%;
border: none;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: all 0.2s;
flex-shrink: 0;
}
.sendDisabled {
background: var(--color-btn-send-disabled);
cursor: not-allowed;
}
.sendEnabled {
background: var(--color-btn-send-active);
box-shadow: 0 2px 12px var(--color-info-shadow-soft);
}
.sendEnabled:hover {
background: var(--color-info-hover);
box-shadow: 0 4px 20px var(--color-info-shadow-strong);
}
.label {
/* Toolbar label that hides on mobile */
}
@media (max-width: 767px) {
.label {
display: none;
}
.btn {
padding: 0 8px;
}
}