Skip to content
Snippets Groups Projects
Commit aaf21e78 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Merge branch '496-service-worker-safari-does-not-support-broadcastchannel-api-2' into 'master'

Resolve "[Service Worker] Safari does not support BroadcastChannel API"

Closes #496

See merge request !1161
parents c589589c 0b779e76
No related branches found
No related tags found
1 merge request!1161Resolve "[Service Worker] Safari does not support BroadcastChannel API"
Pipeline #110917 failed
...@@ -56,8 +56,6 @@ ...@@ -56,8 +56,6 @@
</v-app-bar> </v-app-bar>
<v-main> <v-main>
<v-container> <v-container>
<broadcast-channel-notification channel-name="cache-or-not" />
<message-box type="warning" v-if="$root.offline"> <message-box type="warning" v-if="$root.offline">
{{ $t("network_errors.offline_notification") }} {{ $t("network_errors.offline_notification") }}
</message-box> </message-box>
...@@ -203,7 +201,6 @@ ...@@ -203,7 +201,6 @@
</template> </template>
<script> <script>
import BroadcastChannelNotification from "./BroadcastChannelNotification.vue";
import AccountMenu from "./AccountMenu.vue"; import AccountMenu from "./AccountMenu.vue";
import NotificationList from "../notifications/NotificationList.vue"; import NotificationList from "../notifications/NotificationList.vue";
import CeleryProgressBottom from "../celery_progress/CeleryProgressBottom.vue"; import CeleryProgressBottom from "../celery_progress/CeleryProgressBottom.vue";
...@@ -268,7 +265,6 @@ export default { ...@@ -268,7 +265,6 @@ export default {
name: "App", name: "App",
components: { components: {
AccountMenu, AccountMenu,
BroadcastChannelNotification,
ErrorPage, ErrorPage,
NotificationList, NotificationList,
CeleryProgressBottom, CeleryProgressBottom,
......
<template>
<message-box :value="show" type="warning">
{{ $t("alerts.page_cached") }}
</message-box>
</template>
<script>
export default {
name: "BroadcastChannelNotification",
props: {
channelName: {
type: String,
required: true,
},
},
data() {
return {
show: false,
};
},
created() {
this.channel = new BroadcastChannel(this.channelName);
this.channel.onmessage = (event) => {
this.show = event.data === true;
};
},
destroyed() {
this.channel.close();
},
};
</script>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment