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:
@@ -382,7 +382,12 @@
|
||||
|
||||
const trashOrDelete = async (force: boolean = false) => {
|
||||
isShowDeleteConfirmation = false;
|
||||
await deleteAssets(!(isTrashEnabled && !force), (assetIds) => assetStore.removeAssets(assetIds), idsSelectedAssets);
|
||||
await deleteAssets(
|
||||
!(isTrashEnabled && !force),
|
||||
(assetIds) => assetStore.removeAssets(assetIds),
|
||||
assetInteraction.selectedAssets,
|
||||
!isTrashEnabled || force ? undefined : (assets) => assetStore.addAssets(assets),
|
||||
);
|
||||
assetInteraction.clearMultiselect();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user