mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 19:49:20 +03:00
Fix view PGP key button
This commit is contained in:
parent
7cacc9b503
commit
28d8bec935
1 changed files with 4 additions and 2 deletions
|
|
@ -72,7 +72,7 @@ export const GnuPGUserStore = new class {
|
|||
key.password = async (btnTxt = 'SIGN') => {
|
||||
const pass = await Passphrases.ask(key,
|
||||
'GnuPG key<br>' + key.id + ' ' + key.emails[0],
|
||||
'CRYPTO/'+btnTxt
|
||||
'OPENPGP/'+btnTxt
|
||||
);
|
||||
pass && pass.remember && Passphrases.set(key, pass.password);
|
||||
return pass?.password;
|
||||
|
|
@ -83,7 +83,7 @@ export const GnuPGUserStore = new class {
|
|||
callback && callback();
|
||||
} else {
|
||||
let pass = isPrivate ? await key.password('POPUP_VIEW_TITLE') : '';
|
||||
if (null != pass) {
|
||||
if (null != pass) try {
|
||||
const result = await Remote.post('GnupgExportKey', null, {
|
||||
keyId: key.id,
|
||||
isPrivate: isPrivate,
|
||||
|
|
@ -95,6 +95,8 @@ export const GnuPGUserStore = new class {
|
|||
} else {
|
||||
Passphrases.delete(key);
|
||||
}
|
||||
} catch (e) {
|
||||
Passphrases.delete(key);
|
||||
}
|
||||
}
|
||||
return key.armor;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue