cleanup: status bar — drop stale v4.1.13 hardcode + extract inline styles

The bottom status-bar version span had "v4.1.13" hardcoded as initial
content from a release several versions ago. init() overwrites it via
window.api.getVersion() on app boot, so the user only ever sees this
for the millisecond between paint and IPC return — but during that
window we were lying about the version, and if init() ever crashed
the user would be stuck looking at v4.1.13 in the corner forever.

Cleared the initial content to empty so the span just doesn't render
text until the real version arrives.

Side effect: extracted the inline `style="color:var(--text-secondary);
font-size:12px; margin-left:auto; padding-right:12px"` from
statusBarQueueSummary to a .status-bar-queue-summary class, plus a
new .status-bar-version class for the version pill. Both consistent
with the rest of the status-bar styling. Bonus: queue summary picks
up font-variant-numeric: tabular-nums so the "X B | Y avg | Z done"
numbers don't jitter horizontally as values update during a
download.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
xRangerDE 2026-05-11 02:28:28 +02:00
parent ce01034586
commit e09efd4a33
2 changed files with 16 additions and 2 deletions

View File

@ -805,8 +805,8 @@
<div class="status-dot" id="statusDot"></div> <div class="status-dot" id="statusDot"></div>
<span id="statusText">Nicht verbunden</span> <span id="statusText">Nicht verbunden</span>
</div> </div>
<span id="statusBarQueueSummary" style="color: var(--text-secondary); font-size:12px; margin-left:auto; padding-right:12px;"></span> <span id="statusBarQueueSummary" class="status-bar-queue-summary"></span>
<span id="versionText">v4.1.13</span> <span id="versionText" class="status-bar-version"></span>
</div> </div>
</main> </main>
</div> </div>

View File

@ -1840,6 +1840,20 @@ select option {
.status-dot.connected { background: var(--success); } .status-dot.connected { background: var(--success); }
.status-dot.error { background: var(--error); } .status-dot.error { background: var(--error); }
.status-bar-queue-summary {
color: var(--text-secondary);
font-size: 12px;
margin-left: auto;
padding-right: 12px;
font-variant-numeric: tabular-nums;
}
.status-bar-version {
color: var(--text-secondary);
font-size: 12px;
opacity: 0.7;
}
/* Old generic scrollbar rules were dead superseded by the /* Old generic scrollbar rules were dead superseded by the
purple-themed *::-webkit-scrollbar block further down the file. purple-themed *::-webkit-scrollbar block further down the file.
Removed to avoid confusion when someone greps for scrollbar styles. */ Removed to avoid confusion when someone greps for scrollbar styles. */