mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 16:37:02 +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') => {
|
key.password = async (btnTxt = 'SIGN') => {
|
||||||
const pass = await Passphrases.ask(key,
|
const pass = await Passphrases.ask(key,
|
||||||
'GnuPG key<br>' + key.id + ' ' + key.emails[0],
|
'GnuPG key<br>' + key.id + ' ' + key.emails[0],
|
||||||
'CRYPTO/'+btnTxt
|
'OPENPGP/'+btnTxt
|
||||||
);
|
);
|
||||||
pass && pass.remember && Passphrases.set(key, pass.password);
|
pass && pass.remember && Passphrases.set(key, pass.password);
|
||||||
return pass?.password;
|
return pass?.password;
|
||||||
|
|
@ -83,7 +83,7 @@ export const GnuPGUserStore = new class {
|
||||||
callback && callback();
|
callback && callback();
|
||||||
} else {
|
} else {
|
||||||
let pass = isPrivate ? await key.password('POPUP_VIEW_TITLE') : '';
|
let pass = isPrivate ? await key.password('POPUP_VIEW_TITLE') : '';
|
||||||
if (null != pass) {
|
if (null != pass) try {
|
||||||
const result = await Remote.post('GnupgExportKey', null, {
|
const result = await Remote.post('GnupgExportKey', null, {
|
||||||
keyId: key.id,
|
keyId: key.id,
|
||||||
isPrivate: isPrivate,
|
isPrivate: isPrivate,
|
||||||
|
|
@ -95,6 +95,8 @@ export const GnuPGUserStore = new class {
|
||||||
} else {
|
} else {
|
||||||
Passphrases.delete(key);
|
Passphrases.delete(key);
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
Passphrases.delete(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return key.armor;
|
return key.armor;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue