ArticleSystem.vue 838 B

123456789101112131415161718192021222324252627282930313233343536
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import { ref } from 'vue'
  4. import { useArticleSeen } from '../../composable/useArticleSeen.ts'
  5. import ArticleReactionBadge from './ArticleReactionBadge.vue'
  6. interface Props {
  7. subject?: Maybe<string>
  8. to?: Maybe<string>
  9. reaction?: Maybe<string>
  10. }
  11. defineProps<Props>()
  12. const emit = defineEmits<{
  13. seen: []
  14. }>()
  15. const articleElement = ref<HTMLDivElement>()
  16. useArticleSeen(articleElement, emit)
  17. </script>
  18. <template>
  19. <div ref="articleElement" class="text-gray flex items-center gap-2">
  20. <div class="grow text-center">"{{ subject }}" -&gt; "{{ to }}"</div>
  21. <ArticleReactionBadge
  22. v-if="reaction"
  23. class="bg-blue w-7 border border-black text-black"
  24. :reaction="reaction"
  25. />
  26. </div>
  27. </template>