mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-06 16:07:03 +03:00
Added: show GnuPG import/delete key error
This commit is contained in:
parent
9a63071292
commit
20e391cf1c
2 changed files with 14 additions and 8 deletions
|
|
@ -52,11 +52,15 @@ export const GnuPGUserStore = new class {
|
||||||
if (key.askDelete()) {
|
if (key.askDelete()) {
|
||||||
Remote.request('GnupgDeleteKey',
|
Remote.request('GnupgDeleteKey',
|
||||||
(iError, oData) => {
|
(iError, oData) => {
|
||||||
if (oData && oData.Result) {
|
if (oData) {
|
||||||
if (isPrivate) {
|
if (iError) {
|
||||||
this.privateKeys.remove(key);
|
alert(oData.ErrorMessage);
|
||||||
} else {
|
} else if (oData.Result) {
|
||||||
this.publicKeys.remove(key);
|
if (isPrivate) {
|
||||||
|
this.privateKeys.remove(key);
|
||||||
|
} else {
|
||||||
|
this.publicKeys.remove(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|
@ -107,8 +111,8 @@ export const GnuPGUserStore = new class {
|
||||||
importKey(key, callback) {
|
importKey(key, callback) {
|
||||||
Remote.request('GnupgImportKey',
|
Remote.request('GnupgImportKey',
|
||||||
(iError, oData) => {
|
(iError, oData) => {
|
||||||
if (oData && oData.Result) {
|
if (oData && oData.Result/* && (oData.Result.imported || oData.Result.secretimported)*/) {
|
||||||
// this.gnupgKeyring = oData.Result;
|
this.loadKeyrings();
|
||||||
}
|
}
|
||||||
callback && callback(iError, oData);
|
callback && callback(iError, oData);
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,9 @@ export class OpenPgpImportPopupView extends AbstractViewPopup {
|
||||||
match = reg.exec(keyTrimmed);
|
match = reg.exec(keyTrimmed);
|
||||||
if (match && 0 < count) {
|
if (match && 0 < count) {
|
||||||
if (match[0] && match[1] && match[2] && match[1] === match[2]) {
|
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());
|
OpenPGPUserStore.isSupported() && OpenPGPUserStore.importKey(this.key());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue