Added: show GnuPG import/delete key error

This commit is contained in:
the-djmaze 2022-04-16 02:02:38 +02:00
parent 9a63071292
commit 20e391cf1c
2 changed files with 14 additions and 8 deletions

View file

@ -48,7 +48,9 @@ export class OpenPgpImportPopupView extends AbstractViewPopup {
match = reg.exec(keyTrimmed);
if (match && 0 < count) {
if (match[0] && match[1] && match[2] && match[1] === match[2]) {
this.saveGnuPG() && GnuPGUserStore.isSupported() && GnuPGUserStore.importKey(this.key());
this.saveGnuPG() && GnuPGUserStore.isSupported() && GnuPGUserStore.importKey(this.key(), (iError, oData) => {
iError && alert(oData.ErrorMessage);
});
OpenPGPUserStore.isSupported() && OpenPGPUserStore.importKey(this.key());
}