ArticleBubbleBlockedContentWarning.vue 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <!-- Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/ -->
  2. <script setup lang="ts">
  3. import CommonIcon from '#shared/components/CommonIcon/CommonIcon.vue'
  4. import { useEmailFileUrls } from '#shared/composables/useEmailFileUrls.ts'
  5. import type { TicketArticle } from '#shared/entities/ticket/types'
  6. import { useTicketInformation } from '#desktop/pages/ticket/composables/useTicketInformation.ts'
  7. interface Props {
  8. article: TicketArticle
  9. }
  10. const props = defineProps<Props>()
  11. const { ticketInternalId } = useTicketInformation()
  12. const { originalFormattingUrl } = useEmailFileUrls(
  13. props.article,
  14. ticketInternalId,
  15. )
  16. </script>
  17. <template>
  18. <div
  19. v-if="article.preferences?.remote_content_removed"
  20. class="flex flex-row gap-1 p-3"
  21. role="alert"
  22. >
  23. <CommonIcon class="shrink-0" name="exclamation-triangle" size="small" />
  24. <CommonLabel class="block">
  25. {{
  26. i18n.t(
  27. 'This message contains images or other content hosted by an external source. It was blocked, but you can download the original formatting.',
  28. )
  29. }}
  30. <br />
  31. <CommonLink
  32. v-if="originalFormattingUrl"
  33. :link="originalFormattingUrl"
  34. size="medium"
  35. target="_blank"
  36. >
  37. {{ i18n.t('Original Formatting') }}
  38. </CommonLink>
  39. </CommonLabel>
  40. </div>
  41. </template>