From 9d0aceb76818f27217a91895be118774967d9bb1 Mon Sep 17 00:00:00 2001 From: martin <74269598+martabal@users.noreply.github.com> Date: Wed, 29 May 2024 20:24:15 +0200 Subject: [PATCH] feat: confirm on restore (#9862) --- .../trash/[[photos=photos]]/[[assetId=id]]/+page.svelte | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte index b7481573b9..21616b441b 100644 --- a/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte +++ b/web/src/routes/(user)/trash/[[photos=photos]]/[[assetId=id]]/+page.svelte @@ -61,6 +61,14 @@ }; const handleRestoreTrash = async () => { + const isConfirmed = await dialogController.show({ + id: 'restore-trash', + prompt: 'Are you sure you want to restore all your trashed assets? You cannot undo this action!', + }); + + if (!isConfirmed) { + return; + } try { await restoreTrash();