fix(dialog): browser confirm fails with command not found (#3665)

This commit is contained in:
Tony authored and GitHub committed 2026-10-08 16:11:16 +08:00
1 parent 7eb8246d47
commit 848957565b
3 files changed
+13 -4

No files matched your search

+6 -3
View File
@@ -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'
)
}