Du musst angemeldet sein, um Nachrichten zu sehen.
- - Anmelden - -diff --git a/CHANGELOG.md b/CHANGELOG.md index a3a0139..425c772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [0.08.14] - 2026-02-20 + +### Added +- **Dashboard Links-Card**: Neue Card mit frei konfigurierbaren Links aus `config.yaml` + (`links:` Liste mit `url` + `label`). Ersetzt die Nachrichten-Card im Dashboard (closes #11). +- **`GET /api/links`**: Neuer Endpunkt gibt konfigurierte Links zurück. + +### Changed +- **Nachrichten-Seite öffentlich** (closes #11): Kein Login mehr erforderlich für `/messages`. + `initial_messages` und `new_message` werden an alle WebSocket-Clients gesendet. +- **Dashboard**: Nachrichten-Card entfernt; Nodes-Card auf `col-lg-8` verbreitert. +- **Nachrichtenliste Trenner**: `border-bottom` von `translucent` auf `var(--bs-border-color)` – + deutlich sichtbarer Trenner zwischen Nachrichten. +- **`msgCount`-Badge theme-aware**: `bg-secondary` → `bg-secondary-subtle text-secondary-emphasis` + – Text in Hell- und Dunkel-Theme lesbar. + ## [0.08.13] - 2026-02-20 ### Added diff --git a/config.yaml b/config.yaml index 24fe139..66da1e5 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -version: "0.08.13" +version: "0.08.14" bot: name: "MeshDD-Bot" @@ -17,3 +17,9 @@ database: auth: session_max_age: 86400 + +links: + - url: "https://meshtastic.org" + label: "Meshtastic" + - url: "https://meshmap.net" + label: "MeshMap" diff --git a/meshbot/bot.py b/meshbot/bot.py index f741cd9..b1b2189 100644 --- a/meshbot/bot.py +++ b/meshbot/bot.py @@ -357,7 +357,7 @@ class MeshBot: if not is_own: msg = await self.db.insert_message(str(from_id), str(to_id), channel, portnum, text) if self.ws_manager: - await self.ws_manager.broadcast_auth("new_message", msg) + await self.ws_manager.broadcast("new_message",msg) await self._broadcast_stats() # Process commands @@ -464,7 +464,7 @@ class MeshBot: try: stored = await self.db.insert_message(my_id, "^all", channel, "TEXT_MESSAGE_APP", msg) if self.ws_manager: - await self.ws_manager.broadcast_auth("new_message", stored) + await self.ws_manager.broadcast("new_message",stored) except Exception: logger.exception("Error storing sent message") try: diff --git a/meshbot/webserver.py b/meshbot/webserver.py index e95f1dc..dc65145 100644 --- a/meshbot/webserver.py +++ b/meshbot/webserver.py @@ -80,6 +80,7 @@ class WebServer: self.app.router.add_get("/api/nina/config", self._api_nina_get) self.app.router.add_put("/api/nina/config", self._api_nina_update) self.app.router.add_get("/api/nina/alerts", self._api_nina_alerts) + self.app.router.add_get("/api/links", self._api_links) self.app.router.add_get("/login", self._serve_login) self.app.router.add_get("/register", self._serve_login) self.app.router.add_get("/admin", self._serve_admin) @@ -128,9 +129,8 @@ class WebServer: packets = await self.db.get_recent_packets(200) await ws.send_str(json.dumps({"type": "initial_packets", "data": packets})) - if user: - messages = await self.db.get_recent_messages(50) - await ws.send_str(json.dumps({"type": "initial_messages", "data": messages})) + messages = await self.db.get_recent_messages(50) + await ws.send_str(json.dumps({"type": "initial_messages", "data": messages})) async for msg in ws: pass # We only send, not receive @@ -164,6 +164,10 @@ class WebServer: stats["bot_connected"] = self.bot.is_connected() return web.json_response(stats) + async def _api_links(self, request: web.Request) -> web.Response: + links = config.get("links", []) or [] + return web.json_response(links) + async def _api_send(self, request: web.Request) -> web.Response: require_user_api(request) if not self.bot: diff --git a/static/css/style.css b/static/css/style.css index 7ed3d1f..f271344 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -305,8 +305,8 @@ /* ── Full Messages Page ──────────────────────────────────────── */ .msg-full-item { - padding: .5rem .875rem; - border-bottom: 1px solid var(--bs-border-color-translucent); + padding: .6rem .875rem; + border-bottom: 1px solid var(--bs-border-color); } .msg-full-item:last-child { border-bottom: none; } diff --git a/static/index.html b/static/index.html index b8e5704..cb580a2 100644 --- a/static/index.html +++ b/static/index.html @@ -152,7 +152,7 @@
Du musst angemeldet sein, um Nachrichten zu sehen.
- - Anmelden - -