mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-11 19:06:56 +00:00
now the size and speed formatters hide on 0 fix the status tab so it displays the same as the gtkui
This commit is contained in:
parent
c81b1620ca
commit
7999bd1e8c
@ -90,13 +90,13 @@ Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
|
|||||||
seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds
|
seeders = status.total_seeds > -1 ? status.num_seeds + ' (' + status.total_seeds + ')' : status.num_seeds
|
||||||
peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers
|
peers = status.total_peers > -1 ? status.num_peers + ' (' + status.total_peers + ')' : status.num_peers
|
||||||
var data = {
|
var data = {
|
||||||
downloaded: fsize(status.total_done) + ' (' + fsize(status.total_payload_download) + ')',
|
downloaded: fsize(status.total_done),
|
||||||
uploaded: fsize(status.total_uploaded) + ' (' + fsize(status.total_payload_upload) + ')',
|
uploaded: fsize(status.total_uploaded),
|
||||||
share: status.ratio.toFixed(3),
|
share: status.ratio.toFixed(3),
|
||||||
announce: ftime(status.next_announce),
|
announce: ftime(status.next_announce),
|
||||||
tracker_status: status.tracker_status,
|
tracker_status: status.tracker_status,
|
||||||
downspeed: fspeed(status.download_payload_rate),
|
downspeed: (status.download_payload_rate) ? fspeed(status.download_payload_rate) : '0.0 KiB/s',
|
||||||
upspeed: fspeed(status.upload_payload_rate),
|
upspeed: (status.upload_payload_rate) ? fspeed(status.upload_payload_rate) : '0.0 KiB/s',
|
||||||
eta: ftime(status.eta),
|
eta: ftime(status.eta),
|
||||||
pieces: status.num_pieces + ' (' + fsize(status.piece_length) + ')',
|
pieces: status.num_pieces + ' (' + fsize(status.piece_length) + ')',
|
||||||
seeders: seeders,
|
seeders: seeders,
|
||||||
@ -109,6 +109,9 @@ Ext.deluge.details.StatusTab = Ext.extend(Ext.Panel, {
|
|||||||
}
|
}
|
||||||
data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');
|
data.auto_managed = _((status.is_auto_managed) ? 'True' : 'False');
|
||||||
|
|
||||||
|
data.downloaded += ' (' + ((status.total_payload_download) ? fsize(status.total_payload_download) : '0.0 KiB') + ')';
|
||||||
|
data.uploaded += ' (' + ((status.total_payload_download) ? fsize(status.total_payload_download): '0.0 KiB') + ')';
|
||||||
|
|
||||||
for (var field in this.fields) {
|
for (var field in this.fields) {
|
||||||
this.fields[field].innerHTML = data[field];
|
this.fields[field].innerHTML = data[field];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user