From ac981911435121a63d082fd458e34fb76d0183e7 Mon Sep 17 00:00:00 2001 From: ppfeiffer Date: Wed, 18 Feb 2026 17:42:46 +0100 Subject: [PATCH] fix: v0.6.12 - Paket-Log Typ-Badge Text immer lesbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Badges nutzen solide bg-{color} mit text-white (warning: text-dark) statt bg-opacity-20 text-{color} – Typ-Label dadurch in allen Themes klar sichtbar. Co-Authored-By: Claude Sonnet 4.6 --- CHANGELOG.md | 7 +++++++ config.yaml | 2 +- static/js/packets.js | 6 +++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7409800..a02883c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.6.12] - 2026-02-18 + +### Fixed +- **Paket-Log**: Typ-Badges nutzen jetzt solide `bg-{color}`-Hintergründe mit `text-white` + (bei Warning: `text-dark`) statt `bg-opacity-20 text-{color}` – garantiert lesbaren + Typ-Label-Text in jedem Theme. + ## [0.6.11] - 2026-02-18 ### Changed diff --git a/config.yaml b/config.yaml index b51f016..6a5d6b0 100644 --- a/config.yaml +++ b/config.yaml @@ -1,4 +1,4 @@ -version: "0.6.11" +version: "0.6.12" bot: name: "MeshDD-Bot" diff --git a/static/js/packets.js b/static/js/packets.js index 3c771b0..1e68dee 100644 --- a/static/js/packets.js +++ b/static/js/packets.js @@ -83,10 +83,14 @@ function fmtChannel(ch) { return `${ch}`; } +// Colors that need dark text on their background +const _LIGHT_BG = new Set(['warning', 'yellow', 'lime']); + function portnumBadge(portnum) { const key = typeKey(portnum); const cfg = typeCfg(key); - return `${escapeHtml(cfg.label)}`; + const txtCls = _LIGHT_BG.has(cfg.color) ? 'text-dark' : 'text-white'; + return `${escapeHtml(cfg.label)}`; } function fmtPayload(portnum, payloadStr) {