Add notice that popup notifications don't work in http

This commit is contained in:
Travis Shivers 2020-07-24 18:32:28 -05:00
parent af313ea430
commit 16f92c8173
No known key found for this signature in database
GPG Key ID: EE4CC2891B8FCD33
2 changed files with 17 additions and 4 deletions

View File

@ -20,18 +20,27 @@
/>
</v-list-item-action>
<v-list-item-title>Popup notifications</v-list-item-title>
<v-list-item-content>
<v-list-item-title>Popup notifications</v-list-item-title>
<v-list-item-subtitle v-if="isHttp">
Popup notifications are only available in secure contexts (HTTPS)
</v-list-item-subtitle>
</v-list-item-content>
</v-list-item>
<v-list-item>
<v-list-item-action>
<v-switch
:input-value="ARE_SOUND_NOTIFICATIONS_ENABLED"
:disabled="isHttp"
:input-value="ARE_SOUND_NOTIFICATIONS_ENABLED && !isHttp"
@change="SET_ARE_SOUND_NOTIFICATIONS_ENABLED"
/>
</v-list-item-action>
<v-list-item-title>Sound notifications</v-list-item-title>
<v-list-item-content>
<v-list-item-title>Sound notifications</v-list-item-title>
</v-list-item-content>
</v-list-item>
</v-list>
@ -63,6 +72,10 @@ export default {
'ARE_NOTIFICATIONS_ENABLED',
'ARE_SOUND_NOTIFICATIONS_ENABLED',
]),
isHttp() {
return window.location.protocol === 'http:';
},
},
methods: {

View File

@ -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: [