chore: Cache the dashboard app on the first load (#6774)

This commit is contained in:
Pranav Raj S
2023-04-18 19:44:57 -07:00
committed by GitHub
parent c5c36af529
commit e6505fc7a4
2 changed files with 19 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div class="dashboard-app--container">
<div v-if="hasOpenedAtleastOnce" class="dashboard-app--container">
<div
v-for="(configItem, index) in config"
:key="index"
@@ -35,9 +35,14 @@ export default {
type: Object,
default: () => ({}),
},
isVisible: {
type: Boolean,
default: false,
},
},
data() {
return {
hasOpenedAtleastOnce: false,
iframeLoading: true,
};
},
@@ -57,6 +62,13 @@ export default {
return { id, name, email };
},
},
watch: {
isVisible() {
if (this.isVisible) {
this.hasOpenedAtleastOnce = true;
}
},
},
mounted() {
window.onmessage = e => {