fix: improve upload telemetry readability
Increase the lower-sidebar availability and telemetry type scale, and update the header and sidebar speed values through one shared formatter so both surfaces stay synchronized with every live sample.
This commit is contained in:
1 parent
b57b72327c
commit
a80c3e60a5
3 files changed
+31
-10
No files matched your search
+9
-3
@@ -3652,10 +3652,16 @@ function _setRollingUploadMetric(id, value) {
|
||||
});
|
||||
}
|
||||
|
||||
function formatUploadSpeed(kbs) {
|
||||
function getUploadSpeedText(kbs = lastUploadStats.globalSpeedKbs) {
|
||||
return !kbs || kbs <= 0 ? '0 B/s' : formatSpeed(kbs);
|
||||
}
|
||||
|
||||
function updateUploadSpeedDisplays() {
|
||||
const text = getUploadSpeedText();
|
||||
_setUploadTelemetryText('uploadTelemetrySpeed', text);
|
||||
_setUploadTelemetryText('uploadSpeedValue', text);
|
||||
}
|
||||
|
||||
function syncUploadSpeedSparklineVisibility(view) {
|
||||
const widget = document.getElementById('uploadSpeedSparkline');
|
||||
if (!widget) return;
|
||||
@@ -3714,7 +3720,7 @@ function drawUploadSpeedSparkline() {
|
||||
function updateUploadSpeedSparkline() {
|
||||
const speedKbs = Math.max(0, Number(lastUploadStats.globalSpeedKbs) || 0);
|
||||
window.SpeedHistory.updateSpeedHistory(uploadSpeedState, speedKbs * 1024);
|
||||
_setUploadTelemetryText('uploadSpeedValue', formatUploadSpeed(speedKbs));
|
||||
updateUploadSpeedDisplays();
|
||||
drawUploadSpeedSparkline();
|
||||
}
|
||||
|
||||
@@ -3740,7 +3746,7 @@ function updateStatusBar() {
|
||||
_setRollingUploadMetric('uploadTelemetryRunning', stats.inProgress);
|
||||
_setRollingUploadMetric('uploadTelemetryCompleted', _sessionDoneCount);
|
||||
_setRollingUploadMetric('uploadTelemetryFailed', _sessionErrorCount);
|
||||
_setUploadTelemetryText('uploadTelemetrySpeed', formatUploadSpeed(lastUploadStats.globalSpeedKbs || 0));
|
||||
updateUploadSpeedDisplays();
|
||||
_setUploadTelemetryText('uploadTelemetryEta', etaSeconds > 0 ? formatTime(etaSeconds) : '--:--');
|
||||
updateUploadSidebarSummary(stats);
|
||||
}
|
||||
|
||||
+14
-6
@@ -2545,6 +2545,14 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.upload-sidebar-lower .view-sidebar-section-label {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.upload-sidebar-lower .view-sidebar-summary {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.upload-telemetry {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
@@ -2553,34 +2561,34 @@ select.hs-input { max-width: none; width: auto; min-width: 140px; }
|
||||
}
|
||||
|
||||
.upload-telemetry-row {
|
||||
min-height: 15px;
|
||||
min-height: 17px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
color: var(--text-dim);
|
||||
font-size: 11px;
|
||||
line-height: 15px;
|
||||
font-size: 12px;
|
||||
line-height: 17px;
|
||||
}
|
||||
|
||||
.upload-telemetry-value {
|
||||
min-width: 58px;
|
||||
color: var(--text);
|
||||
font-size: 11px;
|
||||
font-size: 12px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
text-align: right;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.upload-rolling-value {
|
||||
height: 15px;
|
||||
height: 17px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.upload-rolling-value > span {
|
||||
width: 100%;
|
||||
height: 15px;
|
||||
height: 17px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user