Show GnuPG verify error

This commit is contained in:
the-djmaze 2024-02-26 18:43:17 +01:00
parent 6f98aee998
commit 6141ca7936
2 changed files with 4 additions and 2 deletions

View file

@ -183,7 +183,7 @@ export const GnuPGUserStore = new class {
}
if (null !== params.passphrase) {
const result = await Remote.post('GnupgDecrypt', null, params);
if (result?.Result && false !== result.Result.data) {
if (result?.Result?.data) {
return result.Result;
}
Passphrases.delete(key);
@ -208,7 +208,8 @@ export const GnuPGUserStore = new class {
if (response?.Result) {
return {
fingerprint: response.Result.fingerprint,
success: 0 == response.Result.status // GOODSIG
success: 0 == response.Result.status, // GOODSIG
error: response.Result.message
};
}
}

View file

@ -302,6 +302,7 @@
<div class="crypto-control signed" data-bind="css: {success: message().pgpVerified() && message().pgpVerified().success, error: message().pgpVerified() && !message().pgpVerified().success}">
<span data-icon="✍" data-i18n="OPENPGP/SIGNED_MESSAGE"></span>
<button class="btn" data-bind="visible: pgpSupported, click: pgpVerify" data-i18n="CRYPTO/VERIFY"></button>
<div data-icon="⚠" data-bind="visible: message().pgpVerified()?.error, text: message().pgpVerified()?.error"></div>
</div>
</div>