From 416399499b0f2e30c7e7cca74492dcd46e2e77fa Mon Sep 17 00:00:00 2001 From: Snowknight26 Date: Wed, 29 May 2024 11:05:28 -0500 Subject: [PATCH] fix(web): navigate to the correct URL when unstacking from the asset viewer (#9841) fix(web): navigate to the correct URL on unstack --- .../components/asset-viewer/asset-viewer.svelte | 14 ++------------ .../components/asset-viewer/detail-panel.svelte | 1 - 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/web/src/lib/components/asset-viewer/asset-viewer.svelte b/web/src/lib/components/asset-viewer/asset-viewer.svelte index 2bc0aa62b0..58ba9db425 100644 --- a/web/src/lib/components/asset-viewer/asset-viewer.svelte +++ b/web/src/lib/components/asset-viewer/asset-viewer.svelte @@ -272,10 +272,6 @@ $isShowDetail = !$isShowDetail; }; - const handleCloseViewer = async () => { - await closeViewer(); - }; - const closeViewer = async () => { $slideshowState = SlideshowState.StopSlideshow; document.body.style.cursor = ''; @@ -519,7 +515,7 @@ asset, }); } - dispatch('close'); + await closeViewer(); } }; @@ -718,13 +714,7 @@ class="z-[1002] row-start-1 row-span-4 w-[360px] overflow-y-auto bg-immich-bg transition-all dark:border-l dark:border-l-immich-dark-gray dark:bg-immich-dark-bg" translate="yes" > - ($isShowDetail = false)} - on:closeViewer={handleCloseViewer} - /> + ($isShowDetail = false)} /> {/if} diff --git a/web/src/lib/components/asset-viewer/detail-panel.svelte b/web/src/lib/components/asset-viewer/detail-panel.svelte index de322d7beb..51554eef58 100644 --- a/web/src/lib/components/asset-viewer/detail-panel.svelte +++ b/web/src/lib/components/asset-viewer/detail-panel.svelte @@ -102,7 +102,6 @@ const dispatch = createEventDispatcher<{ close: void; - closeViewer: void; }>(); const getMegapixel = (width: number, height: number): number | undefined => {