mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-12-01 01:05:10 +08:00
refactor: rebuild desktop app with Tauri
This commit is contained in:
1 parent
a3ec2a0dfc
commit
4053a7fb20
808 files changed
+87359
-181491
No files matched your search
@@ -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;
|
||||
}
|
||||
Reference in new issue
Block a user