This commit is contained in:
ed 2021-08-25 09:02:34 +02:00
parent 2b6e5ebd2d
commit bc70cfa6f0
3 changed files with 30 additions and 7 deletions

View file

@ -1602,12 +1602,21 @@ html.light #bbox-overlay figcaption a {
padding: .2em .5em; padding: .2em .5em;
border-radius: .5em; border-radius: .5em;
border-width: .25em 0; border-width: .25em 0;
width: 20em; width: 17em;
text-align: left; text-align: left;
white-space: nowrap; white-space: nowrap;
display: inline-block; display: inline-block;
font-family: 'scp', monospace, monospace; font-family: 'scp', monospace, monospace;
} }
#u2etas.o {
width: 20em;
}
#u2etas .o {
display: none;
}
#u2etas.o .o {
display: unset;
}
#u2etaw { #u2etaw {
width: 21em; width: 21em;
font-size: .94em; font-size: .94em;
@ -1627,7 +1636,7 @@ html.light #bbox-overlay figcaption a {
#u2etaw.w { #u2etaw.w {
width: 52em; width: 52em;
text-align: right; text-align: right;
margin: 3em auto -3em auto; margin: 3em auto -2.7em auto;
} }
#u2cards a { #u2cards a {
padding: .2em 1em; padding: .2em 1em;

View file

@ -102,9 +102,10 @@ ebi('op_up2k').innerHTML = (
' </div>\n' + ' </div>\n' +
'</div>\n' + '</div>\n' +
'<div id="u2etaw"><div id="u2etas">\n' + '<div id="u2etaw"><div id="u2etas"><div class="o">\n' +
' hash: <span id="u2etah" tt="average &lt;em&gt;hashing&lt;/em&gt; speed, and estimated time until finish">(nothing to do yet)</span><br />\n' + ' hash: <span id="u2etah" tt="average &lt;em&gt;hashing&lt;/em&gt; speed, and estimated time until finish">(nothing to do yet)</span><br />\n' +
' send: <span id="u2etau" tt="average &lt;em&gt;upload&lt;/em&gt; speed and estimated time until finish">(nothing to do yet)</span>\n' + ' send: <span id="u2etau" tt="average &lt;em&gt;upload&lt;/em&gt; speed and estimated time until finish">(nothing to do yet)</span><br />\n' +
' </div><span class="o">task: </span><span id="u2etat" tt="average &lt;em&gt;total&lt;/em&gt; speed and estimated time until finish">(nothing to do yet)</span>\n' +
'</div></div>\n' + '</div></div>\n' +
'<div id="u2cards">\n' + '<div id="u2cards">\n' +

View file

@ -603,7 +603,8 @@ function up2k_init(subtle) {
}, },
"time": { "time": {
"hashing": 0, "hashing": 0,
"uploading": 0 "uploading": 0,
"busy": 0
} }
}; };
@ -907,13 +908,17 @@ function up2k_init(subtle) {
ebi('u2etah').innerHTML = 'Done ({0}, {1} files)'.format(humansize(st.bytes.hashed), pvis.ctr["ok"] + pvis.ctr["ng"]); ebi('u2etah').innerHTML = 'Done ({0}, {1} files)'.format(humansize(st.bytes.hashed), pvis.ctr["ok"] + pvis.ctr["ng"]);
if (!nsend && !nhash) if (!nsend && !nhash)
ebi('u2etau').innerHTML = 'Done ({0}, {1} files)'.format(humansize(st.bytes.uploaded), pvis.ctr["ok"] + pvis.ctr["ng"]); ebi('u2etau').innerHTML = ebi('u2etat').innerHTML = (
'Done ({0}, {1} files)'.format(humansize(st.bytes.uploaded), pvis.ctr["ok"] + pvis.ctr["ng"]));
if (!st.busy.hash.length && !hashing_permitted())
nhash = 0;
if (!parallel_uploads || !(nhash + nsend)) if (!parallel_uploads || !(nhash + nsend))
return; return;
var t = []; var t = [];
if (nhash && (st.busy.hash.length || hashing_permitted())) { if (nhash) {
st.time.hashing += td; st.time.hashing += td;
t.push(['u2etah', st.bytes.hashed, st.time.hashing]); t.push(['u2etah', st.bytes.hashed, st.time.hashing]);
} }
@ -921,6 +926,10 @@ function up2k_init(subtle) {
st.time.uploading += td; st.time.uploading += td;
t.push(['u2etau', st.bytes.uploaded, st.time.uploading]); t.push(['u2etau', st.bytes.uploaded, st.time.uploading]);
} }
if (nhash || nsend) {
st.time.busy += td;
t.push(['u2etat', st.bytes.finished, st.time.busy]);
}
for (var a = 0; a < t.length; a++) { for (var a = 0; a < t.length; a++) {
var rem = st.bytes.total - t[a][1], var rem = st.bytes.total - t[a][1],
bps = t[a][1] / t[a][2], bps = t[a][1] / t[a][2],
@ -1859,6 +1868,10 @@ function up2k_init(subtle) {
for (var a = nodes.length - 1; a >= 0; a--) for (var a = nodes.length - 1; a >= 0; a--)
nodes[a].addEventListener('touchend', nop, false); nodes[a].addEventListener('touchend', nop, false);
ebi('u2etas').onclick = function () {
clmod(ebi('u2etas'), 'o', 't');
};
set_fsearch(); set_fsearch();
bumpthread({ "target": 1 }); bumpthread({ "target": 1 });
if (parallel_uploads < 1) if (parallel_uploads < 1)