User.vue 1007 B

1234567891011121314151617181920212223242526272829303132333435
  1. <!-- Copyright (C) 2012-2025 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { computed } from 'vue'
  4. import type { QuickSearchPluginProps } from '../types.ts'
  5. const props = defineProps<QuickSearchPluginProps>()
  6. const isUserInactive = computed(() => !props.item?.active)
  7. </script>
  8. <template>
  9. <CommonLink
  10. class="group/item flex grow gap-2 rounded-md px-2 py-3 text-neutral-400 hover:bg-blue-900 hover:no-underline!"
  11. :link="`/users/${item.internalId}`"
  12. :aria-description="isUserInactive ? $t('User is inactive.') : undefined"
  13. internal
  14. >
  15. <CommonIcon
  16. class="shrink-0 text-neutral-500"
  17. :name="isUserInactive ? 'user-inactive' : 'person'"
  18. size="small"
  19. decorative
  20. />
  21. <CommonLabel
  22. class="block! truncate group-hover/item:text-white"
  23. :class="{
  24. 'text-neutral-500! group-hover/item:text-white!': isUserInactive,
  25. }"
  26. >
  27. {{ item.fullname }}
  28. </CommonLabel>
  29. </CommonLink>
  30. </template>