forked from andyburke/autonomous.contact
feature: add qr codes to the invite popup
feature: starting work on notifications fix: some styling updates
This commit is contained in:
parent
7b3494cc32
commit
9ab3950502
7 changed files with 97 additions and 32 deletions
|
|
@ -1,14 +1,25 @@
|
|||
const NOTIFICATIONS = {
|
||||
_notifications: [],
|
||||
|
||||
send: function (message, options = {}) {
|
||||
if (!Notification || Notification.permission !== "granted") {
|
||||
return;
|
||||
}
|
||||
|
||||
const notification = new Notification(message, options);
|
||||
this._notifications.push( notification );
|
||||
return notification;
|
||||
},
|
||||
|
||||
request_permissions: function () {
|
||||
close: function() {
|
||||
for ( const notification of this._notifications ) {
|
||||
notification?.close();
|
||||
}
|
||||
|
||||
this._notifications.length = 0;
|
||||
},
|
||||
|
||||
request_permission: function () {
|
||||
if (Notification && Notification.permission === "granted") {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue