Enhanced time estimates for sync

This commit is contained in:
2025-11-07 22:28:11 -05:00
parent 82d3c45b3f
commit 25a431d6a9

View File

@ -489,7 +489,17 @@ async function loadStatus() {
html += '<div class="progress-wrap"><div class="progress-bar" id="syncbar"></div></div>'; html += '<div class="progress-wrap"><div class="progress-bar" id="syncbar"></div></div>';
html += '<p><small>Sync progress: ' + progress.toFixed(2) + '%'; html += '<p><small>Sync progress: ' + progress.toFixed(2) + '%';
if (ibd) { if (ibd) {
html += ' • Estimated time left: ' + formatEta(etaSeconds); if (etaSeconds && isFinite(etaSeconds) && etaSeconds > 0) {
const etaDate = new Date(Date.now() + etaSeconds * 1000);
const etaString = etaDate.toLocaleString(undefined, {
month: 'long',
day: 'numeric',
year: 'numeric',
hour: 'numeric',
minute: '2-digit'
});
html += ' • Estimated time left: ' + formatEta(etaSeconds) + ' (' + etaString + ')';
}
} }
html += '</small></p>'; html += '</small></p>';