restore: bulk actions (#3730)

* feat: improve bulk isArchive and isFavorite updates

* chore: open api
This commit is contained in:
Jason Rasmussen
2023-08-16 16:04:55 -04:00
committed by GitHub
parent 8568ec838a
commit bab739efbd
30 changed files with 734 additions and 57 deletions

View File

@@ -37,7 +37,7 @@
{#if $isMultiSelectState}
<AssetSelectControlBar assets={$selectedAssets} clearSelect={() => assetInteractionStore.clearMultiselect()}>
<ArchiveAction unarchive onAssetArchive={(asset) => assetStore.removeAsset(asset.id)} />
<ArchiveAction unarchive onArchive={(ids) => assetStore.removeAssets(ids)} />
<CreateSharedLink />
<SelectAllAssets {assetStore} {assetInteractionStore} />
<AssetSelectContextMenu icon={Plus} title="Add">

View File

@@ -38,7 +38,7 @@
<!-- Multiselection mode app bar -->
{#if $isMultiSelectState}
<AssetSelectControlBar assets={$selectedAssets} clearSelect={() => assetInteractionStore.clearMultiselect()}>
<FavoriteAction removeFavorite onAssetFavorite={(asset) => assetStore.removeAsset(asset.id)} />
<FavoriteAction removeFavorite onFavorite={(ids) => assetStore.removeAssets(ids)} />
<CreateSharedLink />
<SelectAllAssets {assetStore} {assetInteractionStore} />
<AssetSelectContextMenu icon={Plus} title="Add">

View File

@@ -202,11 +202,7 @@
<AssetSelectContextMenu icon={DotsVertical} title="Add">
<DownloadAction menuItem filename="{data.person.name || 'immich'}.zip" />
<FavoriteAction menuItem removeFavorite={isAllFavorite} />
<ArchiveAction
menuItem
unarchive={isAllArchive}
onAssetArchive={(asset) => $assetStore.removeAsset(asset.id)}
/>
<ArchiveAction menuItem unarchive={isAllArchive} onArchive={(ids) => $assetStore.removeAssets(ids)} />
</AssetSelectContextMenu>
</AssetSelectControlBar>
{:else}

View File

@@ -51,7 +51,7 @@
<AssetSelectContextMenu icon={DotsVertical} title="Menu">
<FavoriteAction menuItem removeFavorite={isAllFavorite} />
<DownloadAction menuItem />
<ArchiveAction menuItem onAssetArchive={(asset) => assetStore.removeAsset(asset.id)} />
<ArchiveAction menuItem onArchive={(ids) => assetStore.removeAssets(ids)} />
</AssetSelectContextMenu>
</AssetSelectControlBar>
{/if}