Env.vue 615 B

123456789101112131415161718192021222324252627282930
  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 v-if="show" background-color="ot-warning" text-color="ot-white">
  7. <template #bar.text>
  8. <v-icon small>fas fa-exclamation-triangle</v-icon>
  9. {{ $t('not_production_environment', { env }) }}
  10. </template>
  11. </UiSystemBar>
  12. </template>
  13. <script setup lang="ts">
  14. const env = process.env.NODE_ENV
  15. const show = env !== 'production'
  16. </script>
  17. <style scoped lang="scss">
  18. .v-system-bar {
  19. font-size: 14px;
  20. }
  21. .v-icon {
  22. height: 20px;
  23. margin: 0 6px;
  24. }
  25. </style>