1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-02-05 13:14:57 +02:00

UI: Check for secure context instead of HTTPS (#114)

This commit is contained in:
Jonas 2023-05-23 05:36:42 +02:00 committed by GitHub
parent 9ff9b783cc
commit a121c08dc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,7 +83,7 @@ export default {
this.currentPath = window.location.hash.slice(1);
});
this.notificationsSupported = 'https:' == document.location.protocol
this.notificationsSupported = window.isSecureContext
&& ("Notification" in window && Notification.permission !== "denied");
this.notificationsEnabled = this.notificationsSupported && Notification.permission == "granted";