High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: Routing back button in sharedLinks page (#13703)
Pranay Pandey35f24270feef
diff --git a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelteindex 5b23cd0c21..7ee9c60a54 100644--- a/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/albums/[albumId=id]/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -128,6 +128,8 @@if (backUrl === AppRoute.SHARING && album.albumUsers.length === 0 && !album.hasSharedLink) {isCreatingSharedAlbum = true;+ } else if (backUrl === AppRoute.SHARED_LINKS) {+ backUrl = history.state?.backUrl || AppRoute.ALBUMS;}});diff --git a/web/src/routes/(user)/sharing/sharedlinks/+page.svelte b/web/src/routes/(user)/sharing/sharedlinks/+page.svelteindex 8ed4ae9fb6..b7d4da2941 100644--- a/web/src/routes/(user)/sharing/sharedlinks/+page.svelte+++ b/web/src/routes/(user)/sharing/sharedlinks/+page.svelte@@ -1,5 +1,5 @@<script lang="ts">- import { goto } from '$app/navigation';+ import { goto, afterNavigate } from '$app/navigation';import ControlAppBar from '$lib/components/shared-components/control-app-bar.svelte';import CreateSharedLinkModal from '$lib/components/shared-components/create-share-link-modal/create-shared-link-modal.svelte';import {@@ -50,9 +50,16 @@await refresh();editSharedLink = null;};++ let backUrl: string = AppRoute.SHARING;++ afterNavigate(({ from }) => {+ let url: string | undefined = from?.url?.pathname;+ backUrl = url || AppRoute.SHARING;+ });</script>-<ControlAppBar backIcon={mdiArrowLeft} onClose={() => goto(AppRoute.SHARING)}>+<ControlAppBar backIcon={mdiArrowLeft} onClose={() => goto(backUrl)}>{#snippet leading()}{$t('shared_links')}{/snippet}