Replace AskPopupView "Yes" button with "Sign" or "Decrypt"

This commit is contained in:
the-djmaze 2022-02-07 23:00:51 +01:00
parent 66a3a18f67
commit 8428838a8b
3 changed files with 11 additions and 10 deletions

View file

@ -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