mirror of
https://git.proxmox.com/git/pmg-gui
synced 2025-06-04 08:21:15 +00:00

This will be used to show the Subject and From on E-Mail Previews. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
34 lines
636 B
JavaScript
34 lines
636 B
JavaScript
Ext.define('PMG.MailInfoBox', {
|
|
extend: 'Ext.container.Container',
|
|
xtype: 'pmgMailInfo',
|
|
|
|
cls: 'x-toolbar-default',
|
|
style: {
|
|
'border-left': '0px',
|
|
'border-right': '0px',
|
|
},
|
|
|
|
update: function(data) {
|
|
let me = this;
|
|
let escaped = {};
|
|
for (const [key, value] of Object.entries(data)) {
|
|
escaped[key] = Ext.htmlEncode(value);
|
|
}
|
|
me.items.each((item) => item.update(escaped));
|
|
},
|
|
|
|
layout: {
|
|
type: 'vbox',
|
|
align: 'stretch',
|
|
},
|
|
|
|
defaults: {
|
|
xtype: 'tbtext',
|
|
},
|
|
|
|
items: [
|
|
{ tpl: `<b>${gettext("From")}:</b> {from}` },
|
|
{ tpl: `<b>${gettext("Subject")}:</b> {subject}` },
|
|
],
|
|
});
|