mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 16:33:47 +03:00
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:
parent
a06a4de5ec
commit
1179d9d80a
2 changed files with 2 additions and 0 deletions
|
@ -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.
|
// Javascript is generated from typescript, do not modify generated javascript because changes will be overwritten.
|
||||||
const init = () => {
|
const init = () => {
|
||||||
const mi = api.parser.MessageItem(messageItem);
|
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();
|
let msgattachmentview = dom.div();
|
||||||
if (mi.Attachments && mi.Attachments.length > 0) {
|
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)'), () => ', '))));
|
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)'), () => ', '))));
|
||||||
|
|
|
@ -5,6 +5,7 @@ declare let messageItem: api.MessageItem
|
||||||
|
|
||||||
const init = () => {
|
const init = () => {
|
||||||
const mi = api.parser.MessageItem(messageItem)
|
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()
|
let msgattachmentview = dom.div()
|
||||||
if (mi.Attachments && mi.Attachments.length > 0) {
|
if (mi.Attachments && mi.Attachments.length > 0) {
|
||||||
|
|
Loading…
Reference in a new issue