Sprint 12+13: Tagebuch Day-One-Redesign, Notiz-Feature, Icon-Fixes, SW by-v405
Tagebuch:
- Day-One-Listenansicht: Wochentag + Tageszahl + Meta-Zeile (Zeit/Ort/Wetter)
- 4 Ansichten: Liste, Medien-Mosaik, Kalender (mit Sprungbuttons), Karte (GPS-Marker)
- Detail-Ansicht inline im Content-Bereich (kein Fullscreen-Overlay mehr)
- Hero-Bild vollständig sichtbar (object-fit:contain), Lightbox mit Safe-Area
- 2-Spalten-Layout Desktop: Text + Leaflet-Karte + POI-Liste
- EXIF-GPS-Extraktion bei Foto-Upload, historisches Wetter via Archive-API
- NoteStation-Import: Fotos in diary_media (80 Einträge migriert, 94 Medien)
- Stats-Endpoints: /diary/stats, /diary/calendar, /diary/locations
Notiz-Feature:
- Generische notes-Tabelle (parent_type + parent_id + meta_json)
- 📝-Button in 8 Bereichen, Notizblock-Seite mit KI-Analyse
- KI-Toggle in Einstellungen, notes_ki_enabled in User-Profil
Icons & Design:
- fill:currentColor Fix für welcome/onboarding/friends.js
- --c-icon Variable, --c-text-muted Dark Mode aufgehellt
- 15+ neue Phosphor-Icons aus lokaler Kopie
- CSS Network-First im SW, Cache-Control-Middleware
Infrastruktur:
- Wiki-Anreicherungs-Scheduler-Jobs entfernt (abgeschlossen)
- auth.py: notes_ki_enabled + is_social_media im User-Response
This commit is contained in:
parent
95f91fdc00
commit
553e9e7854
35 changed files with 4558 additions and 370 deletions
|
|
@ -80,6 +80,24 @@ class _UploadSizeMiddleware(BaseHTTPMiddleware):
|
|||
app.add_middleware(_UploadSizeMiddleware)
|
||||
|
||||
|
||||
class _CacheControlMiddleware(BaseHTTPMiddleware):
|
||||
"""Setzt Cache-Control-Header für statische Assets.
|
||||
CSS/JS: no-cache (ETag-Validierung) — iOS cached sonst ewig ohne Ablaufdatum.
|
||||
Versioned Assets (?v=…): immutable — URL ändert sich bei Updates.
|
||||
"""
|
||||
async def dispatch(self, request: Request, call_next):
|
||||
response = await call_next(request)
|
||||
path = request.url.path
|
||||
if path.startswith(("/css/", "/js/", "/icons/phosphor.svg")):
|
||||
if "v=" in str(request.url.query):
|
||||
response.headers["Cache-Control"] = "public, max-age=31536000, immutable"
|
||||
else:
|
||||
response.headers["Cache-Control"] = "no-cache, must-revalidate"
|
||||
return response
|
||||
|
||||
app.add_middleware(_CacheControlMiddleware)
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
# API-Router registrieren (werden nach und nach hinzugefügt)
|
||||
# ------------------------------------------------------------------
|
||||
|
|
@ -122,6 +140,7 @@ from routes.praise import router as praise_router
|
|||
from routes.weather import router as weather_router
|
||||
from routes.social import router as social_router
|
||||
from routes.moderation import router as moderation_router
|
||||
from routes.notes import router as notes_router
|
||||
|
||||
app.include_router(auth_router, prefix="/api/auth", tags=["Auth"])
|
||||
app.include_router(dogs_router, prefix="/api/dogs", tags=["Hunde"])
|
||||
|
|
@ -163,6 +182,7 @@ app.include_router(achievements_router, prefix="/api/achievements", tags=
|
|||
app.include_router(training_router, prefix="/api/training", tags=["Training"])
|
||||
app.include_router(praise_router, prefix="/api/praise", tags=["Praise"])
|
||||
app.include_router(moderation_router, prefix="/api/moderation", tags=["Moderation"])
|
||||
app.include_router(notes_router, prefix="/api/notes", tags=["Notes"])
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue