mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-05-12 02:20:58 +08:00
feat: 添加日间/夜间主题切换系统
- 新增 theme.js 主题管理模块(localStorage 持久化) - variables.css 重构为亮色默认 + 暗色 data-theme 切换 - sidebar 底部添加主题切换按钮(sun/moon SVG 图标) - 修复 scrollbar 硬编码颜色为 CSS 变量 - 修复 agents.js fallbacks 未定义时的空指针错误
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
*/
|
||||
import { registerRoute, initRouter } from './router.js'
|
||||
import { renderSidebar } from './components/sidebar.js'
|
||||
import { initTheme } from './lib/theme.js'
|
||||
|
||||
// 样式
|
||||
import './style/variables.css'
|
||||
@@ -22,6 +23,9 @@ registerRoute('/mcp', () => import('./pages/mcp.js'))
|
||||
registerRoute('/memory', () => import('./pages/memory.js'))
|
||||
registerRoute('/deploy', () => import('./pages/deploy.js'))
|
||||
|
||||
// 初始化主题
|
||||
initTheme()
|
||||
|
||||
// 初始化
|
||||
const sidebar = document.getElementById('sidebar')
|
||||
const content = document.getElementById('content')
|
||||
|
||||
Reference in New Issue
Block a user