Feature: Ratings, Lightbox, Forum-Standort, Notifications, Routen-Recording, Chat-Picker
- Bewertungssystem (ratings.py): Sterne für Sitter/Walks/Places/Routen - Admin: Server-Log-Viewer + OSM-Cache-Statistiken - Chat: "Neue Nachricht"-Button mit Freundesliste-Picker - Forum: 5 neue Kategorien, Standorteingabe (locationPicker), Absende-Toast, Lightbox - Freunde: Aktivitäts-Filter (Chips), Freundschaftsanfrage → In-App-Notification - Sitter: locationPicker statt manuelle Koordinateneingabe + ratingStars - Tagebuch: Bilder-Lightbox im Detail-View, iOS-Modal-Header-Fix (90svh) - Routen: Start/Stopp-Button wechselt Zustand, nutzt Page_map.isRecording() - Benachrichtigungen: Delete-Button sichtbar, typ-basierte Navigation, Toast-Feedback - OSM: globales Semaphore + 429-Retry-Logic; Scheduler: München-Umland, täglich - SW by-v225, APP_VER 202
This commit is contained in:
parent
aa70a838f2
commit
e56183b642
21 changed files with 648 additions and 175 deletions
|
|
@ -4,6 +4,7 @@ BAN YARO — FastAPI Hauptanwendung
|
|||
|
||||
import os
|
||||
import logging
|
||||
from collections import deque
|
||||
from fastapi import FastAPI, Request
|
||||
from fastapi.staticfiles import StaticFiles
|
||||
from fastapi.responses import FileResponse, JSONResponse
|
||||
|
|
@ -13,10 +14,25 @@ from database import init_db
|
|||
import ki
|
||||
import scheduler as sched
|
||||
|
||||
# In-Memory Log-Buffer (letzte 500 Zeilen)
|
||||
log_buffer: deque = deque(maxlen=500)
|
||||
|
||||
class _BufferHandler(logging.Handler):
|
||||
_fmt = logging.Formatter()
|
||||
|
||||
def emit(self, record):
|
||||
log_buffer.append({
|
||||
't': self._fmt.formatTime(record, '%H:%M:%S'),
|
||||
'l': record.levelname,
|
||||
'm': record.getMessage(),
|
||||
'n': record.name,
|
||||
})
|
||||
|
||||
logging.basicConfig(
|
||||
level = logging.INFO,
|
||||
format = "%(asctime)s [%(levelname)s] %(name)s: %(message)s",
|
||||
)
|
||||
logging.getLogger().addHandler(_BufferHandler())
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
@ -78,6 +94,7 @@ from routes.sharing import dog_router as sharing_dog_router, share_router as
|
|||
from routes.widget import router as widget_router
|
||||
from routes.notifications import router as notifications_router
|
||||
from routes.services import router as services_router
|
||||
from routes.ratings import router as ratings_router
|
||||
|
||||
app.include_router(auth_router, prefix="/api/auth", tags=["Auth"])
|
||||
app.include_router(dogs_router, prefix="/api/dogs", tags=["Hunde"])
|
||||
|
|
@ -109,6 +126,7 @@ app.include_router(sharing_share_router, prefix="/api/share", tags=["Teilen"
|
|||
app.include_router(widget_router, prefix="/api/widget", tags=["Widget"])
|
||||
app.include_router(notifications_router, prefix="/api/notifications", tags=["Notifications"])
|
||||
app.include_router(services_router, prefix="/api/services", tags=["Services"])
|
||||
app.include_router(ratings_router, prefix="/api/ratings", tags=["Ratings"])
|
||||
|
||||
|
||||
# ------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue