diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/app.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/app.js | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/app.js b/packages/meshbay-hub/src/meshbay_hub/static/app.js index 0394af6..de47982 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/app.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/app.js @@ -159,10 +159,20 @@ function TransferWidget() { const running = items.filter(i => i.status === 'running'); const waiting = items.filter( i => i.status === 'queued' || i.status === 'preparing'); + // Its own group, and not a leftover. + // + // "Finished" used to be defined as everything that is not running, queued or + // preparing — a definition by exclusion, which quietly swallowed `paused` the + // day pausing shipped. A transfer somebody stopped on purpose then sat under + // "Finished", beside the ones that are actually over, offering a resume + // button in the section of things that cannot be resumed. + const paused = items.filter(i => i.status === 'paused'); const finished = items.filter( i => i.status !== 'running' && i.status !== 'queued' - && i.status !== 'preparing'); - const active = running.length + waiting.length; + && i.status !== 'preparing' && i.status !== 'paused'); + // Paused counts as active: it is not over, the person means to come back to + // it, and the badge saying nothing is happening would be a lie. + const active = running.length + waiting.length + paused.length; // Grouped, and in this order: what is moving, what is waiting, what is over. // Re-sorting the flat list on every emit made rows jump under the pointer @@ -171,6 +181,7 @@ function TransferWidget() { const groups = [ ['running', running], ['waiting', waiting], + ['paused', paused], ['finished', finished], ].filter(([, rows]) => rows.length); |