aboutsummaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2024-08-14 20:05:11 +0200
committerJan200101 <sentrycraft123@gmail.com>2024-08-14 20:05:11 +0200
commit9c97e16b85a55cb770d74fa7e44d338a3ad9ce88 (patch)
treeeb2e30892145a3e88fcab9439e3a2e13269ef599 /src/app
parentb578362de216142959ef9511510c06d5446e355f (diff)
downloadViper-9c97e16b85a55cb770d74fa7e44d338a3ad9ce88.tar.gz
Viper-9c97e16b85a55cb770d74fa7e44d338a3ad9ce88.zip
feat: show toast when installing mod through ror2mm protocol
Diffstat (limited to 'src/app')
-rw-r--r--src/app/js/mods.js8
-rw-r--r--src/app/js/toasts.js4
2 files changed, 11 insertions, 1 deletions
diff --git a/src/app/js/mods.js b/src/app/js/mods.js
index bca417e..326b8b9 100644
--- a/src/app/js/mods.js
+++ b/src/app/js/mods.js
@@ -4,6 +4,7 @@ const ipcRenderer = require("electron").ipcRenderer;
const lang = require("../../lang");
const version = require("./version");
+const toasts = require("./toasts");
const set_buttons = require("./set_buttons");
let mods = {};
@@ -349,7 +350,12 @@ ipcRenderer.on("protocol-install-mod", async (event, data) => {
return;
}
- console.log(package_obj);
+ toasts.show({
+ timeout: 3000,
+ scheme: "info",
+ title: lang("gui.mods.installing"),
+ description: lang("gui.toast.desc.installing") + " " + package_obj.full_name
+ })
mods.install_from_url(
package_obj.download_url,
diff --git a/src/app/js/toasts.js b/src/app/js/toasts.js
index 83ddf6a..3fd6899 100644
--- a/src/app/js/toasts.js
+++ b/src/app/js/toasts.js
@@ -24,6 +24,10 @@ toasts.show = (properties) => {
toast.fg = "#FFFFFF";
toast.bg = "#FF9B85";
break
+ case "info":
+ toast.fg = "#FFFFFF";
+ toast.bg = "rgb(var(--blue))";
+ break
}