aboutsummaryrefslogtreecommitdiff
path: root/src/app/main.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-08 21:13:20 +0100
committerGitHub <noreply@github.com>2022-02-08 21:13:20 +0100
commit1bd83cf1a72332e142bb63acab47ac3877061875 (patch)
tree5670e225378ebcb0e73efb0c84265357f74f00cb /src/app/main.js
parentd55f84536814238d8ea79acdae47dbdf269953f1 (diff)
parente2aa874f48dc585f0d67c5655df234bdf356cc53 (diff)
downloadViper-1bd83cf1a72332e142bb63acab47ac3877061875.tar.gz
Viper-1bd83cf1a72332e142bb63acab47ac3877061875.zip
Merge branch 'main' into thunderstore
Diffstat (limited to 'src/app/main.js')
-rw-r--r--src/app/main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/app/main.js b/src/app/main.js
index 08c70c1..169f86f 100644
--- a/src/app/main.js
+++ b/src/app/main.js
@@ -27,13 +27,11 @@ if (fs.existsSync("viper.json")) {
settings.zip = path.join(settings.gamepath + "/northstar.zip");
if (settings.gamepath.length === 0) {
- alert(lang("general.missingpath"));
setpath(false);
} else {
setpath(true);
}
} else {
- alert(lang("general.missingpath"));
setpath();
}
@@ -173,6 +171,7 @@ function installFromURL(url) {
// Frontend part of settings a new game path
ipcRenderer.on("newpath", (event, newpath) => {
settings.gamepath = newpath;
+ ipcRenderer.send("guigetmods");
})
// Continuation of log()
@@ -182,6 +181,8 @@ ipcRenderer.on("alert", (event, msg) => {alert(msg)})
// Updates the installed mods
ipcRenderer.on("mods", (event, mods) => {
modsobj = mods;
+ if (! mods) {return}
+
modcount.innerHTML = `${lang("gui.mods.count")} ${mods.all.length}`;
modsdiv.innerHTML = "";