Clear ZK viewer secrets and image blob when leaving the page.
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user