diff --git a/frontend/viewer/src/lib/entry-editor/DeleteDialog.svelte b/frontend/viewer/src/lib/entry-editor/DeleteDialog.svelte index 052020d14..b8d450e44 100644 --- a/frontend/viewer/src/lib/entry-editor/DeleteDialog.svelte +++ b/frontend/viewer/src/lib/entry-editor/DeleteDialog.svelte @@ -7,20 +7,17 @@ let requester: { resolve: (result: boolean) => void } | undefined = undefined; - function onClose() { - requester?.resolve(false); - requester = undefined; - open = false; - } function confirm() { - requester?.resolve(true); - requester = undefined; - open = false; + resolve(true); } function cancel() { - requester?.resolve(false); + resolve(false); + } + + function resolve(shouldDelete: boolean) { + requester?.resolve(shouldDelete); requester = undefined; open = false; } @@ -34,7 +31,7 @@ }); } - +
Delete {subject}

Are you sure you want to delete {subject}?