Env.vue 522 B

1234567891011121314151617181920212223
  1. <!--
  2. Env bar
  3. Barre d'alerte qui s'affiche lorsque l'utilisateur n'est pas dans un environnement de production
  4. -->
  5. <template>
  6. <UiSystemBar
  7. v-if="show"
  8. :text="$t('not_production_environment', { env: env })"
  9. icon="fas fa-exclamation-triangle"
  10. background-color="ot-warning"
  11. text-color="ot-white" />
  12. </template>
  13. <script setup lang="ts">
  14. const runtimeConfig = useRuntimeConfig()
  15. const env = runtimeConfig.env ?? 'unknown'
  16. console.log(env)
  17. const show = env !== 'production'
  18. </script>