mirror of
https://github.com/aphrody-labs/plugins-workspace.git
synced 2026-10-17 12:36:30 +00:00
fix(notification): Fix init.js script for use without global tauri object. (#414)
This commit is contained in:
1 parent
cf5864266e
commit
d8b4aca69f
2 files changed
+7
-2
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"notification": patch
|
||||
---
|
||||
|
||||
Use `window.__TAURI_INVOKE__` instead of `window.__TAURI__` in init.js, fixes usage in apps without `withGlobalTauri` enabled.
|
||||
@@ -10,7 +10,7 @@
|
||||
if (window.Notification.permission !== "default") {
|
||||
return Promise.resolve(window.Notification.permission === "granted");
|
||||
}
|
||||
return window.__TAURI__.invoke("plugin:notification|is_permission_granted");
|
||||
return window.__TAURI_INVOKE__("plugin:notification|is_permission_granted");
|
||||
}
|
||||
|
||||
function setNotificationPermission(value) {
|
||||
@@ -34,7 +34,7 @@
|
||||
Object.freeze(options);
|
||||
}
|
||||
|
||||
return window.__TAURI__.invoke("plugin:notification|notify", {
|
||||
return window.__TAURI_INVOKE__("plugin:notification|notify", {
|
||||
options:
|
||||
typeof options === "string"
|
||||
? {
|
||||
|
||||
Reference in new issue
Block a user