From 09dc561027011ce2de1291ef8ae38c43fed1b331 Mon Sep 17 00:00:00 2001 From: Marc Blatter Date: Sat, 4 Jul 2026 18:59:51 +0200 Subject: [PATCH] Dashboard V2: Professional redesign - mobile-optimized, dark theme, green accents - Responsive sidebar layout (70px fixed + main content) - Dark theme #0a0e27 with green primary #00ff88 - Metrics grid: Portfolio, USDT Free, Trades, Win Rate, P&L, Open - Open positions section with entry price - Recent closes section with profit/loss colors - Live status badge with pulse animation - 100% mobile responsive (480px, 768px breakpoints) - Real-time updates every 1 second - Clean, minimalist design --- src/web_dashboard.py | 650 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 545 insertions(+), 105 deletions(-) diff --git a/src/web_dashboard.py b/src/web_dashboard.py index 8c0a9cb..edddb6a 100644 --- a/src/web_dashboard.py +++ b/src/web_dashboard.py @@ -1,9 +1,7 @@ #!/usr/bin/env python3 from fastapi import FastAPI -from fastapi.responses import HTMLResponse, FileResponse -from fastapi.staticfiles import StaticFiles +from fastapi.responses import HTMLResponse from fastapi.middleware.cors import CORSMiddleware -import json app = FastAPI() @@ -15,7 +13,6 @@ app.add_middleware( allow_headers=['*'], ) -# Global state state = { 'current_trades': {}, 'completed_trades': [], @@ -39,127 +36,570 @@ async def get_state(): @app.get('/', response_class=HTMLResponse) async def dashboard(): - html = ''' - + return ''' + -Bot Dashboard + + +Trading Bot -

Trading Bot Dashboard

-
-
Liquid USDT
bash.00
-
Trades Today
0
-
Daily P&L
bash.00
-
Win Rate
0%
-
Open Positions
0
-
-
-

Open Trades

-
No open trades
-
+
+ + -
-

Closed Trades

-
No closed trades
-
+ +
+ +
+ +
+
+ LIVE +
+
-
+ ''' - return html if __name__ == '__main__': import uvicorn