Skip to content

Commit

Permalink
Fix: Fix browser notification request on Edge (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
axllent committed Nov 7, 2024
1 parent ccef1ae commit d448211
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/ui-src/components/AboutMailpit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,12 @@ export default {
// we need to ask the user for permission
else if (Notification.permission !== "denied") {
Notification.requestPermission().then(function (permission) {
Notification.requestPermission().then((permission) => {
if (permission === "granted") {
mailbox.notificationsEnabled = true
}
this.modal('EnableNotificationsModal').hide()
})
}
},
Expand Down Expand Up @@ -239,8 +241,9 @@ export default {
</div>
<div class="modal-footer">
<button type="button" class="btn btn-outline-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="button" class="btn btn-success" data-bs-dismiss="modal"
v-on:click="requestNotifications">Enable notifications</button>
<button type="button" class="btn btn-success" v-on:click="requestNotifications">
Enable notifications
</button>
</div>
</div>
</div>
Expand Down

0 comments on commit d448211

Please sign in to comment.