tweak the seeds and peers renderers to match the gtk ones
This commit is contained in:
parent
583d76ca18
commit
141d254f35
|
@ -53,11 +53,19 @@ function progress(value, p, r) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function seeds(value, p, r) {
|
function seeds(value, p, r) {
|
||||||
return String.format("{0} ({1})", value, r.data['total_seeds']);
|
if (r.data['total_seeds'] > -1) {
|
||||||
|
return String.format("{0} ({1})", value, r.data['total_seeds']);
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function peers(value, p, r) {
|
function peers(value, p, r) {
|
||||||
return String.format("{0} ({1})", value, r.data['total_peers']);
|
if (r.data['total_peers'] > -1) {
|
||||||
|
return String.format("{0} ({1})", value, r.data['total_peers']);
|
||||||
|
} else {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function avail(value) {
|
function avail(value) {
|
||||||
|
|
Loading…
Reference in New Issue