diff options
author | 0neGal <mail@0negal.com> | 2024-06-08 18:20:53 +0200 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2024-06-08 18:21:22 +0200 |
commit | 05b13e99a2ec632c63557c52ec22677b022e7d69 (patch) | |
tree | 63bc4837dc63dc42429f237b5fd9e89d2667acc1 /src/app/js/browser.js | |
parent | a8e0f5f0435ed6cedb4ff389ee31c210dab26100 (diff) | |
download | Viper-05b13e99a2ec632c63557c52ec22677b022e7d69.tar.gz Viper-05b13e99a2ec632c63557c52ec22677b022e7d69.zip |
convert js/toast.js to a CommonJS module
Renamed from `toast.js` to `toasts.js` as well
Diffstat (limited to 'src/app/js/browser.js')
-rw-r--r-- | src/app/js/browser.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app/js/browser.js b/src/app/js/browser.js index 00a0933..9a1298a 100644 --- a/src/app/js/browser.js +++ b/src/app/js/browser.js @@ -480,7 +480,7 @@ ipcRenderer.on("failed-mod", (event, modname) => { add_recent_toast("failed" + modname); set_buttons(true); - new Toast({ + toasts.show({ timeout: 10000, scheme: "error", title: lang("gui.toast.title.failed"), @@ -493,7 +493,7 @@ ipcRenderer.on("legacy-duped-mod", (event, modname) => { add_recent_toast("duped" + modname); set_buttons(true); - new Toast({ + toasts.show({ timeout: 10000, scheme: "warning", title: lang("gui.toast.title.duped"), @@ -503,7 +503,7 @@ ipcRenderer.on("legacy-duped-mod", (event, modname) => { ipcRenderer.on("no-internet", (event, modname) => { set_buttons(true); - new Toast({ + toasts.show({ timeout: 10000, scheme: "error", title: lang("gui.toast.title.no_internet"), @@ -521,7 +521,7 @@ ipcRenderer.on("installed-mod", (event, mod) => { Browser.setbutton(name, lang("gui.browser.reinstall"), "redo"); if (mod.malformed) { - new Toast({ + toasts.show({ timeout: 8000, scheme: "warning", title: lang("gui.toast.title.malformed"), @@ -529,7 +529,7 @@ ipcRenderer.on("installed-mod", (event, mod) => { }) } - new Toast({ + toasts.show({ scheme: "success", title: lang("gui.toast.title.installed"), description: name + " " + lang("gui.toast.desc.installed") |