[fix] building errors 2/3
This commit is contained in:
13
src/hooks/tauri/theme.ts
Normal file
13
src/hooks/tauri/theme.ts
Normal 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,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user