This commit is contained in:
the-djmaze 2024-02-09 02:39:00 +01:00
parent d1154df74d
commit a25d35d6df
45 changed files with 163 additions and 169 deletions

View file

@ -11,6 +11,7 @@ export class IdentityModel extends AbstractModel {
addObservablesTo(this, {
id: '',
label: '',
email: '',
name: '',
@ -29,8 +30,8 @@ export class IdentityModel extends AbstractModel {
*/
formattedName() {
const name = this.name(),
email = this.email();
return name ? name + ' <' + email + '>' : email;
email = this.email(),
label = this.label();
return (name ? `${name} ` : '') + `<${email}>` + (label ? ` (${label})` : '');
}
}

View file

@ -2,9 +2,15 @@
max-width: 770px;
.tab-content {
grid-column-end: 4;
padding-top: 20px;
}
.e-signature-place {
border: 1px solid #ccc;
border-radius: var(--input-border-radius, 3px);
margin-bottom: 1.43em;
}
.textEmail {

View file

@ -17,17 +17,15 @@ export class IdentityPopupView extends AbstractViewPopup {
id: '',
edit: false,
email: '',
emailFocused: false,
label: '',
labelFocused: false,
email: '',
name: '',
nameFocused: false,
replyTo: '',
showReplyTo: false,
bcc: '',
showBcc: false,
signature: '',
signatureInsertBefore: false,
@ -66,9 +64,6 @@ export class IdentityPopupView extends AbstractViewPopup {
* @param {?IdentityModel} oIdentity
*/
onShow(identity) {
this.showBcc(false);
this.showReplyTo(false);
this.submitRequest(false);
this.submitError('');
@ -80,17 +75,16 @@ export class IdentityPopupView extends AbstractViewPopup {
identity.id(Jua.randomId());
}
this.id(identity.id() || '');
this.label(identity.label() || '');
this.name(identity.name());
this.email(identity.email());
this.replyTo(identity.replyTo());
this.showReplyTo(0 < identity.replyTo().length);
this.bcc(identity.bcc());
this.showBcc(0 < identity.bcc().length);
this.signature(identity.signature());
this.signatureInsertBefore(identity.signatureInsertBefore());
}
afterShow() {
this.id() ? this.emailFocused(true) : this.nameFocused(true);
this.id() ? this.labelFocused(true) : this.nameFocused(true);
}
}