Added message handler

This commit is contained in:
Matthew Raymer
2023-11-04 08:46:48 -04:00
parent 2d38183dce
commit ee28b18b14
2 changed files with 78 additions and 0 deletions

View File

@@ -278,6 +278,7 @@ export default class App extends Vue {
});
}
private askPermission(): Promise<NotificationPermission> {
// Check if Notifications are supported
if (!("Notification" in window)) {
@@ -311,6 +312,7 @@ export default class App extends Vue {
});
}
async turnOnNotifications() {
return this.askPermission()
.then((permission) => {