diff --git a/VERSION b/VERSION index 5a9264f..5ec4258 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1158 \ No newline at end of file +1159 \ No newline at end of file diff --git a/backend/routes/osm_auth.py b/backend/routes/osm_auth.py index d81ba53..213826f 100644 --- a/backend/routes/osm_auth.py +++ b/backend/routes/osm_auth.py @@ -157,10 +157,16 @@ async def status(user=Depends(get_current_user)): "SELECT osm_name, osm_uid, linked_at FROM user_osm WHERE user_id=?", (user["id"],) ).fetchone() - if not row: - return {"linked": False} - return {"linked": True, "osm_name": row["osm_name"], - "osm_uid": row["osm_uid"], "linked_at": row["linked_at"]} + # Registrierungs-URL umgebungsabhängig: Sandbox auf Staging, echte OSM in Prod. + base = { + "linked": bool(row), + "signup_url": OSM_OAUTH_BASE + "/user/new", + "sandbox": "dev.openstreetmap" in OSM_OAUTH_BASE, + "configured": bool(CLIENT_ID), + } + if row: + base.update(osm_name=row["osm_name"], osm_uid=row["osm_uid"], linked_at=row["linked_at"]) + return base # ------------------------------------------------------------------ diff --git a/backend/static/index.html b/backend/static/index.html index bb489c0..a934541 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 bd12889..7a0fa2b 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 = '1158'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '1159'; // ← 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; diff --git a/backend/static/js/pages/settings.js b/backend/static/js/pages/settings.js index c7544b9..b55f1fb 100644 --- a/backend/static/js/pages/settings.js +++ b/backend/static/js/pages/settings.js @@ -977,7 +977,25 @@ window.Page_settings = (() => { font-size:var(--text-sm);font-weight:600;cursor:pointer"> OSM-Konto verknüpfen - `; + +
+ Noch kein OSM-Konto? Was ist das? +
+

OpenStreetMap ist die freie Weltkarte – von Menschen gemacht, gehört allen, keine Werbung, kein Datenverkauf. Mit einem kostenlosen Konto trägst du hundefreundliche Orte ein, die jeder Hundehalter sieht.

+

So geht's:

+
    +
  1. Konto erstellen (Benutzername + E-Mail – kein Klarname nötig)
  2. +
  3. Bestätigungs-E-Mail anklicken
  4. +
  5. Hier zurück → „OSM-Konto verknüpfen"
  6. +
+ ${st.sandbox ? `

⚠️ Testphase: Dies ist eine Test-Karte. Deine Einträge verändern die echte OpenStreetMap noch nicht.

` : ''} + + Kostenloses OSM-Konto erstellen + + +
+
`; el.querySelector('#settings-osm-link').addEventListener('click', async () => { try { const r = await API.get('/osm-auth/authorize'); diff --git a/backend/static/landing.html b/backend/static/landing.html index 4023d8f..ca06f56 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 8f27062..31c38a3 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 = '1158'; +const VER = '1159'; const CACHE_VERSION = `by-v${VER}`; const CACHE_STATIC = `${CACHE_VERSION}-static`; const CACHE_TILES = 'ban-yaro-tiles-v1'; // bleibt über SW-Updates erhalten