mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Put available encrypt and sign options in corresponding menu options as title
This commit is contained in:
parent
9b309c31bd
commit
f6b440adef
2 changed files with 12 additions and 9 deletions
|
|
@ -336,6 +336,9 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
canMailvelope: () => this.encryptOptions.includes('Mailvelope'),
|
||||
canSign: () => this.signOptions().length,
|
||||
|
||||
encryptOptionsText: () => this.encryptOptions().join(', '),
|
||||
signOptionsText: () => this.signOptions().map(o => o[0]).join(', '),
|
||||
|
||||
identitiesOptions: () =>
|
||||
IdentityUserStore.map(item => ({
|
||||
item: item,
|
||||
|
|
@ -1396,13 +1399,6 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
OpenPGPUserStore.hasPublicKeyForEmails(recipients)
|
||||
&& options.push('OpenPGP');
|
||||
|
||||
if (await MailvelopeUserStore.hasPublicKeyForEmails(recipients)) {
|
||||
options.push('Mailvelope');
|
||||
} else {
|
||||
'mailvelope' === this.viewArea() && this.bodyArea();
|
||||
// this.dropMailvelope();
|
||||
}
|
||||
|
||||
const count = recipients.length,
|
||||
identity = this.currentIdentity(),
|
||||
from = (identity.smimeKey() && identity.smimeCertificate()) ? identity.email() : null;
|
||||
|
|
@ -1412,6 +1408,13 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
|| SMimeUserStore.find(certificate => email == certificate.emailAddress && certificate.smimeencrypt)
|
||||
).length
|
||||
&& options.push('S/MIME');
|
||||
|
||||
if (await MailvelopeUserStore.hasPublicKeyForEmails(recipients)) {
|
||||
options.push('Mailvelope');
|
||||
} else {
|
||||
'mailvelope' === this.viewArea() && this.bodyArea();
|
||||
// this.dropMailvelope();
|
||||
}
|
||||
}
|
||||
|
||||
console.dir({encryptOptions:options});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue