diff options
author | Alystrasz <contact@remyraes.com> | 2022-01-11 16:35:30 +0100 |
---|---|---|
committer | Alystrasz <contact@remyraes.com> | 2022-01-11 16:35:30 +0100 |
commit | 2682e37420b00d3c3add4ce22209205dab0af57f (patch) | |
tree | 2f9b2c4634004f4dc1c9757b74deb63485a368ab /src/utils.js | |
parent | 62249076008a49082471e87df6aef4f4a3829290 (diff) | |
download | Viper-2682e37420b00d3c3add4ce22209205dab0af57f.tar.gz Viper-2682e37420b00d3c3add4ce22209205dab0af57f.zip |
[feat] sending a notification when an update is available during game session
Diffstat (limited to 'src/utils.js')
-rw-r--r-- | src/utils.js | 6 |
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(); |