From 6eba9feffeea0732a05ecda3577e92ac1a7f85ac Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 14 Feb 2023 21:58:15 +0000 Subject: [PATCH] condense uploads listing on view change --- copyparty/httpcli.py | 2 +- copyparty/up2k.py | 1 + copyparty/web/up2k.js | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 676bf051..825bd514 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1421,7 +1421,7 @@ class HttpCli(object): self.log(t, 1) raise Pebkac(403, t) - if is_put and not self.args.no_dav: + if is_put and not (self.args.no_dav or self.args.nw): # allow overwrite if... # * volflag 'daw' is set # * and account has delete-access diff --git a/copyparty/up2k.py b/copyparty/up2k.py index 7ce5f750..8ba5cbd8 100644 --- a/copyparty/up2k.py +++ b/copyparty/up2k.py @@ -2269,6 +2269,7 @@ class Up2k(object): if ( not ret["hash"] and "fk" in vfs.flags + and not self.args.nw and (cj["user"] in vfs.axs.uread or cj["user"] in vfs.axs.upget) ): ap = absreal(djoin(job["ptop"], job["prel"], job["name"])) diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index 066c6c4f..89b1c993 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -1452,7 +1452,7 @@ function up2k_init(subtle) { }); }; - var etaref = 0, etaskip = 0, utw_minh = 0, utw_read = 0; + var etaref = 0, etaskip = 0, utw_minh = 0, utw_read = 0, utw_card = 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, @@ -1465,6 +1465,12 @@ function up2k_init(subtle) { //ebi('acc_info').innerHTML = humantime(st.time.busy) + ' ' + f2f(now / 1000, 1); + if (utw_card != pvis.act) { + utw_card = pvis.act; + utw_read = 9001; + ebi('u2tabw').style.minHeight = '0px'; + } + if (++utw_read >= 20) { utw_read = 0; utw_minh = parseInt(ebi('u2tabw').style.minHeight || '0');