diff --git a/VERSION b/VERSION index ededf28..35c53b6 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1220 \ No newline at end of file +1221 \ No newline at end of file diff --git a/backend/main.py b/backend/main.py index bf4f74b..e399801 100644 --- a/backend/main.py +++ b/backend/main.py @@ -2601,6 +2601,18 @@ async def wurfboerse_page(): return HTMLResponse(content=html, headers={"Cache-Control": "max-age=1800"}) +# Rechtsseiten: Pfad-URLs (SEO-Footer, App-Store-Metadaten, E-Mails) auf die +# SPA-Hash-Routen umleiten — die Inhalte leben als SPA-Seiten (#agb, …). +# Muss VOR dem SPA-Fallback registriert sein. +@app.get("/agb") +@app.get("/datenschutz") +@app.get("/impressum") +async def legal_page_redirect(request: _Request): + from fastapi.responses import RedirectResponse + page = request.url.path.strip("/") + return RedirectResponse(f"/#{page}", status_code=302) + + # SPA Fallback — ALLE nicht-API-Routen gehen zur index.html @app.get("/{full_path:path}") async def spa_fallback(full_path: str): diff --git a/backend/static/index.html b/backend/static/index.html index 9b1271c..5555dbd 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -86,14 +86,14 @@ Ban Yaro - + - - - - - + + + + + @@ -617,11 +617,11 @@ - - - - - + + + + + @@ -631,7 +631,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index a55f2a6..9462986 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 = '1220'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1221'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.6.0'; // ← semantische Version, wird bei make release gesetzt window.APP_VER = APP_VER; // global verfügbar für andere Module (z.B. offline-indicator) window.APP_VERSION = APP_VERSION; @@ -1198,7 +1198,11 @@ const App = (() => { } const startPage = (hashPage && pages[hashPage]) ? hashPage : 'welcome'; - navigate(state.user ? startPage : 'welcome', false, hashParams); + // Hash-Route auch ohne Login ansteuern — öffentliche Seiten (AGB, + // Datenschutz, Impressum, …) müssen für anonyme Besucher erreichbar sein. + // Auth-pflichtige Seiten leitet navigate() über den requiresAuth-Guard + // selbst auf 'welcome' um. + navigate(startPage, false, hashParams); if (window.Worlds && state.user) window.Worlds.init(state); } diff --git a/backend/static/landing.html b/backend/static/landing.html index ddc5d3d..e19f5f0 100644 --- a/backend/static/landing.html +++ b/backend/static/landing.html @@ -4,7 +4,7 @@ - + Ban Yaro — Die Hunde-App für Deutschland, Österreich & Schweiz diff --git a/backend/static/sw.js b/backend/static/sw.js index c168f51..c514aff 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -4,7 +4,7 @@ ============================================================ */ // ← EINZIGE Stelle für die Version — STATIC_ASSETS und CACHE_VERSION leiten sich ab -const VER = '1220'; +const VER = '1221'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten