SwitchUser.vue 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!--
  2. Switch user
  3. Barre qui s'affiche lorsque l'utilisateur possède un compte multi user
  4. -->
  5. <template>
  6. <UiSystemBar v-if="show" class="theme-info">
  7. <v-icon small icon="fas fa-info-circle" />
  8. <span>
  9. {{ $t('multi_account_alert_part1') }} <strong>{{ fullName }}</strong>
  10. {{ $t('multi_account_alert_part2') }}
  11. </span>
  12. <v-icon class="pl-1" small icon="fa fa-users" /> &nbsp;{{
  13. $t('multi_account_alert_part3')
  14. }}
  15. </UiSystemBar>
  16. </template>
  17. <script setup lang="ts">
  18. import { useAccessProfileStore } from '~/stores/accessProfile'
  19. import { useMenu } from '~/composables/layout/useMenu'
  20. const accessProfile = useAccessProfileStore()
  21. const { hasMenu } = useMenu()
  22. const show = computed(() => hasMenu('MyFamily'))
  23. const fullName = `${accessProfile.givenName} ${accessProfile.name}`
  24. </script>
  25. <style scoped lang="scss">
  26. .v-system-bar {
  27. font-size: 14px;
  28. }
  29. .v-icon {
  30. height: 20px;
  31. margin: 0 6px;
  32. }
  33. </style>