Split speed graph and value into separate modules

Render the 150-pixel sparkline and fixed-width speed label as independent bordered pills so changing digit counts cannot move or resize the graph.
This commit is contained in:
Sucukdeluxe
2026-08-26 15:24:59 +02:00
parent 2bd20b12b4
commit 98c688fc4c
3 changed files with 30 additions and 10 deletions
+3 -1
View File
@@ -1403,7 +1403,9 @@ const DownloadSpeedSparkline = memo(function DownloadSpeedSparkline({ speedBps,
return (
<div className={`speed-sparkline${hidden ? " speed-sparkline-hidden" : ""}`} aria-hidden={hidden} title="Aktuelle Download-Geschwindigkeit (geglättet)">
<canvas ref={canvasRef} className="speed-sparkline-canvas" />
<div className="speed-sparkline-graph">
<canvas ref={canvasRef} className="speed-sparkline-canvas" />
</div>
<span className="speed-sparkline-value">{speedBps > 0 ? formatSpeedMbps(speedBps) : "0 B/s"}</span>
</div>
);