diff options
author | Alystrasz <contact@remyraes.com> | 2022-01-10 20:18:57 +0100 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2022-01-10 20:18:57 +0100 |
commit | 06d67801dc94d0b9fb359213d95ec5fba3e0c6ba (patch) | |
tree | 4f5514be3d82dca962cd5fed67dd2f422da0c6a1 /src/index.js | |
parent | 3d96636bb0bbdc271d49999f7a10216690a19157 (diff) | |
parent | 9dbf85ca6655d8b14c8f0ad090a9b30e1ec951cf (diff) | |
download | Viper-06d67801dc94d0b9fb359213d95ec5fba3e0c6ba.tar.gz Viper-06d67801dc94d0b9fb359213d95ec5fba3e0c6ba.zip |
Merge branch 'main' into feat/northstar-auto-update
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/index.js b/src/index.js index 09aa626..1b594ad 100644 --- a/src/index.js +++ b/src/index.js @@ -77,7 +77,7 @@ ipcMain.on("update", (event) => {utils.update()}) ipcMain.on("setpathcli", (event) => {utils.setpath()}); ipcMain.on("setpath", (event, value) => { if (!value) { - utils.setpath(win) + utils.setpath(win); } else if (!win.isVisible()) { win.show(); } @@ -87,6 +87,7 @@ ipcMain.on("newpath", (event, newpath) => { if (newpath === false && !win.isVisible()) { win.webContents.send("nopathselected"); } else { + _sendVersionsInfo(); if (!win.isVisible()) { win.show(); } @@ -95,12 +96,14 @@ ipcMain.on("newpath", (event, newpath) => { win.webContents.send("wrongpath"); }); -ipcMain.on("getversion", () => { +function _sendVersionsInfo() { win.webContents.send("version", { ns: utils.getNSVersion(), vp: "v" + require("../package.json").version }); -}); +} + +ipcMain.on("getversion", () => _sendVersionsInfo()); ipcMain.on("versioncli", () => { console.log("Viper: v" + require("../package.json").version); |