mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-28 14:17:25 +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,17 +1,17 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { platform } from "@yaakapp-internal/platform";
|
||||
|
||||
export function enableEncryption(workspaceId: string) {
|
||||
return invoke<void>("cmd_enable_encryption", { workspaceId });
|
||||
return platform.rpc<void>("cmd_enable_encryption", { workspaceId });
|
||||
}
|
||||
|
||||
export function revealWorkspaceKey(workspaceId: string) {
|
||||
return invoke<string>("cmd_reveal_workspace_key", { workspaceId });
|
||||
return platform.rpc<string>("cmd_reveal_workspace_key", { workspaceId });
|
||||
}
|
||||
|
||||
export function setWorkspaceKey(args: { workspaceId: string; key: string }) {
|
||||
return invoke<void>("cmd_set_workspace_key", args);
|
||||
return platform.rpc<void>("cmd_set_workspace_key", args);
|
||||
}
|
||||
|
||||
export function disableEncryption(workspaceId: string) {
|
||||
return invoke<void>("cmd_disable_encryption", { workspaceId });
|
||||
return platform.rpc<void>("cmd_disable_encryption", { workspaceId });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user