mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-30 17:48:50 +02:00
Fix invoke calls in dialog & shell init scripts (#675)
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// Copyright 2019-2023 Tauri Programme within The Commons Conservancy
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { invoke } from "@tauri-apps/api/primitives";
|
||||
|
||||
window.alert = function (message: string) {
|
||||
invoke("plugin:dialog|message", {
|
||||
message: message.toString(),
|
||||
});
|
||||
};
|
||||
|
||||
// @ts-expect-error tauri does not have sync IPC :(
|
||||
window.confirm = function (message: string) {
|
||||
return invoke("plugin:dialog|confirm", {
|
||||
message: message.toString(),
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user