Initial commit

This commit is contained in:
xggz
2026-03-06 22:56:13 +08:00
commit 54d1097b41
273 changed files with 92457 additions and 0 deletions

View File

@@ -0,0 +1,80 @@
"use client"
import { Monitor, Moon, Sun } from "lucide-react"
import { useTheme } from "next-themes"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
type ThemeMode = "system" | "light" | "dark"
export function AppearanceSettings() {
const { theme, resolvedTheme, setTheme } = useTheme()
const resolvedThemeLabel =
resolvedTheme === "dark"
? "深色"
: resolvedTheme === "light"
? "浅色"
: "--"
return (
<div className="h-full overflow-auto">
<div className="w-full space-y-4">
<section className="rounded-xl border bg-card p-4 space-y-4">
<div className="flex items-center gap-2">
<Sun className="h-4 w-4 text-muted-foreground" />
<h2 className="text-sm font-semibold"></h2>
</div>
<p className="text-xs text-muted-foreground leading-5">
</p>
<div className="space-y-2">
<label className="text-xs font-medium text-muted-foreground">
</label>
<Select
value={theme ?? "system"}
onValueChange={(value) => setTheme(value as ThemeMode)}
>
<SelectTrigger className="w-56">
<SelectValue placeholder="请选择主题模式" />
</SelectTrigger>
<SelectContent align="start">
<SelectItem value="system">
<span className="inline-flex items-center gap-2">
<Monitor className="h-3.5 w-3.5" />
</span>
</SelectItem>
<SelectItem value="light">
<span className="inline-flex items-center gap-2">
<Sun className="h-3.5 w-3.5" />
</span>
</SelectItem>
<SelectItem value="dark">
<span className="inline-flex items-center gap-2">
<Moon className="h-3.5 w-3.5" />
</span>
</SelectItem>
</SelectContent>
</Select>
<p
className="text-[11px] text-muted-foreground"
suppressHydrationWarning
>
{resolvedThemeLabel}
</p>
</div>
</section>
</div>
</div>
)
}