webmail: when opening message in new tab, set document title to subject, message from address(es) and id of message

This commit is contained in:
Mechiel Lukkien 2024-05-09 21:19:58 +02:00
parent a06a4de5ec
commit 1179d9d80a
No known key found for this signature in database
2 changed files with 2 additions and 0 deletions

View file

@ -1391,6 +1391,7 @@ const loadMsgheaderView = (msgheaderelem, mi, moreHeaders, refineKeyword, allAdd
// Javascript is generated from typescript, do not modify generated javascript because changes will be overwritten.
const init = () => {
const mi = api.parser.MessageItem(messageItem);
document.title = '"' + mi.Envelope.Subject + '"- from ' + ((mi.Envelope.From || []).map(a => formatAddress(a)).join(', ') || '-') + ' (id ' + mi.Message.ID + ')';
let msgattachmentview = dom.div();
if (mi.Attachments && mi.Attachments.length > 0) {
dom._kids(msgattachmentview, dom.div(css('msgAttachments', { borderTop: '1px solid', borderTopColor: styles.borderColor }), dom.div(dom._class('pad'), 'Attachments: ', join(mi.Attachments.map(a => a.Filename || '(unnamed)'), () => ', '))));

View file

@ -5,6 +5,7 @@ declare let messageItem: api.MessageItem
const init = () => {
const mi = api.parser.MessageItem(messageItem)
document.title = '"' + mi.Envelope.Subject + '"- from '+((mi.Envelope.From || []).map(a => formatAddress(a)).join(', ') || '-') + ' (id '+mi.Message.ID+')'
let msgattachmentview = dom.div()
if (mi.Attachments && mi.Attachments.length > 0) {