Fix bandwidth chart not updating, fix pause button blocked by actionBusy
- Bandwidth chart drawChart effect now runs on every re-render instead of only when running/paused changes (chart was stuck showing empty) - Pause button no longer wrapped in performQuickAction/actionBusy guard, so it works immediately even during ongoing operations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
670c2f1ff5
commit
4ea3a75dc0
@ -306,7 +306,7 @@ const BandwidthChart = memo(function BandwidthChart({ items, running, paused }:
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
drawChart();
|
drawChart();
|
||||||
}, [drawChart]);
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={containerRef} className="bandwidth-chart-container">
|
<div ref={containerRef} className="bandwidth-chart-container">
|
||||||
@ -1903,10 +1903,10 @@ export function App(): ReactElement {
|
|||||||
<svg viewBox="0 0 24 24" width="18" height="18"><polygon points="6,3 20,12 6,21" fill="currentColor" /></svg>
|
<svg viewBox="0 0 24 24" width="18" height="18"><polygon points="6,3 20,12 6,21" fill="currentColor" /></svg>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
className={`ctrl-icon-btn ctrl-pause${snapshot.session.running && !snapshot.session.paused ? " active" : ""}`}
|
className={`ctrl-icon-btn ctrl-pause${snapshot.session.running && !snapshot.session.paused ? " active" : ""}${snapshot.session.paused ? " paused" : ""}`}
|
||||||
title="Pause"
|
title={snapshot.session.paused ? "Fortsetzen" : "Pause"}
|
||||||
disabled={actionBusy || !snapshot.canPause}
|
disabled={!snapshot.canPause}
|
||||||
onClick={() => { void performQuickAction(() => window.rd.togglePause()); }}
|
onClick={() => { void window.rd.togglePause(); }}
|
||||||
>
|
>
|
||||||
<svg viewBox="0 0 24 24" width="18" height="18"><rect x="5" y="3" width="4.5" height="18" rx="1" fill="currentColor" /><rect x="14.5" y="3" width="4.5" height="18" rx="1" fill="currentColor" /></svg>
|
<svg viewBox="0 0 24 24" width="18" height="18"><rect x="5" y="3" width="4.5" height="18" rx="1" fill="currentColor" /><rect x="14.5" y="3" width="4.5" height="18" rx="1" fill="currentColor" /></svg>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user