From 16f92c8173d3bdfca3fa8f973b34c9709a61306e Mon Sep 17 00:00:00 2001 From: Travis Shivers Date: Fri, 24 Jul 2020 18:32:28 -0500 Subject: [PATCH] Add notice that popup notifications don't work in http --- .../{sidebars => }/chatsettings.vue | 19 ++++++++++++++++--- src/components/sidebars/rightsidebar.vue | 2 +- 2 files changed, 17 insertions(+), 4 deletions(-) rename src/components/{sidebars => }/chatsettings.vue (71%) diff --git a/src/components/sidebars/chatsettings.vue b/src/components/chatsettings.vue similarity index 71% rename from src/components/sidebars/chatsettings.vue rename to src/components/chatsettings.vue index c6600687..6bbf4689 100644 --- a/src/components/sidebars/chatsettings.vue +++ b/src/components/chatsettings.vue @@ -20,18 +20,27 @@ /> - Popup notifications + + Popup notifications + + + Popup notifications are only available in secure contexts (HTTPS) + + - Sound notifications + + Sound notifications + @@ -63,6 +72,10 @@ export default { 'ARE_NOTIFICATIONS_ENABLED', 'ARE_SOUND_NOTIFICATIONS_ENABLED', ]), + + isHttp() { + return window.location.protocol === 'http:'; + }, }, methods: { diff --git a/src/components/sidebars/rightsidebar.vue b/src/components/sidebars/rightsidebar.vue index c4e04b45..2e854f49 100644 --- a/src/components/sidebars/rightsidebar.vue +++ b/src/components/sidebars/rightsidebar.vue @@ -222,7 +222,7 @@ export default { components: { messages: () => import('@/components/messaging/messages.vue'), MessageInput: () => import('@/components/messaging/MessageInput.vue'), - chatsettings: () => import('@/components/sidebars/chatsettings.vue'), + chatsettings: () => import('@/components/chatsettings.vue'), }, mixins: [