[fix] building errors 2/3

This commit is contained in:
2025-03-14 19:13:32 +08:00
parent d0872af38c
commit 8907160c3b
5 changed files with 79 additions and 18 deletions

13
src/hooks/tauri/theme.ts Normal file
View File

@@ -0,0 +1,13 @@
import { invoke } from "@tauri-apps/api/core"
type Theme = "auto" | "light" | "dark"
export async function getTheme() {
return invoke<Theme>("plugin:theme|get_theme")
}
export function setTheme(theme: Theme) {
return invoke("plugin:theme|set_theme", {
theme: theme,
})
}