mirror of
https://github.com/immich-app/immich.git
synced 2026-04-18 06:51:59 -04:00
fix(web): add partner photo to album from multiselect (#27767)
* fix(web): add partner photo to album * chore: fix formatting * fix: run-job assets --------- Co-authored-by: Jason Rasmussen <jason@rasm.me>
This commit is contained in:
parent
5e81a5a054
commit
81780b0cc0
@ -48,11 +48,9 @@ import type { MessageFormatter } from 'svelte-i18n';
|
||||
|
||||
export const getAssetBulkActions = ($t: MessageFormatter) => {
|
||||
const ownedAssets = assetMultiSelectManager.ownedAssets;
|
||||
const assetIds = ownedAssets.map((asset) => asset.id);
|
||||
const isAllVideos = ownedAssets.every((asset) => asset.isVideo);
|
||||
|
||||
const onAction = async (name: AssetJobName) => {
|
||||
await handleRunAssetJob({ name, assetIds });
|
||||
await handleRunAssetJob({ name, assetIds: ownedAssets.map(({ id }) => id) });
|
||||
assetMultiSelectManager.clear();
|
||||
};
|
||||
|
||||
@ -60,7 +58,8 @@ export const getAssetBulkActions = ($t: MessageFormatter) => {
|
||||
title: $t('add_to_album'),
|
||||
icon: mdiPlus,
|
||||
shortcuts: [{ key: 'l' }],
|
||||
onAction: () => modalManager.show(AssetAddToAlbumModal, { assetIds }),
|
||||
onAction: () =>
|
||||
modalManager.show(AssetAddToAlbumModal, { assetIds: assetMultiSelectManager.assets.map((asset) => asset.id) }),
|
||||
};
|
||||
|
||||
const RefreshFacesJob: ActionItem = {
|
||||
@ -85,7 +84,7 @@ export const getAssetBulkActions = ($t: MessageFormatter) => {
|
||||
title: $t('refresh_encoded_videos'),
|
||||
icon: mdiCogRefreshOutline,
|
||||
onAction: () => onAction(AssetJobName.TranscodeVideo),
|
||||
$if: () => isAllVideos,
|
||||
$if: () => ownedAssets.every((asset) => asset.isVideo),
|
||||
};
|
||||
|
||||
return { AddToAlbum, RefreshFacesJob, RefreshMetadataJob, RegenerateThumbnailJob, TranscodeVideoJob };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user