Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ UI improvements, tests, documentation, validation, browser compatibility, and Gm

If this is your first contribution, these are good places to start:

* [#3 — Clear key inputs after failed decryption](https://github.com/LucaBonamino/Clavimit/issues/3)
* [#7 — RSA key requirements are not validated](https://github.com/LucaBonamino/Clavimit/issues/14)
* [#1 — Keep package and manifest versions synchronized](https://github.com/LucaBonamino/Clavimit/issues/1)
* [See all good first issues](https://github.com/LucaBonamino/Clavimit/issues)

Expand Down
2 changes: 1 addition & 1 deletion src/manifest/manifest_common.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Clavimit",
"version": "0.1.1",
"version": "0.1.2",
"description": "Encrypt and decrypt Gmail messages locally using AES-256-GCM and RSA-OAEP.",

"manifest_version": 3,
Expand Down
16 changes: 8 additions & 8 deletions src/scripts/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,6 @@ decryptButton.addEventListener("click", async () => {
const plaintext = await decryptMessage(message, privateKey);
decryptedText.value = plaintext;
document.getElementById("decryptionResultArea").hidden = false;
privateKeyInput.value = "";
privateKeyFile.value = "";
setStatus(decryptStatus, "✓ Message decrypted", true);
} catch (error) {
console.error("Decryption error:", error);
Expand All @@ -212,6 +210,8 @@ decryptButton.addEventListener("click", async () => {
} finally {
decryptButton.disabled = false;
decryptButton.textContent = "Decrypt Email";
privateKeyInput.value = "";
privateKeyFile.value = "";
}
});

Expand Down Expand Up @@ -268,12 +268,6 @@ button.addEventListener("click", async () => {
const enc = await encryptMessage(text, publicKey, senderPublicKey);
const message = composeMessage(enc);
await setEmailText(message);
publicKeyInput.value = "";
publicKeyFile.value = "";
if (senderPublicKeyInput.value) {
senderPublicKeyInput.value = "";
senderPublicKeyFile.value = "";
}
} catch (error) {
console.error("Encryption error:", error);

Expand All @@ -285,5 +279,11 @@ button.addEventListener("click", async () => {
} finally {
button.disabled = false;
button.textContent = "Encrypt Email";
publicKeyInput.value = "";
publicKeyFile.value = "";
if (senderPublicKeyInput.value) {
senderPublicKeyInput.value = "";
senderPublicKeyFile.value = "";
}
}
});
Loading