From 0dbb1e0184c81a349fd29643114e63b2cedd08d6 Mon Sep 17 00:00:00 2001 From: ppfeiffer Date: Sun, 15 Feb 2026 14:17:15 +0100 Subject: [PATCH] feat: Smaller stat cards, battery icons, version in navbar, map fit - Stats cards compacter with smaller font and padding - Battery status with Bootstrap Icons and color coding - Version displayed in navbar from config - Map fits all nodes on open with invalidateSize Co-Authored-By: Claude Opus 4.6 --- meshbot/webserver.py | 2 ++ static/css/style.css | 32 -------------------------------- static/index.html | 20 ++++++++++---------- static/js/dashboard.js | 16 +++++++++------- static/js/map.js | 3 ++- 5 files changed, 23 insertions(+), 50 deletions(-) diff --git a/meshbot/webserver.py b/meshbot/webserver.py index 22c4ec1..c134360 100644 --- a/meshbot/webserver.py +++ b/meshbot/webserver.py @@ -5,6 +5,7 @@ import os from aiohttp import web +from meshbot import config from meshbot.database import Database logger = logging.getLogger(__name__) @@ -56,6 +57,7 @@ class WebServer: await ws.send_str(json.dumps({"type": "initial", "data": nodes})) stats = await self.db.get_stats() + stats["version"] = config.get("version", "0.0.0") await ws.send_str(json.dumps({"type": "stats_update", "data": stats})) messages = await self.db.get_recent_messages(50) diff --git a/static/css/style.css b/static/css/style.css index df64761..376bb14 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -11,38 +11,6 @@ box-shadow: 0 0 6px var(--bs-success); } -.battery-bar { - display: inline-flex; - align-items: center; - gap: 6px; -} - -.battery-indicator { - width: 28px; - height: 13px; - border: 1.5px solid var(--bs-secondary); - border-radius: 2px; - position: relative; - display: inline-block; - vertical-align: middle; -} - -.battery-indicator::after { - content: ''; - position: absolute; - right: -5px; - top: 2px; - width: 3px; - height: 7px; - background: var(--bs-secondary); - border-radius: 0 2px 2px 0; -} - -.battery-fill { - height: 100%; - border-radius: 1px; -} - .table-responsive::-webkit-scrollbar { width: 6px; } diff --git a/static/index.html b/static/index.html index ba3c60f..90ac766 100644 --- a/static/index.html +++ b/static/index.html @@ -13,7 +13,7 @@