v1.1.36
v1.1.36 — 2026-05-29
🇬🇧 English
Fixed
- Repaired Admin UI light/dark theme — Tailwind v4 no longer reads the
darkMode: 'class'setting intailwind.config.js, sodark:utilities silently fell back to the OSprefers-color-schemeand desynced from the.darkclass driven by the toggle button. Operational cards (credentials, etc.) were forced to stay light in dark mode with cramped, low-contrast text. Nowsrc/index.cssdeclares@custom-variant dark (&:where(.dark, .dark *))sodark:variants truly follow the.darkclass. The light/dark palette was reworked (dark base sits below cards for elevation, muted text brightened for contrast), and the credential card and inner panels were migrated from hardcodedslate-*/whiteto theme tokens (bg-card/bg-muted/text-foreground/text-muted-foreground/border-border).
Added
- Theme persistence + anti-FOUC — Theme preference is saved to
localStorage(keyadminTheme, falling back to the system preference when unset), and an inline script inindex.htmlapplies the.darkclass before first paint to eliminate the light/dark flash on reload. The Dashboard toggle persists the choice.
🇨🇳 中文
修复
- 修复 Admin UI 日/夜间模式失效与配色 — Tailwind v4 不再自动读取
tailwind.config.js的darkMode: 'class',导致dark:工具类回退到系统prefers-color-scheme而与顶部切换按钮的.darkclass 脱节,凭据等操作卡片在夜间模式下被强制留白、文字挤压难读。现在在src/index.css显式声明@custom-variant dark (&:where(.dark, .dark *))让 dark 变体真正跟随.darkclass;同时重做深/浅主题调色板(深色基底低于卡片以制造层次、muted 文字提亮保证对比度),将凭据卡片及内部面板由硬编码slate-*/white迁移到主题 token (bg-card/bg-muted/text-foreground/text-muted-foreground/border-border)。
新增
- 主题持久化与防首屏闪烁 — 主题偏好保存到
localStorage(keyadminTheme,未设置时跟随系统),并在index.html首屏渲染前内联应用.darkclass,消除刷新时的亮/暗闪烁;Dashboard 切换按钮同步持久化。
涉及文件 / Files touched: admin-ui/src/index.css, admin-ui/tailwind.config.js, admin-ui/src/components/credential-card.tsx, admin-ui/src/components/credential-detail-dialog.tsx, admin-ui/src/components/dashboard.tsx, admin-ui/src/lib/storage.ts, admin-ui/index.html
完整变更日志 / Full changelog: CHANGELOG.md