feat(web): undo delete (#18729)
* feat(web): Undo asset delete * - lints and checks - Update English translation * Update delete-assets.svelte Make onUndoDelete optional in Props interface * - Ensure undo button not available on permanent delete, or trash disabled. - Enforce lint requirement for no-negated-condition * Fix formatting * fix: lint --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -301,7 +301,7 @@
|
||||
{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}
|
||||
<TagAction menuItem />
|
||||
{/if}
|
||||
<DeleteAssets menuItem {onAssetDelete} />
|
||||
<DeleteAssets menuItem {onAssetDelete} onUndoDelete={onSearchQueryUpdate} />
|
||||
<hr />
|
||||
<AssetJobActions />
|
||||
</ButtonContextMenu>
|
||||
@@ -382,6 +382,7 @@
|
||||
showArchiveIcon={true}
|
||||
{viewport}
|
||||
pageHeaderOffset={54}
|
||||
onReload={onSearchQueryUpdate}
|
||||
/>
|
||||
{:else if !isLoading}
|
||||
<div class="flex min-h-[calc(66vh-11rem)] w-full place-content-center items-center dark:text-white">
|
||||
@@ -444,7 +445,7 @@
|
||||
{#if $preferences.tags.enabled && assetInteraction.isAllUserOwned}
|
||||
<TagAction menuItem />
|
||||
{/if}
|
||||
<DeleteAssets menuItem {onAssetDelete} />
|
||||
<DeleteAssets menuItem {onAssetDelete} onUndoDelete={onSearchQueryUpdate} />
|
||||
<hr />
|
||||
<AssetJobActions />
|
||||
</ButtonContextMenu>
|
||||
|
||||
Reference in New Issue
Block a user