From a121c08dc49c72501c30f20a3e31ed9dc4e1688d Mon Sep 17 00:00:00 2001 From: Jonas Date: Tue, 23 May 2023 05:36:42 +0200 Subject: [PATCH] UI: Check for secure context instead of HTTPS (#114) --- server/ui-src/App.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/ui-src/App.vue b/server/ui-src/App.vue index 3e8e6a4..0f31fce 100644 --- a/server/ui-src/App.vue +++ b/server/ui-src/App.vue @@ -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";