aboutsummaryrefslogtreecommitdiff
path: root/src/app/js
diff options
context:
space:
mode:
authorJan200101 <sentrycraft123@gmail.com>2024-08-14 19:57:47 +0200
committerJan200101 <sentrycraft123@gmail.com>2024-08-14 19:57:47 +0200
commitb578362de216142959ef9511510c06d5446e355f (patch)
tree2c320200d40b2981223dfc0afb654768c9486792 /src/app/js
parent723c9eb8f87e434d4d00c7ac82ac06f7a8436c32 (diff)
downloadViper-b578362de216142959ef9511510c06d5446e355f.tar.gz
Viper-b578362de216142959ef9511510c06d5446e355f.zip
chore: display alert when mod install via protocol cannot be resolved
Diffstat (limited to 'src/app/js')
-rw-r--r--src/app/js/mods.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/js/mods.js b/src/app/js/mods.js
index 349f5b9..bca417e 100644
--- a/src/app/js/mods.js
+++ b/src/app/js/mods.js
@@ -1,3 +1,4 @@
+const util = require('util');
const ipcRenderer = require("electron").ipcRenderer;
const lang = require("../../lang");
@@ -338,13 +339,13 @@ ipcRenderer.on("protocol-install-mod", async (event, data) => {
const package = packages.find((package) => { return package.owner == author && package.name == package_name; })
if (!package) {
- console.error("Couldn't find package")
+ alert(util.format(lang("gui.mods.cant_find_specific"), author, package_name));
return;
}
const package_obj = package.versions.find((package_version) => { return package_version.version_number == version; })
if (!package_obj) {
- console.error("Couldn't find package_version")
+ alert(util.format(lang("gui.mods.cant_find_version"), version, author, package_name))
return;
}