feat: password change + split account/household settings UI
CI / test-and-package (push) Successful in 43s
CI / build-android (push) Successful in 1m10s

- New /change-password route: validates current password,
  enforces min 4 chars, requires confirmation match
- update_password() helper in models.py
- Dashboard UI split into two collapsible sections:
  👤 Account Settings (password, ntfy, delete account)
  🏠 Household Settings (admin only: public link, timezone,
     delete household)
- 14 new i18n keys with fr/de translations
- Restored accidentally dropped 'Delete My Account' key
This commit is contained in:
agentbox
2026-08-01 12:23:30 +00:00
parent 4abbbecce6
commit bda54eda3a
4 changed files with 114 additions and 21 deletions
+7
View File
@@ -195,6 +195,13 @@ def set_public_enabled(household_id: int, enabled: bool) -> None:
# ── Users ─────────────────────────────────────────────────────────────────────
def update_password(user_id: int, new_password_hash: str) -> None:
"""Update a user's password hash."""
with get_db() as db:
db.execute("UPDATE users SET password_hash = ? WHERE id = ?",
(new_password_hash, user_id))
def get_user_by_id(user_id: int) -> dict | None:
"""Fetch a single user by ID."""
with get_db() as db: