aboutsummaryrefslogtreecommitdiff
path: root/src/index.js
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-02-26 00:16:08 +0100
committerGitHub <noreply@github.com>2022-02-26 00:16:08 +0100
commitc4fc36d2c9fd732b5c63b7cf47e647c06a33743d (patch)
tree35f2ee022afba594847ec495dc8258610f2a5411 /src/index.js
parente96135cbc3877423f4c6c012c5d7e09436e5b32c (diff)
parentdec0a7d23767b518284ca69f93ce06a0783de8ce (diff)
downloadViper-c4fc36d2c9fd732b5c63b7cf47e647c06a33743d.tar.gz
Viper-c4fc36d2c9fd732b5c63b7cf47e647c06a33743d.zip
Merge pull request #85 from 0neGal/settings-page
feat: Settings page
Diffstat (limited to 'src/index.js')
-rw-r--r--src/index.js14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js
index 95115b4..265e13d 100644
--- a/src/index.js
+++ b/src/index.js
@@ -53,11 +53,23 @@ function start() {
ipcMain.on("installedmod", (event, modname) => {win.webContents.send("installedmod", modname)});
ipcMain.on("guigetmods", (event, ...args) => {win.webContents.send("mods", utils.mods.list())});
+ ipcMain.on("savesettings", (event, obj) => {utils.saveSettings(obj)})
+
+ ipcMain.on("can-autoupdate", (event) => {
+ if (! require("electron-updater").autoUpdater.isUpdaterActive()) {
+ win.webContents.send("cant-autoupdate")
+ }
+ })
+
win.webContents.on("dom-ready", () => {
win.webContents.send("mods", utils.mods.list());
});
- if (utils.settings.autoupdate) {utils.updatevp(false)}
+ if (utils.settings.autoupdate) {
+ utils.updatevp(false)
+ } else {
+ utils.handleNorthstarUpdating();
+ }
autoUpdater.on("update-downloaded", () => {
win.webContents.send("updateavailable")