diff options
author | Alystrasz <contact@remyraes.com> | 2021-12-30 00:04:55 +0100 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2021-12-30 00:04:55 +0100 |
commit | 93482ac6169a62854e360fde92abf7640389361b (patch) | |
tree | 3d276a270e68d0552408bf7b05342d1ee55942d4 /src/index.js | |
parent | d402e6236b6d0523a1dfce0c9203f1cbeb907e4f (diff) | |
download | Viper-93482ac6169a62854e360fde92abf7640389361b.tar.gz Viper-93482ac6169a62854e360fde92abf7640389361b.zip |
[feat] displaying installed northstar version
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js index 3520914..c20e8e0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,6 +1,6 @@ const fs = require("fs"); const path = require("path"); -const { app, dialog, ipcMain, BrowserWindow } = require("electron"); +const { app, dialog, ipcMain, BrowserWindow, ipcRenderer } = require("electron"); const Emitter = require("events"); const events = new Emitter(); @@ -37,7 +37,13 @@ ipcMain.on("setlang", (event, lang) => {utils.setlang(lang)}) ipcMain.on("launchVanilla", (event) => {utils.launch("vanilla")}) ipcMain.on("update", (event) => {utils.update()}) -ipcMain.on("setpathcli", (event) => {utils.setpath()}) +ipcMain.on("setpathcli", (event) => {utils.setpath()}); + +ipcMain.on('getVersionInfo', () => { + win.webContents.send('versionInfo', { + ns: utils.getInstalledVersion() + }); +}); process.chdir(app.getPath("appData")); |