From a57783a9d806bf83b41047f4dd14b177ded15179 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Thu, 7 Mar 2019 11:41:32 +0200 Subject: [PATCH] add updates available notification --- client/src/modules/updater.js | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/client/src/modules/updater.js b/client/src/modules/updater.js index 5ab5662f..a4260cf5 100644 --- a/client/src/modules/updater.js +++ b/client/src/modules/updater.js @@ -134,7 +134,22 @@ export default new class extends Module { stateChanged(oldState, newState) { if (!newState.updatesAvailable) return Events.emit('update-check-end'); - if (!oldState.updatesAvailable && newState.updatesAvailable) return Events.emit('updates-available'); + if (!oldState.updatesAvailable && newState.updatesAvailable) { + Events.emit('updates-available'); + Notifications.add('', 'Updates Available!', [ + { + text: 'Ignore', + onClick: () => { return true; } + }, + { + text: 'Show Updates', + onClick: () => { + Events.emit('bd-open-menu', 'updater'); + return true; + } + } + ]); + } } setUpdateStatus(updateId, statusChild, statusValue) {