fix(diagnostic): Download-Fenster — Hinweis statt gelbem ℹ, Zahlen mit Komma

Das Info-Zeichen ℹ erschien je nach Schrift als nacktes "i" und gelb wie
eine Warnung. Jetzt grau mit "Hinweis:". Prozent, GB und MB/s mit Komma
wie im Rest der Seite.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-31 15:53:55 +01:00
co-authored by Claude Opus 5.5
parent 126e33c4c0
commit 3edcc36a74
+4 -4
View File
@@ -9465,7 +9465,7 @@
function _fmtBytes(b) { function _fmtBytes(b) {
if (!b && b !== 0) return '?'; if (!b && b !== 0) return '?';
if (b >= 1e9) return (b / 1e9).toFixed(2) + ' GB'; if (b >= 1e9) return (b / 1e9).toFixed(2).replace('.', ',') + ' GB';
if (b >= 1e6) return (b / 1e6).toFixed(0) + ' MB'; if (b >= 1e6) return (b / 1e6).toFixed(0) + ' MB';
return Math.round(b / 1e3) + ' KB'; return Math.round(b / 1e3) + ' KB';
} }
@@ -9514,9 +9514,9 @@
} else if (j.phase === 'download') { } else if (j.phase === 'download') {
pct = j.percent != null ? j.percent : 0; pct = j.percent != null ? j.percent : 0;
line = j.percent != null line = j.percent != null
? `${pct.toFixed(1)} % · ${_fmtBytes(j.bytes)} / ${_fmtBytes(j.total)}` ? `${pct.toFixed(1).replace('.', ',')} % · ${_fmtBytes(j.bytes)} / ${_fmtBytes(j.total)}`
: `${_fmtBytes(j.bytes)} heruntergeladen (Größe unbekannt)`; : `${_fmtBytes(j.bytes)} heruntergeladen (Größe unbekannt)`;
sub = (j.speedBps ? (j.speedBps / 1e6).toFixed(1) + ' MB/s' : '') + (j.etaSeconds != null ? ' · noch ' + _fmtEta(j.etaSeconds) : ''); sub = (j.speedBps ? (j.speedBps / 1e6).toFixed(1).replace('.', ',') + ' MB/s' : '') + (j.etaSeconds != null ? ' · noch ' + _fmtEta(j.etaSeconds) : '');
// Netzwerkkarte der Box: unter 1 Gbit/s ist sie oft die Bremse (Kabel, Port, Green-Mode) // Netzwerkkarte der Box: unter 1 Gbit/s ist sie oft die Bremse (Kabel, Port, Green-Mode)
for (const l of (j.links || [])) { for (const l of (j.links || [])) {
const max = l.mbit / 8 * 0.92; const max = l.mbit / 8 * 0.92;
@@ -9551,7 +9551,7 @@
</div>${bar} </div>${bar}
<div style="color:${color === '#0096FF' ? '#E0E0F0' : color};font-size:12px;">${line}</div> <div style="color:${color === '#0096FF' ? '#E0E0F0' : color};font-size:12px;">${line}</div>
${sub ? `<div style="color:#6a6a88;font-size:11px;margin-top:2px;">${sub}</div>` : ''} ${sub ? `<div style="color:#6a6a88;font-size:11px;margin-top:2px;">${sub}</div>` : ''}
${j.note && j.phase !== 'error' ? `<div style="color:#FFD60A;font-size:11px;margin-top:2px;">ℹ ${escapeHtml(j.note)}</div>` : ''} ${j.note && j.phase !== 'error' ? `<div style="color:#8888AA;font-size:11px;margin-top:2px;">Hinweis: ${escapeHtml(j.note)}</div>` : ''}
</div>`; </div>`;
}).join(''); }).join('');
} }