fix: v0.6.12 - Paket-Log Typ-Badge Text immer lesbar
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 <noreply@anthropic.com>
This commit is contained in:
parent
ed3757199e
commit
ac98191143
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
version: "0.6.11"
|
||||
version: "0.6.12"
|
||||
|
||||
bot:
|
||||
name: "MeshDD-Bot"
|
||||
|
|
|
|||
|
|
@ -83,10 +83,14 @@ function fmtChannel(ch) {
|
|||
return `<span>${ch}</span>`;
|
||||
}
|
||||
|
||||
// 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 `<span class="badge bg-${cfg.color} bg-opacity-20 text-${cfg.color} pkt-type-badge">${escapeHtml(cfg.label)}</span>`;
|
||||
const txtCls = _LIGHT_BG.has(cfg.color) ? 'text-dark' : 'text-white';
|
||||
return `<span class="badge bg-${cfg.color} pkt-type-badge ${txtCls}">${escapeHtml(cfg.label)}</span>`;
|
||||
}
|
||||
|
||||
function fmtPayload(portnum, payloadStr) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue