diff --git a/packages/web-app-mail/src/components/MailComposeForm.vue b/packages/web-app-mail/src/components/MailComposeForm.vue index 7509c4f4b5..6f5204129b 100644 --- a/packages/web-app-mail/src/components/MailComposeForm.vue +++ b/packages/web-app-mail/src/components/MailComposeForm.vue @@ -76,6 +76,7 @@ import MailAttachmentList from './MailAttachmentList.vue' type FromOption = { value: string label: string + name: string email: string accountId: string identityId: string @@ -122,6 +123,7 @@ const fromOptions = computed(() => { account.identities?.map((identity) => ({ label: identity.name ? `${identity.name} <${identity.email}>` : identity.email, value: identity.id, + name: identity.name ?? identity.email, email: identity.email, accountId: account.accountId, identityId: identity.id diff --git a/packages/web-app-mail/src/components/MailLeaveModal.vue b/packages/web-app-mail/src/components/MailLeaveModal.vue new file mode 100644 index 0000000000..500975a873 --- /dev/null +++ b/packages/web-app-mail/src/components/MailLeaveModal.vue @@ -0,0 +1,60 @@ + + + diff --git a/packages/web-app-mail/src/components/MailList.vue b/packages/web-app-mail/src/components/MailList.vue index 2f25870db5..bb5651d3aa 100644 --- a/packages/web-app-mail/src/components/MailList.vue +++ b/packages/web-app-mail/src/components/MailList.vue @@ -58,7 +58,7 @@ - + @@ -107,9 +107,9 @@ const onSelectMail = async (mail: Mail) => { await loadMail(unref(currentAccount).accountId, mail.id) updateMailField({ - id: unref(currentMail).id, + id: mail.id, field: 'keywords', - value: { ...unref(currentMail).keywords, ...{ $seen: true } } + value: { ...mail.keywords, ...{ $seen: true } } }) } diff --git a/packages/web-app-mail/src/components/MailListItem.vue b/packages/web-app-mail/src/components/MailListItem.vue index b11ffd98bf..57e0761183 100644 --- a/packages/web-app-mail/src/components/MailListItem.vue +++ b/packages/web-app-mail/src/components/MailListItem.vue @@ -25,7 +25,7 @@
- +
@@ -37,11 +37,9 @@ import { computed } from 'vue' import { formatRelativeDateFromISO } from '@opencloud-eu/web-pkg' import { useGettext } from 'vue3-gettext' import MailIndicators from './MailIndicators.vue' +import DOMPurify from 'dompurify' -const { mail } = defineProps<{ - mail: Mail -}>() - +const { mail } = defineProps<{ mail: Mail }>() const { current: currentLanguage } = useGettext() const fromText = computed(() => { @@ -51,4 +49,14 @@ const fromText = computed(() => { const receivedAtRelativeDate = computed(() => { return formatRelativeDateFromISO(mail.receivedAt, currentLanguage) }) + +const previewText = computed(() => { + const mailPreview = mail.preview ?? '' + if (!mailPreview) { + return '' + } + + const stripped = DOMPurify.sanitize(mailPreview, { ALLOWED_TAGS: [], ALLOWED_ATTR: [] }) + return stripped.replace(/\s+/g, ' ').trim() +}) diff --git a/packages/web-app-mail/src/components/MailSavedHint.vue b/packages/web-app-mail/src/components/MailSavedHint.vue new file mode 100644 index 0000000000..72b26abbf4 --- /dev/null +++ b/packages/web-app-mail/src/components/MailSavedHint.vue @@ -0,0 +1,14 @@ + + + diff --git a/packages/web-app-mail/src/components/MailWidget.vue b/packages/web-app-mail/src/components/MailWidget.vue index 4b99fb48fa..e34115d8cb 100644 --- a/packages/web-app-mail/src/components/MailWidget.vue +++ b/packages/web-app-mail/src/components/MailWidget.vue @@ -25,7 +25,7 @@ fill-type="line" /> - + @@ -46,7 +46,7 @@ +
+ +
@@ -78,7 +81,7 @@ > - + @@ -99,7 +102,7 @@ - + +
+ +
+