From b877bc0086104aa28ccd7bb2fa334b70ceb1dc14 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Thu, 17 Oct 2024 19:19:26 -0700 Subject: [PATCH] enh: folder delete confirmation Co-Authored-By: silentoplayz <50341825+silentoplayz@users.noreply.github.com> --- .../layout/Sidebar/RecursiveFolder.svelte | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/lib/components/layout/Sidebar/RecursiveFolder.svelte b/src/lib/components/layout/Sidebar/RecursiveFolder.svelte index 5c2ee6e21..6561142ca 100644 --- a/src/lib/components/layout/Sidebar/RecursiveFolder.svelte +++ b/src/lib/components/layout/Sidebar/RecursiveFolder.svelte @@ -1,5 +1,6 @@ + { + deleteHandler(); + }} +> +
+ {@html DOMPurify.sanitize( + $i18n.t('This will delete {{NAME}} and all its contents.', { + NAME: folders[folderId].name + }) + )} +
+
+ {#if dragged && x && y}
@@ -347,7 +367,7 @@ editHandler(); }} on:delete={() => { - deleteHandler(); + showDeleteConfirm = true; }} >