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:
@@ -9465,7 +9465,7 @@
|
||||
|
||||
function _fmtBytes(b) {
|
||||
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';
|
||||
return Math.round(b / 1e3) + ' KB';
|
||||
}
|
||||
@@ -9514,9 +9514,9 @@
|
||||
} else if (j.phase === 'download') {
|
||||
pct = j.percent != null ? j.percent : 0;
|
||||
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)`;
|
||||
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)
|
||||
for (const l of (j.links || [])) {
|
||||
const max = l.mbit / 8 * 0.92;
|
||||
@@ -9551,7 +9551,7 @@
|
||||
</div>${bar}
|
||||
<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>` : ''}
|
||||
${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>`;
|
||||
}).join('');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user