Remove legacy frontend assets and update gallery routes

This commit is contained in:
2026-03-14 15:06:28 +01:00
parent 4f576ceb04
commit 78151aabfe
550 changed files with 826 additions and 108930 deletions

View File

@@ -36,6 +36,7 @@ export default function ArtworkNavigator({ artworkId, onNavigate, onOpenViewer,
const touchStartX = useRef(null);
const touchStartY = useRef(null);
const touchIgnoreSwipe = useRef(false);
// Resolve neighbors on mount / artworkId change
useEffect(() => {
@@ -133,14 +134,25 @@ export default function ArtworkNavigator({ artworkId, onNavigate, onOpenViewer,
// Touch swipe
useEffect(() => {
function onTouchStart(e) {
touchIgnoreSwipe.current = Boolean(e.target?.closest?.('[data-nav-swipe-ignore="1"]'));
if (touchIgnoreSwipe.current) {
touchStartX.current = null;
touchStartY.current = null;
return;
}
touchStartX.current = e.touches[0].clientX;
touchStartY.current = e.touches[0].clientY;
}
function onTouchEnd(e) {
if (touchIgnoreSwipe.current) {
touchIgnoreSwipe.current = false;
return;
}
if (touchStartX.current === null) return;
const dx = e.changedTouches[0].clientX - touchStartX.current;
const dy = e.changedTouches[0].clientY - touchStartY.current;
touchStartX.current = null;
touchStartY.current = null;
if (Math.abs(dx) > 50 && Math.abs(dy) < 80) {
const n = neighborsRef.current;
if (dx > 0) navigate(n.prevId, n.prevUrl);