aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlystrasz <contact@remyraes.com>2022-01-11 16:35:30 +0100
committerAlystrasz <contact@remyraes.com>2022-01-11 16:35:30 +0100
commit2682e37420b00d3c3add4ce22209205dab0af57f (patch)
tree2f9b2c4634004f4dc1c9757b74deb63485a368ab
parent62249076008a49082471e87df6aef4f4a3829290 (diff)
downloadViper-2682e37420b00d3c3add4ce22209205dab0af57f.tar.gz
Viper-2682e37420b00d3c3add4ce22209205dab0af57f.zip
[feat] sending a notification when an update is available during game session
-rw-r--r--src/utils.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utils.js b/src/utils.js
index 014c601..acda691 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -1,7 +1,7 @@
const path = require("path");
const fs = require("fs-extra");
const copy = require("copy-dir");
-const { app, dialog, ipcMain } = require("electron");
+const { app, dialog, ipcMain, Notification } = require("electron");
const Emitter = require("events");
const events = new Emitter();
@@ -72,6 +72,10 @@ northstar_auto_updates: {
console.log('Northstar update available!');
if (await _isGameRunning()) {
console.log('Not installing update since game is running.');
+ new Notification({
+ title: "Northstar update available",
+ body: 'An update for Northstar is available.\nYou can force its installation after closing the game.'
+ }).show();
} else {
console.log('Launching update process.');
update();