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="inline-flex flex-wrap items-center justify-center gap-x-2 py-3"
  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-sm text-blue-800 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>