ArticleDeliveryMessage.vue 953 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. defineProps<{
  6. content: string
  7. gap: 'small' | 'big'
  8. }>()
  9. const emit = defineEmits<{
  10. seen: []
  11. }>()
  12. const articleElement = ref<HTMLDivElement>()
  13. useArticleSeen(articleElement, emit)
  14. </script>
  15. <template>
  16. <div ref="articleElement" class="flex justify-center">
  17. <div
  18. :class="{ 'mt-6': gap === 'big', 'mt-2': gap === 'small' }"
  19. class="border-yellow bg-yellow-highlight text-yellow flex flex-col items-center rounded-3xl border p-4"
  20. >
  21. <div
  22. class="bg-yellow absolute flex h-7 w-7 -translate-y-7 items-center justify-center rounded-full text-black"
  23. >
  24. <CommonIcon name="warning" size="small" />
  25. </div>
  26. <div>{{ $t('Delivery failed: "%s"', content) }}</div>
  27. </div>
  28. </div>
  29. </template>