From 2682e37420b00d3c3add4ce22209205dab0af57f Mon Sep 17 00:00:00 2001 From: Alystrasz Date: Tue, 11 Jan 2022 16:35:30 +0100 Subject: [feat] sending a notification when an update is available during game session --- src/utils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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(); -- cgit v1.2.3