diff --git a/src/langs/json/en.json b/src/langs/json/en.json index 939923a1..fec1b0c9 100644 --- a/src/langs/json/en.json +++ b/src/langs/json/en.json @@ -457,7 +457,8 @@ "instructions": "Click and drag to draw a black rectangle over each portion of the document you’d like to redact. Associated text will be removed when you save your redactions.", "undo": "Undo", "cancel": "Discard", - "cancelWarning": "You will lose unsaved redactions. Are you sure you want to cancel?", + "cancelWarning": "You will lose unsaved redactions. Are you sure you want to discard?", + "leaveWarning": "You have unsaved redactions. Are you sure you want to leave?", "success": "Redactions saved", "error": "Error" }, diff --git a/src/lib/components/forms/ConfirmRedaction.svelte b/src/lib/components/forms/ConfirmRedaction.svelte index 7f84750c..8a2961c9 100644 --- a/src/lib/components/forms/ConfirmRedaction.svelte +++ b/src/lib/components/forms/ConfirmRedaction.svelte @@ -44,6 +44,7 @@ This almost certainly lives in a modal. if (result.type === "success") { // need to invalidate before navigating await invalidate(`document:${document.id}`); + $redactions = []; $pending = result.data.redactions; goto("?mode=document"); dispatch("close"); diff --git a/src/lib/components/viewer/RedactionLayer.svelte b/src/lib/components/viewer/RedactionLayer.svelte index 786d9957..d5ce7302 100644 --- a/src/lib/components/viewer/RedactionLayer.svelte +++ b/src/lib/components/viewer/RedactionLayer.svelte @@ -1,6 +1,8 @@