Polish admin list UI for lite

This commit is contained in:
JetSprow
2026-04-30 20:49:03 +10:00
parent d666f1450f
commit 6ee9cf2857
11 changed files with 244 additions and 258 deletions

View File

@@ -3,6 +3,7 @@
import { Moon, Sun } from "lucide-react";
import { useTheme } from "next-themes";
import { cn } from "@/lib/utils";
import { THEME_MODE_STORAGE_KEY } from "./time-theme-controller";
export function ThemeToggle({ className }: { className?: string }) {
const { resolvedTheme, setTheme } = useTheme();
@@ -15,9 +16,12 @@ export function ThemeToggle({ className }: { className?: string }) {
"btn-base inline-flex size-8 items-center justify-center rounded-lg border border-border bg-card text-muted-foreground hover:bg-muted hover:text-foreground",
className,
)}
aria-label={isDark ? "切换到日间模式" : "切换到夜间模式"}
aria-label={isDark ? "手动切换到日间模式" : "手动切换到夜间模式"}
title={isDark ? "日间模式" : "夜间模式"}
onClick={() => setTheme(isDark ? "light" : "dark")}
onClick={() => {
window.localStorage.setItem(THEME_MODE_STORAGE_KEY, "manual");
setTheme(isDark ? "light" : "dark");
}}
>
{isDark ? <Sun className="size-4" /> : <Moon className="size-4" />}
</button>