chore: bump svelte gestures (#22263)

This commit is contained in:
Daniel Dietzler 2025-09-22 04:03:06 +02:00 committed by GitHub
parent fe416b121c
commit b2f3bf7079
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 15 deletions

View file

@ -7,7 +7,7 @@
import { IconButton, modalManager } from '@immich/ui';
import { mdiChevronLeft, mdiChevronRight, mdiClose, mdiCog, mdiFullscreen, mdiPause, mdiPlay } from '@mdi/js';
import { onDestroy, onMount } from 'svelte';
import { swipe } from 'svelte-gestures';
import { useSwipe } from 'svelte-gestures';
import { t } from 'svelte-i18n';
import { fly } from 'svelte/transition';
@ -131,6 +131,13 @@
document.removeEventListener('webkitfullscreenchange', exitFullscreenHandler);
};
});
const { swipe, onswipe, onswipedown } = useSwipe(
() => {},
() => ({ touchAction: 'pan-x' }),
{ onswipedown: showControlBar },
true,
);
</script>
<svelte:document
@ -153,7 +160,8 @@
]}
/>
<svelte:body use:swipe={() => ({ touchAction: 'pan-x' })} onswipedown={showControlBar} />
{/* @ts-expect-error https://github.com/Rezi/svelte-gestures/issues/38#issuecomment-3315953573 */ null}
<svelte:body {@attach swipe} {onswipe} {onswipedown} />
{#if showControls}
<div