add notification fallback to use Notify.show()

cpsdqs/unified-input
Ondřej Hruška 7 years ago
parent 2921566cc3
commit 2b3a5b4b55
  1. 3
      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);
}
}

Loading…
Cancel
Save