mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 05:59:21 +03:00
Replace AskPopupView "Yes" button with "Sign" or "Decrypt"
This commit is contained in:
parent
66a3a18f67
commit
8428838a8b
3 changed files with 11 additions and 10 deletions
|
|
@ -14,8 +14,8 @@ import { OpenPgpKeyPopupView } from 'View/Popup/OpenPgpKey';
|
|||
import { AskPopupView } from 'View/Popup/Ask';
|
||||
|
||||
const
|
||||
askPassphrase = async privateKey =>
|
||||
await AskPopupView.password('GnuPG key<br>' + privateKey.id + ' ' + privateKey.emails[0]),
|
||||
askPassphrase = async (privateKey, btnTxt = 'LABEL_SIGN') =>
|
||||
await AskPopupView.password('GnuPG key<br>' + privateKey.id + ' ' + privateKey.emails[0], 'OPENPGP/'+btnTxt),
|
||||
|
||||
findGnuPGKey = (keys, query, sign) =>
|
||||
keys.find(key =>
|
||||
|
|
@ -173,7 +173,7 @@ export const GnuPGUserStore = new class {
|
|||
Uid: message.uid,
|
||||
PartId: pgpInfo.PartId,
|
||||
KeyId: key.id,
|
||||
Passphrase: await askPassphrase(key),
|
||||
Passphrase: await askPassphrase(key, 'BUTTON_DECRYPT'),
|
||||
Data: '' // message.plain() optional
|
||||
}
|
||||
if (null !== params.Passphrase) {
|
||||
|
|
|
|||
|
|
@ -19,8 +19,8 @@ const
|
|||
key.emails.includes(query) || query == key.id || query == key.fingerprint
|
||||
),
|
||||
|
||||
askPassphrase = async privateKey =>
|
||||
await AskPopupView.password('OpenPGP.js key<br>' + privateKey.id + ' ' + privateKey.emails[0]),
|
||||
askPassphrase = async (privateKey, btnTxt = 'LABEL_SIGN') =>
|
||||
await AskPopupView.password('OpenPGP.js key<br>' + privateKey.id + ' ' + privateKey.emails[0], 'OPENPGP/'+btnTxt),
|
||||
|
||||
/**
|
||||
* OpenPGP.js v5 removed the localStorage (keyring)
|
||||
|
|
@ -184,7 +184,7 @@ export const OpenPGPUserStore = new class {
|
|||
}
|
||||
}
|
||||
if (privateKey) try {
|
||||
const passphrase = await askPassphrase(privateKey);
|
||||
const passphrase = await askPassphrase(privateKey, 'BUTTON_DECRYPT');
|
||||
|
||||
if (null !== passphrase) {
|
||||
const
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue