UserTaskbarTabForbidden.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { useUserTaskbarTabLink } from '#desktop/composables/useUserTaskbarTabLink.ts'
  4. import type { UserTaskbarTabEntityProps } from './types.ts'
  5. defineProps<UserTaskbarTabEntityProps>()
  6. const { tabLinkInstance } = useUserTaskbarTabLink()
  7. </script>
  8. <template>
  9. <CommonLink
  10. v-if="taskbarTabLink"
  11. ref="tabLinkInstance"
  12. v-tooltip="$t('You have insufficient rights to view this object.')"
  13. class="flex grow gap-2 rounded-md px-2 py-3 hover:no-underline focus-visible:rounded-md focus-visible:outline-none group-hover/tab:bg-blue-600 group-hover/tab:dark:bg-blue-900"
  14. :link="taskbarTabLink"
  15. exact-active-class="!bg-blue-800 text-white"
  16. internal
  17. >
  18. <CommonIcon
  19. name="x-lg"
  20. size="small"
  21. class="shrink-0 text-red-500"
  22. decorative
  23. />
  24. <CommonLabel
  25. class="-:text-gray-300 -:dark:text-neutral-400 block truncate group-hover/tab:text-white group-focus-visible/link:text-white"
  26. >
  27. {{ $t('Access denied') }}
  28. </CommonLabel>
  29. </CommonLink>
  30. </template>
  31. <style scoped>
  32. .router-link-active span {
  33. @apply text-white;
  34. }
  35. </style>