mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-10-10 22:38:44 +02:00
fix(dialog): browser confirm fails with command not found (#3665)
This commit is contained in:
3 files changed
+13
-4
No files matched your search
@@ -19,7 +19,10 @@ window.alert = function (message: string) {
|
||||
|
||||
// @ts-expect-error tauri does not have sync IPC :(
|
||||
window.confirm = async function (message: string) {
|
||||
return await invoke('plugin:dialog|confirm', {
|
||||
message: message.toString()
|
||||
})
|
||||
return (
|
||||
(await invoke<string>('plugin:dialog|message', {
|
||||
message: message.toString(),
|
||||
buttons: 'OkCancel'
|
||||
})) === 'Ok'
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user