aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
authorGitExample <git@example.com>2022-02-03 01:36:11 +0100
committerGitExample <git@example.com>2022-02-03 01:36:11 +0100
commita4b11903979fdb4c8b0f6dda8f7343e14c1ebe17 (patch)
tree408def0b839140c6004ba5099c3abf0cc2319bea /src/index.js
parentd3228ae7fad117a8313731107f572ba4879569b6 (diff)
downloadViper-a4b11903979fdb4c8b0f6dda8f7343e14c1ebe17.tar.gz
Viper-a4b11903979fdb4c8b0f6dda8f7343e14c1ebe17.zip
detection of installed mods, disabling buttons
When a new mod has been installed through the browser UI it's button is changed from "Install" to "Re-Install" instantly. We also now disable modding related buttons when updating NS, or when installing mods. This should prevent issues.
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 4849b72..a847020 100644
--- a/src/index.js
+++ b/src/index.js
@@ -43,11 +43,12 @@ function start() {
ipcMain.on("exit", () => {process.exit(0)})
ipcMain.on("minimize", () => {win.minimize()})
+ ipcMain.on("installfromurl", (event, url) => {utils.mods.installFromURL(url)})
ipcMain.on("winLog", (event, ...args) => {win.webContents.send("log", ...args)});
ipcMain.on("winAlert", (event, ...args) => {win.webContents.send("alert", ...args)});
ipcMain.on("ns-update-event", (event) => win.webContents.send("ns-update-event", event));
ipcMain.on("guigetmods", (event, ...args) => {win.webContents.send("mods", utils.mods.list())});
- ipcMain.on("installfromurl", (event, url) => {utils.mods.installFromURL(url)})
+ ipcMain.on("installedmod", (event, modname) => {console.log(modname);win.webContents.send("installedmod", modname)})
win.webContents.on("dom-ready", () => {
win.webContents.send("mods", utils.mods.list());