0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-07 00:50:23 -05:00

fix(web): navigate to the correct URL when unstacking from the asset viewer (#9841)

fix(web): navigate to the correct URL on unstack
This commit is contained in:
Snowknight26 2024-05-29 11:05:28 -05:00 committed by GitHub
parent 5463660746
commit 416399499b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 13 deletions

View file

@ -272,10 +272,6 @@
$isShowDetail = !$isShowDetail; $isShowDetail = !$isShowDetail;
}; };
const handleCloseViewer = async () => {
await closeViewer();
};
const closeViewer = async () => { const closeViewer = async () => {
$slideshowState = SlideshowState.StopSlideshow; $slideshowState = SlideshowState.StopSlideshow;
document.body.style.cursor = ''; document.body.style.cursor = '';
@ -519,7 +515,7 @@
asset, 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" 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" translate="yes"
> >
<DetailPanel <DetailPanel {asset} currentAlbum={album} albums={appearsInAlbums} on:close={() => ($isShowDetail = false)} />
{asset}
currentAlbum={album}
albums={appearsInAlbums}
on:close={() => ($isShowDetail = false)}
on:closeViewer={handleCloseViewer}
/>
</div> </div>
{/if} {/if}

View file

@ -102,7 +102,6 @@
const dispatch = createEventDispatcher<{ const dispatch = createEventDispatcher<{
close: void; close: void;
closeViewer: void;
}>(); }>();
const getMegapixel = (width: number, height: number): number | undefined => { const getMegapixel = (width: number, height: number): number | undefined => {