From c3e045eeea472ab9a650633b97a88f7a4ce572dd Mon Sep 17 00:00:00 2001 From: Remi PLANEL <rplanel@pasteur.fr> Date: Wed, 19 Feb 2025 11:06:44 +0100 Subject: [PATCH] set runtime env maintenace to false --- frontend/components/Main.vue | 6 +++--- frontend/middleware/maintenance.global.ts | 1 + frontend/nuxt.config.ts | 1 + 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/frontend/components/Main.vue b/frontend/components/Main.vue index 7147d75..d596812 100644 --- a/frontend/components/Main.vue +++ b/frontend/components/Main.vue @@ -42,13 +42,13 @@ function onScroll() { <v-col cols="auto"> <v-card flat color="transparent" :min-width="computedMinWidth" :max-width="props.fluid ? undefined : maxWidth"> - <v-alert v-if="runtimeConfig.public.displayMessage === true" class="my-5" type="warning" variant="tonal" border="start" prominent> + <v-alert v-if="runtimeConfig.public?.displayMessage === true" class="my-5" type="warning" variant="tonal" border="start" prominent> Following an electric maintenance in the datacenter, our web application is currently experiencing technical difficulties and may not be functioning as expected. Our technical team is working diligently to resolve the issue as soon as possible. We apologize for any inconvenience this may cause and appreciate your patience and understanding. </v-alert> - <v-alert v-if="runtimeConfig.public.maintenance.enabled === true" class="my-5" type="warning" variant="tonal" border="start" prominent> - {{ runtimeConfig.public.maintenance.message }} + <v-alert v-if="runtimeConfig.public?.maintenance?.enabled === true" class="my-5" type="warning" variant="tonal" border="start" prominent> + {{ runtimeConfig.public.maintenance?.message }} </v-alert> <slot /> diff --git a/frontend/middleware/maintenance.global.ts b/frontend/middleware/maintenance.global.ts index 634a73f..295ff6e 100644 --- a/frontend/middleware/maintenance.global.ts +++ b/frontend/middleware/maintenance.global.ts @@ -1,6 +1,7 @@ export default defineNuxtRouteMiddleware((to, from) => { const runtimeConfig = useRuntimeConfig() + const appConfig const isMaintenance = runtimeConfig?.public?.maintenance === true if (!isMaintenance) return; diff --git a/frontend/nuxt.config.ts b/frontend/nuxt.config.ts index c6ebe45..86d6cbd 100644 --- a/frontend/nuxt.config.ts +++ b/frontend/nuxt.config.ts @@ -18,6 +18,7 @@ export default defineNuxtConfig({ dfApiPrefix: "/dfapi", version: pkg.version, displayMessage: false, + maintenance: false, } }, modules: [ -- GitLab