Poll on page refresh; validate subscribe dialog properly; avoid save-races
This commit is contained in:
parent
aa79fe2861
commit
e422c2c479
10 changed files with 96 additions and 37 deletions
|
@ -1,9 +1,9 @@
|
|||
import {formatMessage, formatTitle} from "./utils";
|
||||
import {formatMessage, formatTitleWithFallback, topicShortUrl} from "./utils";
|
||||
|
||||
class NotificationManager {
|
||||
notify(subscription, notification, onClickFallback) {
|
||||
const message = formatMessage(notification);
|
||||
const title = formatTitle(notification);
|
||||
const title = formatTitleWithFallback(notification, topicShortUrl(subscription.baseUrl, subscription.topic));
|
||||
const n = new Notification(title, {
|
||||
body: message,
|
||||
icon: '/static/img/favicon.png'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue