fix(web): delete action closes asset viewer in asset view (#15469)

fixes #14647
This commit is contained in:
Alessandro Baroni 2025-03-03 19:24:37 +01:00 committed by GitHub
parent e2c34f17ba
commit f89e74181b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 22 additions and 9 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { goto } from '$app/navigation';
import type { OnAction } from '$lib/components/asset-viewer/actions/action';
import type { OnAction, PreAction } from '$lib/components/asset-viewer/actions/action';
import AddToAlbumAction from '$lib/components/asset-viewer/actions/add-to-album-action.svelte';
import ArchiveAction from '$lib/components/asset-viewer/actions/archive-action.svelte';
import CloseAction from '$lib/components/asset-viewer/actions/close-action.svelte';
@ -58,6 +58,7 @@
showSlideshow?: boolean;
onZoomImage: () => void;
onCopyImage?: () => Promise<void>;
preAction: PreAction;
onAction: OnAction;
onRunJob: (name: AssetJobName) => void;
onPlaySlideshow: () => void;
@ -76,6 +77,7 @@
showSlideshow = false,
onZoomImage,
onCopyImage,
preAction,
onAction,
onRunJob,
onPlaySlideshow,
@ -149,7 +151,7 @@
{/if} -->
{#if isOwner}
<DeleteAction {asset} {onAction} />
<DeleteAction {asset} {onAction} {preAction} />
<ButtonContextMenu direction="left" align="top-right" color="opaque" title={$t('more')} icon={mdiDotsVertical}>
{#if showSlideshow}