mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-01-19 00:13:01 +08:00
fix for file transfer: sort row and remove empty dir
This commit is contained in:
parent
9a86a595ff
commit
1ee92c9f68
@ -146,11 +146,15 @@ class JobTable: Reactor.Component {
|
||||
var n = job.num_entries || job.entries.length;
|
||||
if (i > n) i = n;
|
||||
var res = i + ' / ' + n + " files";
|
||||
if (job.total_size > 0) res += ", " + getSize(0, job.finished_size) + ' / ' + getSize(0, job.total_size);
|
||||
if (job.total_size > 0) {
|
||||
var s = getSize(0, job.finished_size);
|
||||
if (s) s += " / ";
|
||||
res += ", " + s + getSize(0, job.total_size);
|
||||
}
|
||||
// below has problem if some file skipped
|
||||
var percent = (100. * job.finished_size / job.total_size).toInteger(); // (100. * i / (n || 1)).toInteger();
|
||||
var percent = job.total_size == 0 ? 100 : (100. * job.finished_size / job.total_size).toInteger(); // (100. * i / (n || 1)).toInteger();
|
||||
if (job.finished) percent = '100';
|
||||
res += ", " + percent + "%";
|
||||
if (percent) res += ", " + percent + "%";
|
||||
if (job.finished) res = "Finished " + res;
|
||||
if (job.speed) res += ", " + getSize(0, job.speed) + "/s";
|
||||
return res;
|
||||
|
@ -73,7 +73,7 @@ class Grid: Behavior {
|
||||
var getValue = function(x) {
|
||||
var value = x.attributes["value"];
|
||||
if (value == undefined) return x.text.toLowerCase();
|
||||
return value.toInteger();
|
||||
return value.toFloat();
|
||||
}
|
||||
var sort = function(r1, r2, asc) {
|
||||
if (r1[1].text == "..") {
|
||||
|
Loading…
Reference in New Issue
Block a user