👔 Adds logic to show dialog on critical error

This commit is contained in:
Alicia Sykes 2024-04-21 22:28:50 +01:00
parent a138602670
commit 2ce3b29ad2

View File

@ -3,8 +3,8 @@
<EditModeTopBanner v-if="isEditMode" /> <EditModeTopBanner v-if="isEditMode" />
<LoadingScreen :isLoading="isLoading" v-if="shouldShowSplash" /> <LoadingScreen :isLoading="isLoading" v-if="shouldShowSplash" />
<Header :pageInfo="pageInfo" /> <Header :pageInfo="pageInfo" />
<CriticalError />
<router-view v-if="!isFetching" /> <router-view v-if="!isFetching" />
<CriticalError v-if="hasCriticalError" />
<Footer :text="footerText" v-if="visibleComponents.footer && !isFetching" /> <Footer :text="footerText" v-if="visibleComponents.footer && !isFetching" />
</div> </div>
</template> </template>
@ -75,6 +75,9 @@ export default {
isEditMode() { isEditMode() {
return this.$store.state.editMode; return this.$store.state.editMode;
}, },
hasCriticalError() {
return this.$store.state.criticalError;
},
subPageClassName() { subPageClassName() {
const currentSubPage = this.$store.state.currentConfigInfo; const currentSubPage = this.$store.state.currentConfigInfo;
return (currentSubPage && currentSubPage.pageId) ? currentSubPage.pageId : ''; return (currentSubPage && currentSubPage.pageId) ? currentSubPage.pageId : '';