refactor: rebuild desktop app with Tauri

This commit is contained in:
leookun committed 2026-08-24 02:49:00 +08:00
1 parent a3ec2a0dfc
commit 4053a7fb20
808 files changed
+87359 -181491

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
export const themeIds = ["default-dark", "default-light"] as const;
export type ThemeId = (typeof themeIds)[number];
export const themeOptions = [
{ id: "default-dark", name: "默认暗色" },
{ id: "default-light", name: "默认亮色" },
] satisfies { id: ThemeId; name: string }[];
export function isThemeId(value: string | null): value is ThemeId {
return value !== null && themeIds.some((id) => id === value);
}
export function applyTheme(themeId: ThemeId) {
document.documentElement.dataset.theme = themeId;
}