From defa47ae45dee695cea64add0bc448cbe2339f95 Mon Sep 17 00:00:00 2001 From: Xavier Date: Wed, 7 Oct 2026 01:26:21 +0200 Subject: [PATCH] =?UTF-8?q?feat:=20cr=C3=A9ation=20de=20la=20structure=20U?= =?UTF-8?q?I=20du=20Dashboard=20(style=20Gemini)=20et=20liaison=20avec=20l?= =?UTF-8?q?a=20route=20prot=C3=A9g=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/main.py | 10 +-- frontend/dashboard.html | 138 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 144 insertions(+), 4 deletions(-) create mode 100644 frontend/dashboard.html diff --git a/backend/main.py b/backend/main.py index db9365a..bf43eb1 100644 --- a/backend/main.py +++ b/backend/main.py @@ -119,15 +119,17 @@ def login(login_data: LoginRequest, response: Response, db: Session = Depends(ge @app.get("/dashboard") def dashboard(request: Request): - """Route protégée : nécessite un cookie de session valide.""" + """Route protégée : affiche l'interface principale si le cookie est valide.""" token = request.cookies.get("session_token") if not token: return RedirectResponse(url="/login") payload = verify_token(token) if not payload: - # Si le token a expiré (60 min) ou est invalide, retour au login return RedirectResponse(url="/login") - username = payload.get("sub") - return {"message": f"Bienvenue sur le tableau de bord sécurisé, {username} !"} \ No newline at end of file + frontend_path = os.path.join(os.getcwd(), "frontend", "dashboard.html") + if not os.path.exists(frontend_path): + raise HTTPException(status_code=404, detail="Interface du tableau de bord introuvable.") + + return FileResponse(frontend_path) \ No newline at end of file diff --git a/frontend/dashboard.html b/frontend/dashboard.html new file mode 100644 index 0000000..2419ddd --- /dev/null +++ b/frontend/dashboard.html @@ -0,0 +1,138 @@ + + + + + + AETHAS38 - Dashboard + + + + + + + + + + +
+ + + + + +
+ +
+
+ Logo + AETHAS38 +
+ +
+ + +
+ AETHAS38 Logo +

Comment puis-je vous aider aujourd'hui ?

+

L'orchestrateur Multi-IA est prêt.

+
+ + +
+
+ + + +
+

AETHAS38 peut faire des erreurs. Vérifiez toujours les informations importantes.

+
+
+ +
+ + + + \ No newline at end of file