Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
Fix remove assets
Browse files Browse the repository at this point in the history
  • Loading branch information
SharkmanZA committed Oct 27, 2023
1 parent e3992d7 commit 5d97076
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/frontend/ui/tiles/Assets.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,20 @@
return;
}
if ($projectsStore.activeProject) {
// await cacheStore.deleteSelectedAssets(selectedCacheItems);
const items = selectedCacheItems;
const res = await window.apis.projectApi.removeCacheObjects(
$projectsStore.activeProject.id,
selectedCacheItems
);
// console.log(items)
await cacheStore.deleteSelectedAssets(items);
if (!res.success) {
toastStore.trigger({ message: res.data, type: "error" });
}
}
await cacheStore.deleteSelectedAssets(selectedCacheItems);
// await cacheStore.deleteSelectedAssets(selectedCacheItems);
}
// let barrier = 0;
Expand All @@ -151,9 +155,7 @@
{#if $cacheStore[cacheId] && ["image/png", "image/jpeg"].includes($cacheStore[cacheId].contentType)}
<div
class="item thumbItem {selectedCacheItems.includes(cacheId)

? 'ring-2 ring-primary-500'

? 'ring-2 ring-primary-500'
: ''}"
on:click|stopPropagation="{() => handleItemOnClick(cacheId)}"
on:keydown="{null}"
Expand Down

0 comments on commit 5d97076

Please sign in to comment.