From 87d3006aa72fd91d8492825e4d1c2a4c096db2dc Mon Sep 17 00:00:00 2001 From: rene Date: Sun, 3 May 2026 11:04:24 +0200 Subject: [PATCH] =?UTF-8?q?Fix:=20Swipe-Begrenzung=20=E2=80=94=20kein=20?= =?UTF-8?q?=C3=9Cberziehen=20=C3=BCber=20erste/letzte=20Welt,=20SW=20by-v6?= =?UTF-8?q?49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/static/index.html | 8 ++++---- backend/static/js/app.js | 2 +- backend/static/js/worlds.js | 6 ++++-- backend/static/sw.js | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/backend/static/index.html b/backend/static/index.html index a1fdb4c..9c8b3ae 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -93,9 +93,9 @@ - - - + + + @@ -565,7 +565,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index 3f47c07..605d4cf 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -3,7 +3,7 @@ Router, State-Management, Navigation, Initialisierung. ============================================================ */ -const APP_VER = '648'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '649'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.2.1'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/js/worlds.js b/backend/static/js/worlds.js index 3722220..9ef2e6a 100644 --- a/backend/static/js/worlds.js +++ b/backend/static/js/worlds.js @@ -109,9 +109,11 @@ window.Worlds = (() => { if (_t.vert === null) _t.vert = Math.abs(dy) > Math.abs(dx) + 4; if (_t.vert) return; e.preventDefault(); - _t.moved = dx; + // Nicht über erste/letzte Seite hinausziehen + const cdx = _cur === 0 ? Math.min(0, dx) : _cur === 2 ? Math.max(0, dx) : dx; + _t.moved = cdx; const base = -_cur * (100 / 3); - track.style.transform = `translateX(calc(${base}% + ${dx}px))`; + track.style.transform = `translateX(calc(${base}% + ${cdx}px))`; }, { passive: false }); track.addEventListener('touchend', () => { diff --git a/backend/static/sw.js b/backend/static/sw.js index b70d445..d18bcc4 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications + Tile-Cache ============================================================ */ -const CACHE_VERSION = 'by-v648'; +const CACHE_VERSION = 'by-v649'; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten const CACHE_API = 'ban-yaro-api-v1'; // API-Response-Cache