mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-29 06:37:12 +02:00
Add a typed platform package to decouple the frontend from Tauri (#539)
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
0068be9ffc
commit
2383f06e71
@@ -1,9 +1,9 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { platform } from "@yaakapp-internal/platform";
|
||||
|
||||
export function setWindowTitle(title: string) {
|
||||
invoke("plugin:yaak-mac-window|set_title", { title }).catch(console.error);
|
||||
platform.rpc("plugin:yaak-mac-window|set_title", { title }).catch(console.error);
|
||||
}
|
||||
|
||||
export function setWindowTheme(bgColor: string) {
|
||||
invoke("plugin:yaak-mac-window|set_theme", { bgColor }).catch(console.error);
|
||||
platform.rpc("plugin:yaak-mac-window|set_theme", { bgColor }).catch(console.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user