From e77ac64018bec2ca98e2264fafd6db02990ef741 Mon Sep 17 00:00:00 2001 From: 0neGal Date: Mon, 3 Jan 2022 02:43:10 +0100 Subject: mod buttons are now disabled if NS isn't installed --- src/app/index.html | 2 +- src/app/main.js | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/index.html b/src/app/index.html index 88cfbb5..88d5a17 100644 --- a/src/app/index.html +++ b/src/app/index.html @@ -30,7 +30,7 @@
%%gui.mods%%
-
+
diff --git a/src/app/main.js b/src/app/main.js index 8db6561..6f2493a 100644 --- a/src/app/main.js +++ b/src/app/main.js @@ -129,6 +129,14 @@ ipcRenderer.on("mods", (event, mods) => { ipcRenderer.on("version", (event, versions) => { vpversion.innerText = lang("gui.versions.viper") + ": " + versions.vp; nsversion.innerText = lang("gui.versions.northstar") + ": " + versions.ns; + + if (versions.ns == "unknown") { + let buttons = document.querySelectorAll(".modbtns button"); + + for (let i = 0; i < buttons.length; i++) { + buttons[i].disabled = true; + } + } }); ipcRenderer.send("getversion"); ipcRenderer.on("updateavailable", () => { -- cgit v1.2.3