diff --git a/dev/Html/PreviewMessage.html b/dev/Html/PreviewMessage.html index a9bbb736c..c2255fd32 100644 --- a/dev/Html/PreviewMessage.html +++ b/dev/Html/PreviewMessage.html @@ -40,6 +40,12 @@ pre { body > * { padding: 0.5em 1em; } + +#attachments > * { + border: 1px solid rgba(125,128,128,0.5); + padding: 0.25em; + margin-right: 1em; +} diff --git a/dev/Model/Message.js b/dev/Model/Message.js index 0288b6063..4ee9a5d2d 100644 --- a/dev/Model/Message.js +++ b/dev/Model/Message.js @@ -353,13 +353,17 @@ export class MessageModel extends AbstractModel { + (bccLine ? `
${encodeHtml(i18n('GLOBAL/BCC'))}: ${encodeHtml(bccLine)}
` : ''), style = getComputedStyle(doc.querySelector('.messageView')), prop = property => style.getPropertyValue(property); + let attachments = ''; + this.attachments.forEach(attachment => { + attachments += `${attachment.fileName}`; + }); sdoc.write(PreviewHTML .replace('', '<title>'+subject) // eslint-disable-next-line max-len .replace('<body>', `<body style="background-color:${prop('background-color')};color:${prop('color')}"><header><h1>${subject}</h1><time>${encodeHtml(m ? m.format('LLL',0,LanguageStore.hourCycle()) : '')}</time><div>${encodeHtml(this.from)}</div>${to}</header><${mode}>${this.bodyAsHTML()}</${mode}>`) + .replace('</body>', `<div id="attachments">${attachments}</div></body>`) ); sdoc.close(); - print && setTimeout(() => win.print(), 100); }