From 2b3a5b4b558252b7b902c967ba19a7129ae9d2db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Hru=C5=A1ka?= Date: Sun, 10 Sep 2017 03:04:32 +0200 Subject: [PATCH] add notification fallback to use Notify.show() --- jssrc/term_screen.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jssrc/term_screen.js b/jssrc/term_screen.js index c4b3ec7..cd343c4 100644 --- a/jssrc/term_screen.js +++ b/jssrc/term_screen.js @@ -910,6 +910,7 @@ class TermScreen { } showNotification (text) { + console.log(`Notification: ${text}`); // TODO: request permission earlier // the requestPermission should be user-triggered; asking upfront seems // a little awkward @@ -918,6 +919,8 @@ class TermScreen { body: text }); notification.addEventListener('click', () => window.focus()); + } else { + Notify.show(text); } }