diff options
author | 0neGal <mail@0negal.com> | 2022-01-08 18:00:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-08 18:00:04 +0100 |
commit | dc36aff8d0872b1fbfae265b97d8589c19d6ea5c (patch) | |
tree | 82cf9a466751d4b898eff4a47cafce0bed6bbeec /src | |
parent | 61384d15d1fb34511cdb78690b5ec4e2f7d7a7c4 (diff) | |
parent | f6f940a976702a8dfb97cb2f53754faf774ad2cc (diff) | |
download | Viper-dc36aff8d0872b1fbfae265b97d8589c19d6ea5c.tar.gz Viper-dc36aff8d0872b1fbfae265b97d8589c19d6ea5c.zip |
Merge pull request #32 from Alystrasz/fix/version-indicator
fix: Displaying northstar version on first launch
Diffstat (limited to 'src')
-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); |