minor fix

This commit is contained in:
2026-07-08 17:39:25 +08:00
parent 73f2569b3d
commit 64b790e49f
+3 -3
View File
@@ -461,9 +461,9 @@ while (await new Promise(o => setTimeout(o, 1000, true))) {
let uptime = await Rpc2.invoke('uptime').catch(() => 0); let uptime = await Rpc2.invoke('uptime').catch(() => 0);
$('#uptimeLabel').innerText = Temporal.Duration.from({ seconds: uptime }).round({ largestUnit: 'hours' }).toLocaleString('en', { style: 'digital' }); $('#uptimeLabel').innerText = Temporal.Duration.from({ seconds: uptime }).round({ largestUnit: 'hours' }).toLocaleString('en', { style: 'digital' });
let rate = count / uptime; let rate = done / uptime;
let remaining = count ? Math.floor((total - count) / rate) : 0; let remaining = rate > 0 ? Math.floor((total - count) / rate) : 0;
$('#remainingLabel').innerText = remaining >= 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${(rate * 60).toFixed(2)}/min)` : ''; $('#remainingLabel').innerText = remaining > 0 ? `${Temporal.Duration.from({ seconds: remaining }).round({ largestUnit: 'hours' }).toLocaleString('en')} (${(rate * 60).toFixed(2)}/min)` : '';
break; break;
case 'STANDBY': case 'STANDBY':
$('#send > span.text').innerText = 'Resume'; $('#send > span.text').innerText = 'Resume';