Skip to content

High performance self-hosted photo and video management solution.

feat: confirm on restore (#9862)

martin9d0aceb76818
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();