mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03: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:
@@ -48,11 +48,9 @@ import type { MessageFormatter } from 'svelte-i18n';
|
|||||||
|
|
||||||
export const getAssetBulkActions = ($t: MessageFormatter) => {
|
export const getAssetBulkActions = ($t: MessageFormatter) => {
|
||||||
const ownedAssets = assetMultiSelectManager.ownedAssets;
|
const ownedAssets = assetMultiSelectManager.ownedAssets;
|
||||||
const assetIds = ownedAssets.map((asset) => asset.id);
|
|
||||||
const isAllVideos = ownedAssets.every((asset) => asset.isVideo);
|
|
||||||
|
|
||||||
const onAction = async (name: AssetJobName) => {
|
const onAction = async (name: AssetJobName) => {
|
||||||
await handleRunAssetJob({ name, assetIds });
|
await handleRunAssetJob({ name, assetIds: ownedAssets.map(({ id }) => id) });
|
||||||
assetMultiSelectManager.clear();
|
assetMultiSelectManager.clear();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,7 +58,8 @@ export const getAssetBulkActions = ($t: MessageFormatter) => {
|
|||||||
title: $t('add_to_album'),
|
title: $t('add_to_album'),
|
||||||
icon: mdiPlus,
|
icon: mdiPlus,
|
||||||
shortcuts: [{ key: 'l' }],
|
shortcuts: [{ key: 'l' }],
|
||||||
onAction: () => modalManager.show(AssetAddToAlbumModal, { assetIds }),
|
onAction: () =>
|
||||||
|
modalManager.show(AssetAddToAlbumModal, { assetIds: assetMultiSelectManager.assets.map((asset) => asset.id) }),
|
||||||
};
|
};
|
||||||
|
|
||||||
const RefreshFacesJob: ActionItem = {
|
const RefreshFacesJob: ActionItem = {
|
||||||
@@ -85,7 +84,7 @@ export const getAssetBulkActions = ($t: MessageFormatter) => {
|
|||||||
title: $t('refresh_encoded_videos'),
|
title: $t('refresh_encoded_videos'),
|
||||||
icon: mdiCogRefreshOutline,
|
icon: mdiCogRefreshOutline,
|
||||||
onAction: () => onAction(AssetJobName.TranscodeVideo),
|
onAction: () => onAction(AssetJobName.TranscodeVideo),
|
||||||
$if: () => isAllVideos,
|
$if: () => ownedAssets.every((asset) => asset.isVideo),
|
||||||
};
|
};
|
||||||
|
|
||||||
return { AddToAlbum, RefreshFacesJob, RefreshMetadataJob, RegenerateThumbnailJob, TranscodeVideoJob };
|
return { AddToAlbum, RefreshFacesJob, RefreshMetadataJob, RegenerateThumbnailJob, TranscodeVideoJob };
|
||||||
|
|||||||
Reference in New Issue
Block a user