High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: escape handling in search asset viewer (#25621)
Daniel Dietzler2d09853c3df0
diff --git a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelteindex bf169e578d..24b63256ca 100644--- a/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte+++ b/web/src/routes/(user)/search/[[photos=photos]]/[[assetId=id]]/+page.svelte@@ -1,7 +1,6 @@<script lang="ts">import { afterNavigate, goto } from '$app/navigation';import { page } from '$app/state';- import { shortcut } from '$lib/actions/shortcut';import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte';import ControlAppBar from '$lib/components/shared-components/control-app-bar.svelte';import GalleryViewer from '$lib/components/shared-components/gallery-viewer/gallery-viewer.svelte';@@ -24,7 +23,6 @@import type { Viewport } from '$lib/managers/timeline-manager/types';import { Route } from '$lib/route';import { AssetInteraction } from '$lib/stores/asset-interaction.svelte';- import { assetViewingStore } from '$lib/stores/asset-viewing.store';import { lang, locale } from '$lib/stores/preferences.store';import { preferences, user } from '$lib/stores/user.store';import { handlePromiseError } from '$lib/utils';@@ -48,7 +46,6 @@import { tick, untrack } from 'svelte';import { t } from 'svelte-i18n';- let { isViewing: showAssetViewer } = assetViewingStore;const viewport: Viewport = $state({ width: 0, height: 0 });let searchResultsElement: HTMLElement | undefined = $state();@@ -82,18 +79,6 @@untrack(() => handlePromiseError(onSearchQueryUpdate()));});- const onEscape = () => {- if ($showAssetViewer) {- return;- }-- if (assetInteraction.selectionActive) {- assetInteraction.selectedAssets = [];- return;- }- handlePromiseError(goto(previousRoute));- };-$effect(() => {if (scrollY) {scrollYHistory = scrollY;@@ -260,7 +245,6 @@</script><svelte:window bind:scrollY />-<svelte:document use:shortcut={{ shortcut: { key: 'Escape' }, onShortcut: onEscape }} />{#if terms}<section