diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 76658d7e..6d298195 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -3929,8 +3929,7 @@ var treectl = (function () { if (res.readme) show_readme(res.readme); - document.title = '⇆🎉 ' + uricom_dec(document.location.pathname.slice(1, -1))[0]; - + wintitle(); filecols.set_style(); showfile.mktree(); mukey.render(); @@ -4979,6 +4978,11 @@ function goto_unpost(e) { } +function wintitle(txt) { + document.title = (txt ? txt : '') + get_vpath().slice(1, -1).split('/').pop(); +} + + ebi('files').onclick = ebi('docul').onclick = function (e) { var tgt = e.target.closest('a[id]'); if (tgt && tgt.getAttribute('id').indexOf('f-') === 0 && tgt.textContent.endsWith('/')) { diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index d6bc12cf..94212115 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -525,13 +525,15 @@ function Donut(uc, st) { } r.on = function (ya) { - r.fc = 99; + r.fc = r.tc = 99; r.eta = null; r.base = pos(); optab.innerHTML = ya ? svg() : optab.getAttribute('ico'); el = QS('#ops a .donut'); - if (!ya) + if (!ya) { favico.upd(); + wintitle(); + } }; r.do = function () { if (!el) @@ -541,6 +543,11 @@ function Donut(uc, st) { v = pos() - r.base, ofs = el.style.strokeDashoffset = o - o * v / t; + if (++r.tc >= 10) { + wintitle(f2f(v * 100 / t, 1) + '%, ' + r.eta + 's, ', true); + r.tc = 0; + } + if (favico.txt) { if (++r.fc < 10 && r.eta && r.eta > 99) return;