mirror of
https://github.com/immich-app/immich.git
synced 2026-03-26 11:50:53 +03:00
refactor: asset view navbar onclose (#25087)
This commit is contained in:
@@ -65,8 +65,7 @@
|
||||
preAction?: PreAction | undefined;
|
||||
onAction?: OnAction | undefined;
|
||||
onUndoDelete?: OnUndoDelete | undefined;
|
||||
showCloseButton?: boolean;
|
||||
onClose: (asset: AssetResponseDto) => void;
|
||||
onClose?: (asset: AssetResponseDto) => void;
|
||||
onNext: () => Promise<HasAsset>;
|
||||
onPrevious: () => Promise<HasAsset>;
|
||||
onRandom: () => Promise<{ id: string } | undefined>;
|
||||
@@ -84,7 +83,6 @@
|
||||
preAction = undefined,
|
||||
onAction = undefined,
|
||||
onUndoDelete = undefined,
|
||||
showCloseButton,
|
||||
onClose,
|
||||
onNext,
|
||||
onPrevious,
|
||||
@@ -203,7 +201,7 @@
|
||||
};
|
||||
|
||||
const closeViewer = () => {
|
||||
onClose(asset);
|
||||
onClose?.(asset);
|
||||
};
|
||||
|
||||
const closeEditor = () => {
|
||||
@@ -411,7 +409,6 @@
|
||||
{album}
|
||||
{person}
|
||||
{stack}
|
||||
{showCloseButton}
|
||||
showSlideshow={true}
|
||||
onZoomImage={zoomToggle}
|
||||
onCopyImage={copyImage}
|
||||
@@ -420,7 +417,7 @@
|
||||
{onUndoDelete}
|
||||
onRunJob={handleRunJob}
|
||||
onPlaySlideshow={() => ($slideshowState = SlideshowState.PlaySlideshow)}
|
||||
onClose={closeViewer}
|
||||
onClose={onClose ? () => onClose(asset) : undefined}
|
||||
{playOriginalVideo}
|
||||
{setPlayOriginalVideo}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user