mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
fix(web): timeline regression 2 (#16982)
* fix(web): timeline renders nothing after archiving in asset viewer * fix(web): timeline renders nothing after archiving in asset viewer * fix: ensure geometry updated when performing bulk action on all * fix: album assets selection
This commit is contained in:
parent
dbc279f843
commit
bcd9248b43
5 changed files with 10 additions and 6 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<script lang="ts">
|
||||
import { shortcut } from '$lib/actions/shortcut';
|
||||
import type { OnAction } from '$lib/components/asset-viewer/actions/action';
|
||||
import type { OnAction, PreAction } from '$lib/components/asset-viewer/actions/action';
|
||||
import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte';
|
||||
import { AssetAction } from '$lib/constants';
|
||||
import { toggleArchive } from '$lib/utils/asset-utils';
|
||||
|
|
@ -11,11 +11,15 @@
|
|||
interface Props {
|
||||
asset: AssetResponseDto;
|
||||
onAction: OnAction;
|
||||
preAction: PreAction;
|
||||
}
|
||||
|
||||
let { asset, onAction }: Props = $props();
|
||||
let { asset, onAction, preAction }: Props = $props();
|
||||
|
||||
const onArchive = async () => {
|
||||
if (!asset.isArchived) {
|
||||
preAction({ type: AssetAction.ARCHIVE, asset });
|
||||
}
|
||||
const updatedAsset = await toggleArchive(asset);
|
||||
if (updatedAsset) {
|
||||
onAction({ type: asset.isArchived ? AssetAction.ARCHIVE : AssetAction.UNARCHIVE, asset });
|
||||
|
|
|
|||
|
|
@ -181,7 +181,7 @@
|
|||
{#if asset.type === AssetTypeEnum.Image}
|
||||
<SetProfilePictureAction {asset} />
|
||||
{/if}
|
||||
<ArchiveAction {asset} {onAction} />
|
||||
<ArchiveAction {asset} {onAction} {preAction} />
|
||||
<MenuOption
|
||||
icon={mdiUpload}
|
||||
onClick={() => openFileUploadDialog({ multiple: false, assetId: asset.id })}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue