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:
@@ -71,9 +71,9 @@ function TorrentList (state) {
|
|||||||
<div class='ellipsis'>
|
<div class='ellipsis'>
|
||||||
${renderPercentProgress()}
|
${renderPercentProgress()}
|
||||||
${renderTotalProgress()}
|
${renderTotalProgress()}
|
||||||
|
${renderPeers()}
|
||||||
${renderDownloadSpeed()}
|
${renderDownloadSpeed()}
|
||||||
${renderUploadSpeed()}
|
${renderUploadSpeed()}
|
||||||
${renderPeers()}
|
|
||||||
</div>
|
</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 () {
|
function renderDownloadSpeed () {
|
||||||
if (prog.downloadSpeed === 0) return
|
if (prog.downloadSpeed === 0) return
|
||||||
return hx`<span>↓ ${prettyBytes(prog.downloadSpeed)}/s</span>`
|
return hx`<span>↓ ${prettyBytes(prog.downloadSpeed)}/s</span>`
|
||||||
@@ -104,12 +110,6 @@ function TorrentList (state) {
|
|||||||
if (prog.uploadSpeed === 0) return
|
if (prog.uploadSpeed === 0) return
|
||||||
return hx`<span>↑ ${prettyBytes(prog.uploadSpeed)}/s</span>`
|
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
|
// Download button toggles between torrenting (DL/seed) and paused
|
||||||
|
|||||||
Reference in New Issue
Block a user