merge master
This commit is contained in:
commit
a08cbde7b0
45 changed files with 881 additions and 462 deletions
|
|
@ -53,16 +53,16 @@ export function registerServiceWorker() {
|
|||
}
|
||||
}
|
||||
|
||||
export function requestNotificationPermission() {
|
||||
export async function requestNotificationPermission() {
|
||||
if("PushManager" in window) {
|
||||
window.Notification.requestPermission();
|
||||
return Notification?.requestPermission().then((permission) => permission);
|
||||
} else {
|
||||
console.log("No Push API Support!");
|
||||
}
|
||||
}
|
||||
|
||||
export function windowNotificationPermission() {
|
||||
return window.Notification.permission
|
||||
return window?.Notification?.permission ?? 'Not_supported'
|
||||
}
|
||||
|
||||
export function notificationCount() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue