feat(theme): add ThemeToggle and wire into header + admin top bar

- Add reusable client ThemeToggle at src/components/theme/theme-toggle.tsx
- Reads/writes novalon-theme localStorage key and toggles data-theme
- Placeholder on first render to avoid hydration mismatch
- Wired into public Header desktop cluster and AdminLayout top bar
This commit is contained in:
2026-08-31 22:05:06 +08:00
parent 8090ba2b9e
commit 02fec8a67b
3 changed files with 91 additions and 0 deletions
+2
View File
@@ -24,6 +24,7 @@ import {
UserCog,
Bell,
} from 'lucide-react';
import { ThemeToggle } from '@/components/theme/theme-toggle';
const menuItems = [
{
@@ -264,6 +265,7 @@ export function AdminLayout({ children }: { children: React.ReactNode }) {
<div className="flex-1" />
<div className="flex items-center gap-4">
<ThemeToggle />
<Link
href="/"
target="_blank"