Put peers before speeds, to reduce bouncing
When speed goes to zero, it disappears, which looks weird when it's not the last item on the status line.
This commit is contained in:
parent
252443a529
commit
744d38259e
1 changed files with 7 additions and 7 deletions
|
|
@ -71,9 +71,9 @@ function TorrentList (state) {
|
|||
<div class='ellipsis'>
|
||||
${renderPercentProgress()}
|
||||
${renderTotalProgress()}
|
||||
${renderPeers()}
|
||||
${renderDownloadSpeed()}
|
||||
${renderUploadSpeed()}
|
||||
${renderPeers()}
|
||||
</div>
|
||||
`)
|
||||
}
|
||||
|
|
@ -95,6 +95,12 @@ function TorrentList (state) {
|
|||
}
|
||||
}
|
||||
|
||||
function renderPeers () {
|
||||
if (prog.numPeers === 0) return
|
||||
var count = prog.numPeers === 1 ? 'peer' : 'peers'
|
||||
return hx`<span>${prog.numPeers} ${count}</span>`
|
||||
}
|
||||
|
||||
function renderDownloadSpeed () {
|
||||
if (prog.downloadSpeed === 0) return
|
||||
return hx`<span>↓ ${prettyBytes(prog.downloadSpeed)}/s</span>`
|
||||
|
|
@ -104,12 +110,6 @@ function TorrentList (state) {
|
|||
if (prog.uploadSpeed === 0) return
|
||||
return hx`<span>↑ ${prettyBytes(prog.uploadSpeed)}/s</span>`
|
||||
}
|
||||
|
||||
function renderPeers () {
|
||||
if (prog.numPeers === 0) return
|
||||
var count = prog.numPeers === 1 ? 'peer' : 'peers'
|
||||
return hx`<span>${prog.numPeers} ${count}</span>`
|
||||
}
|
||||
}
|
||||
|
||||
// Download button toggles between torrenting (DL/seed) and paused
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue