diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 8054cf4e..a8614879 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1666,8 +1666,6 @@ html.light #bbox-overlay figcaption a { #op_up2k { padding: 0 1em 1em 1em; - min-height: 0; - transition: min-height .2s; } #drops { display: none; @@ -1832,13 +1830,17 @@ html.light #u2err.err { #u2notbtn * { line-height: 1.3em; } +#u2tabw { + min-height: 0; + transition: min-height .2s; + margin: 3em auto; +} #u2tab { border-collapse: collapse; - margin: 3em auto; width: calc(100% - 2em); max-width: 100em; } -#op_up2k.srch #u2tab { +#op_up2k.srch #u2tabf { max-width: none; } #u2tab td { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index ef19fed8..9369e7d3 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -117,7 +117,7 @@ ebi('op_up2k').innerHTML = ( '\n' + - '\n' + + '
\n' + ' \n' + ' \n' + ' \n' + @@ -126,7 +126,7 @@ ebi('op_up2k').innerHTML = ( ' \n' + ' \n' + ' \n' + - '
filename
\n' + + '\n' + '

the files were added to the queue
however there is a busy up2k in another browser tab,
so waiting for that to finish first

\n' + '

\n' + diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index dda2bd7c..9ab016f1 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -1069,7 +1069,7 @@ function up2k_init(subtle) { } more_one_file(); - var etaref = 0, etaskip = 0, op_minh = 0; + var etaref = 0, etaskip = 0, utw_minh = 0; function etafun() { var nhash = st.busy.head.length + st.busy.hash.length + st.todo.head.length + st.todo.hash.length, nsend = st.busy.upload.length + st.todo.upload.length, @@ -1082,13 +1082,10 @@ function up2k_init(subtle) { //ebi('acc_info').innerHTML = humantime(st.time.busy) + ' ' + f2f(now / 1000, 1); - var op = ebi('op_up2k'), - uff = ebi('u2footfoot'), - minh = QS('#op_up2k.act') ? Math.max(op_minh, uff.offsetTop + uff.offsetHeight - op.offsetTop + 32) : 0; - - if (minh > op_minh || !op_minh) { - op_minh = minh; - op.style.minHeight = op_minh + 'px'; + var minh = QS('#op_up2k.act') && st.is_busy ? Math.max(utw_minh, ebi('u2tab').offsetHeight + 32) : 0; + if (utw_minh < minh || !utw_minh) { + utw_minh = minh; + ebi('u2tabw').style.minHeight = utw_minh + 'px'; } if (!nhash) @@ -1240,7 +1237,7 @@ function up2k_init(subtle) { } if (was_busy != is_busy) { - was_busy = is_busy; + st.is_busy = was_busy = is_busy; window[(is_busy ? "add" : "remove") + "EventListener"]("beforeunload", warn_uploader_busy); @@ -1269,7 +1266,7 @@ function up2k_init(subtle) { timer.rm(etafun); timer.rm(donut.do); - op_minh = 0; + utw_minh = 0; } else { timer.add(donut.do);