We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4bf484 commit 2051257Copy full SHA for 2051257
1 file changed
app/pages/woman.client.vue
@@ -24,9 +24,15 @@ onMounted(() => {
24
25
const decryptData = async (): Promise<void> => {
26
if (!passphrase.value) {
27
- passphrase.value =
28
- prompt("Enter your decryption passphrase (this will be cached):") ||
29
- "";
+ const input = prompt(
+ "Enter your decryption passphrase (this will be cached):",
+ );
30
+
31
+ if (input === null) {
32
+ return;
33
+ }
34
35
+ passphrase.value = input;
36
}
37
38
const decrypter = new Decrypter();
@@ -38,6 +44,7 @@ const decryptData = async (): Promise<void> => {
44
data.value = JSON.parse(decrypted) as Item[];
39
45
} catch (error) {
40
46
alert("Decryption failed. Please check your passphrase and try again.");
47
+ passphrase.value = ""; // Clear invalid passphrase
41
48
42
49
};
43
50
</script>
0 commit comments