Clear ZK viewer secrets and image blob when leaving the page.

This commit is contained in:
2026-10-26 20:22:47 +01:00
parent dc8e576679
commit 82cdb6ffa3
+11 -3
View File
@@ -79,6 +79,11 @@ onBeforeMount(async () => {
}
});
onBeforeUnmount(() => {
cleanRefs();
viewStore.clearImage();
});
const onUnlockSubmit = async (): Promise<void> => {
const payload = zkPayload.value;
const key = fragmentKey.value;
@@ -104,7 +109,10 @@ const onUnlockSubmit = async (): Promise<void> => {
}
};
onBeforeUnmount(() => {
viewStore.clearImage();
});
const cleanRefs = (): void => {
zkPayload.value = null;
fragmentKey.value = '';
password.value = '';
unlockError.value = '';
};
</script>