CommonPublicLinks.vue 909 B

123456789101112131415161718192021222324252627282930
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { usePublicLinks } from '#shared/composables/usePublicLinks.ts'
  4. import { EnumPublicLinksScreen } from '#shared/graphql/types.ts'
  5. interface Props {
  6. screen: EnumPublicLinksScreen
  7. }
  8. const props = defineProps<Props>()
  9. const { links } = usePublicLinks(props.screen)
  10. </script>
  11. <template>
  12. <nav
  13. v-if="links.length"
  14. class="py-3 justify-center items-center gap-x-2 flex-wrap inline-flex"
  15. >
  16. <template v-for="link in links" :key="link.id">
  17. <CommonLink
  18. :link="link.link"
  19. :title="link.description"
  20. :open-in-new-tab="link.newTab"
  21. class="text-blue-800 text-sm after:ml-2 after:font-medium after:text-neutral-500 after:content-['|'] last:after:content-none"
  22. >
  23. {{ $t(link.title) }}
  24. </CommonLink>
  25. </template>
  26. </nav>
  27. </template>