ArticleBubbleSecurityStatusBar.vue 759 B

1234567891011121314151617181920212223242526272829
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { toRef } from 'vue'
  4. import { useArticleSecurity } from '#shared/composables/useArticleSecurity.ts'
  5. import type { TicketArticle } from '#shared/entities/ticket/types.ts'
  6. interface Props {
  7. article: TicketArticle
  8. }
  9. const props = defineProps<Props>()
  10. const { signingIcon, encryptionIcon, hasError } = useArticleSecurity(
  11. toRef(props.article),
  12. )
  13. </script>
  14. <template>
  15. <div
  16. v-if="article.securityState && !hasError"
  17. role="list"
  18. class="flex gap-3 p-3 dark:bg-gray-500"
  19. >
  20. <CommonIcon size="xs" role="listitem" :name="encryptionIcon" />
  21. <CommonIcon size="xs" role="listitem" :name="signingIcon" />
  22. </div>
  23. </template>