From af1508c0de62179daa9262a6f3a834bee0a8994f Mon Sep 17 00:00:00 2001 From: rene Date: Mon, 4 May 2026 20:21:02 +0200 Subject: [PATCH] =?UTF-8?q?Feature:=20Fell-Typ=20Einstellung=20am=20Hundep?= =?UTF-8?q?rofil=20=E2=80=94=20personalisierte=20Wetter-Hinweise=20(SW=20b?= =?UTF-8?q?y-v693)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DB-Migration: dogs.fell_typ (kurz|mittel|lang|drahtaar|doppel|nackt) - Hund-Profil Formular: Dropdown "Felltyp" mit 6 Optionen, wird via PATCH /api/dogs/{id} gespeichert - Wetter: _dogWeatherLabel(d, felltyp) mit fell-spezifischen Hitze-/Kälteschwellen - Wetter: Fell-spezifische Hinweise (doppel + Hitze, nackt + Kälte, kurz + Frost) --- backend/database.py | 11 ++++++ backend/static/index.html | 8 ++-- backend/static/js/app.js | 2 +- backend/static/js/pages/dog-profile.js | 18 +++++++++ backend/static/js/pages/wetter.js | 51 +++++++++++++++++++++++--- backend/static/sw.js | 2 +- 6 files changed, 80 insertions(+), 12 deletions(-) diff --git a/backend/database.py b/backend/database.py index f20a924..d6b0dfe 100644 --- a/backend/database.py +++ b/backend/database.py @@ -540,6 +540,9 @@ def _migrate(conn_factory): ("pflege_tipps", "fell_pflege_art", "TEXT"), # Wiki-Foto-Einreichungen: Bildrechte-Bestätigung ("wiki_foto_submissions", "rights_confirmed", "INTEGER NOT NULL DEFAULT 0"), + # Tagebuch-Medien: Bildmaße für Querformat-Filter + ("diary_media", "img_width", "INTEGER"), + ("diary_media", "img_height", "INTEGER"), # Tagebuch: Wetter + POI-Metadaten beim Eintrag ("diary", "weather_json", "TEXT"), ("diary", "poi_json", "TEXT"), @@ -568,6 +571,8 @@ def _migrate(conn_factory): # Passwort-Zurücksetzen ("users", "password_reset_token", "TEXT"), ("users", "password_reset_expires", "TEXT"), + # Fell-Typ für personalisierte Wetter-Hinweise + ("dogs", "fell_typ", "TEXT"), # kurz|mittel|lang|drahtaar|doppel|nackt ] with conn_factory() as conn: for table, column, col_type in migrations: @@ -1940,6 +1945,12 @@ def _migrate(conn_factory): CREATE INDEX IF NOT EXISTS idx_dq_kategorie ON daily_quotes(kategorie); """) + # Goldene Gassi-Stunde: User-Einstellung + existing_u = [row[1] for row in conn.execute("PRAGMA table_info(users)").fetchall()] + if 'gassi_stunde_push' not in existing_u: + conn.execute("ALTER TABLE users ADD COLUMN gassi_stunde_push INTEGER NOT NULL DEFAULT 0") + logger.info("Migration: users.gassi_stunde_push bereit.") + # Wiederkehrende Ausgaben (Daueraufträge) conn.executescript(""" CREATE TABLE IF NOT EXISTS recurring_expenses ( diff --git a/backend/static/index.html b/backend/static/index.html index cbcdd15..5ce7819 100644 --- a/backend/static/index.html +++ b/backend/static/index.html @@ -93,9 +93,9 @@ - - - + + + @@ -562,7 +562,7 @@ - + diff --git a/backend/static/js/app.js b/backend/static/js/app.js index bf0f697..c235900 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 = '692'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen +const APP_VER = '693'; // ← bei jedem Deploy mit Frontend-Änderungen erhöhen const APP_VERSION = '1.3.0'; // ← semantische Version, wird bei make release gesetzt const IS_STAGING = location.hostname === 'staging.banyaro.app'; diff --git a/backend/static/js/pages/dog-profile.js b/backend/static/js/pages/dog-profile.js index 82a2e8a..5e40c51 100644 --- a/backend/static/js/pages/dog-profile.js +++ b/backend/static/js/pages/dog-profile.js @@ -970,6 +970,23 @@ window.Page_dog_profile = (() => { +
+ + +
+