Subscribe endpoint consolidation; same behavior for all endpoints; keepalive

This commit is contained in:
Philipp Heckel 2021-10-27 14:56:17 -04:00
parent b72afb1695
commit a38aca47bd
8 changed files with 154 additions and 93 deletions

View file

@ -60,7 +60,7 @@ const subscribeInternal = (topic, delaySec) => {
eventSource.onmessage = (e) => {
const event = JSON.parse(e.data);
notifySound.play();
new Notification(topic, {
new Notification(`${location.host}/${topic}`, {
body: event.message,
icon: '/static/img/favicon.png'
});