From 35c8657e37630a1e0823fd2e615d071d7c4a8ab2 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 3 Apr 2026 21:03:07 +0200 Subject: [PATCH 01/16] fix drop visuals and make drop search work again --- copyparty/web/browser.css | 15 +++++++++------ copyparty/web/up2k.js | 31 ++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index a1c2d5e9..d6ac9087 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -2471,7 +2471,7 @@ html.y #bbox-overlay figcaption a { display: table; left: 10%; width: 78%; - height: 26%; + height: 78%; margin: 0; font-size: 3em; font-weight: bold; @@ -2490,7 +2490,7 @@ html.y #bbox-overlay figcaption a { background: rgba(24, 24, 24, 0.7); left: 8%; width: 82%; - height: 32%; + height: 82%; margin: -3vh 0; } .dropdesc.hl.err { @@ -2535,18 +2535,21 @@ html.y #bbox-overlay figcaption a { height: 100%; } #up_dz { - bottom: 12%; + position: absolute; + bottom: 0; } #srch_dz { - display: none; - top: 50%; + position: absolute; + top: 0; } #up_zd { + position: absolute; top: 12%; bottom: 12%; } #srch_zd { - display: none; + position: absolute; + top: 12%; bottom: 12%; } .dropdesc span { diff --git a/copyparty/web/up2k.js b/copyparty/web/up2k.js index 21a6dad0..c54d2a7c 100644 --- a/copyparty/web/up2k.js +++ b/copyparty/web/up2k.js @@ -1054,6 +1054,20 @@ function up2k_init(subtle) { function onoverbtn(e) { return onovercmn(this, e, true); } + function checkDropMode(){ + if(ebi('fsearch')?.checked){ + ebi('srch_zd').style.display = ''; + ebi('up_zd').style.display = 'none'; + ebi('srch_dz').style.display = ''; + ebi('up_dz').style.display = 'none'; + } + else{ + ebi('srch_zd').style.display = 'none'; + ebi('up_zd').style.display = ''; + ebi('srch_dz').style.display = 'none'; + ebi('up_dz').style.display = ''; + } + } function onovercmn(self, e, btn) { try { var ok = false, dt = e.dataTransfer.types; @@ -1087,6 +1101,7 @@ function up2k_init(subtle) { if (btn) return; + checkDropMode(); clmod(ebi('drops'), 'vis', 1); var v = self.getAttribute('v'); if (v) @@ -1100,6 +1115,7 @@ function up2k_init(subtle) { clmod(ebi(v), 'hl'); if (--nenters <= 0) { + checkDropMode(); clmod(ebi('drops'), 'vis'); clmod(ebi('up_dz'), 'hl'); clmod(ebi('srch_dz'), 'hl'); @@ -1158,10 +1174,10 @@ function up2k_init(subtle) { ev(e); nenters = 0; offdrag.call(this); - var dz = this && this.getAttribute('id'); - if (!dz && e && e.clientY) - // cuo2duo fallback - dz = e.clientY < window.innerHeight / 2 ? 'up_dz' : 'srch_dz'; + // var dz = this && this.getAttribute('id'); + // if (!dz && e && e.clientY) + // // cuo2duo fallback + // dz = e.clientY < window.innerHeight / 2 ? 'up_dz' : 'srch_dz'; var err = this.getAttribute('err'); if (err) @@ -1169,10 +1185,11 @@ function up2k_init(subtle) { toast.inf(0, L.u_scan); - if ((dz == 'up_dz' && uc.fsearch) || (dz == 'srch_dz' && !uc.fsearch)) - tgl_fsearch(); + // if ((dz == 'up_dz' && uc.fsearch) || (dz == 'srch_dz' && !uc.fsearch)) + // tgl_fsearch(); - if (!QS('#op_up2k.act')) + //if (!QS('#op_up2k.act')) + if(!uc.fsearch) goto('up2k'); var files, From b55d7b27a021c164b5230468130f4ec4dc40e8a6 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 3 Apr 2026 21:20:34 +0200 Subject: [PATCH 02/16] minor style adjustments --- copyparty/web/browser.css | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index d6ac9087..f790bffb 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1422,7 +1422,7 @@ html.y #ops svg circle { } #headerArea{ display: flex; - margin: .2em; + margin: .5em .5em -.5em .5em; } .hamburger_line{ height: .2em; @@ -2347,14 +2347,14 @@ html.y #bbox-overlay figcaption a { #bbox-overlay button { cursor: pointer; outline: none; - padding: 0 .3em; - margin: 0 .4em; + padding: 0 .4em; + margin: 0 .2em; border: 0; border-radius: 15%; background: rgba(50, 50, 50, 0.5); color: rgba(255,255,255,0.7); font-size: 1.4em; - line-height: 1.4em; + line-height: 2em; vertical-align: top; font-variant: small-caps; } @@ -2371,7 +2371,7 @@ html.y #bbox-overlay figcaption a { } #bbox-btns { top: .5em; - right: 2%; + right: .5em; position: fixed; } #bbox-halp { @@ -3304,6 +3304,9 @@ html.d #treepar { #topBar { display: block; } + #headerArea { + margin: .2em; + } #ops { margin: .5em !important; border-radius: .3em !important; @@ -3329,6 +3332,9 @@ html.d #treepar { #ggrid { margin: 0em -0.25em !important; } + #ghead { + margin: .5em; + } } @media (max-width: 32em) { #u2conf { From 39918cf8110b5431e8e69064a3b6d6651b5aa0a9 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 3 Apr 2026 21:46:36 +0200 Subject: [PATCH 03/16] fix tree causing scrollbar to appear when it shouldn't --- copyparty/web/browser.css | 3 ++- copyparty/web/browser.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index f790bffb..4af12aa0 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1633,6 +1633,7 @@ input.ssconf_v { position: absolute; left: 0; bottom: 0; + height: auto !important; overflow-x: hidden; overflow-y: auto; -ms-scroll-chaining: none; @@ -1923,7 +1924,7 @@ html.y #tree.nowrap .ntree a+a:hover { border-radius: .3em; padding: .2em .5em; line-height: 2.3em; - margin-bottom: 1.5em; + margin: 0 0 1.5em 0; } #hdoc, #ghead { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 7876e178..f8024976 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -7061,12 +7061,12 @@ var treectl = (function () { if (fixedpos && atop >= 0) { tree.style.position = 'absolute'; - tree.style.bottom = ''; + //tree.style.bottom = ''; fixedpos = false; } else if (!fixedpos && atop < 0) { tree.style.position = 'fixed'; - tree.style.height = 'auto'; + //tree.style.height = 'auto'; fixedpos = true; } From ababa893af19324994227da47169f3d19401c10a Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 3 Apr 2026 21:48:03 +0200 Subject: [PATCH 04/16] Revert "fix tree causing scrollbar to appear when it shouldn't" This reverts commit 39918cf8110b5431e8e69064a3b6d6651b5aa0a9. --- copyparty/web/browser.css | 3 +-- copyparty/web/browser.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 4af12aa0..f790bffb 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1633,7 +1633,6 @@ input.ssconf_v { position: absolute; left: 0; bottom: 0; - height: auto !important; overflow-x: hidden; overflow-y: auto; -ms-scroll-chaining: none; @@ -1924,7 +1923,7 @@ html.y #tree.nowrap .ntree a+a:hover { border-radius: .3em; padding: .2em .5em; line-height: 2.3em; - margin: 0 0 1.5em 0; + margin-bottom: 1.5em; } #hdoc, #ghead { diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index f8024976..7876e178 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -7061,12 +7061,12 @@ var treectl = (function () { if (fixedpos && atop >= 0) { tree.style.position = 'absolute'; - //tree.style.bottom = ''; + tree.style.bottom = ''; fixedpos = false; } else if (!fixedpos && atop < 0) { tree.style.position = 'fixed'; - //tree.style.height = 'auto'; + tree.style.height = 'auto'; fixedpos = true; } From 741ad0495c5d49942e93b609326e81ff86746c7b Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 3 Apr 2026 21:56:36 +0200 Subject: [PATCH 05/16] limit transition duration of tree to width --- copyparty/web/browser.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index f790bffb..89fdb675 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1639,7 +1639,7 @@ input.ssconf_v { overscroll-behavior-y: none; box-shadow: 0 0 1em var(--bg-d2), 0 -1px 0 rgba(128,128,128,0.3); border: 1px solid var(--bg-u3); - transition: .15s; + transition: width 0.15s; } #tree, html { From db864b921d1ded68a27ba27f6b4b2db6ae9b38e7 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Fri, 3 Apr 2026 21:59:57 +0200 Subject: [PATCH 06/16] fix tree causing scrollbar to appear when it shouldn't --- copyparty/web/browser.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 7876e178..fe463433 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -7078,7 +7078,8 @@ var treectl = (function () { treeh = winh - atop; tree.style.top = top + 'px'; - tree.style.height = treeh < 10 ? '' : Math.floor(treeh) + 'px'; + // setting the height causes scrollbars to appear often because it's not exact most of the time + tree.style.height = '';// = treeh < 10 ? '' : Math.floor(treeh) + 'px'; } } timer.add(onscroll2, true); From 06b2ff3e566315b150b7d9d7459e49adbb85b2dd Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 4 Apr 2026 13:03:58 +0200 Subject: [PATCH 07/16] fix jank implementation of space used progress bar --- copyparty/httpcli.py | 15 +++++++++------ copyparty/web/browser.html | 4 ++-- copyparty/web/browser.js | 4 ++-- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 6166fc89..0426ff58 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -6989,6 +6989,7 @@ class HttpCli(object): zi = vn.flags["du_iwho"] h1 = "" h2 = "" + space_used_percent = 0 if zi and ( zi == 9 or (zi == 7 and self.uname != "*") @@ -7016,6 +7017,8 @@ class HttpCli(object): h1 = humansize(free or 0) h2 = humansize(total) srv_info.append("{} free of {}".format(h1, h2)) + if(total > 0) + space_used_percent = (total - (free or 0)) / total * 100 elif zs: self.log("diskfree(%r): %s" % (abspath, zs), 3) @@ -7066,9 +7069,9 @@ class HttpCli(object): "files": [], "taglist": [], "srvinf": srv_infot, - "space_free": float(h1.split()[0]), - "space_total": float(h2.split()[0]), - "space_unit": h2.split()[1], + "space_used_percent": space_used_percent + "space_free": h1, + "space_total": h2, "acct": self.uname, "perms": perms, "cfg": vn.js_ls, @@ -7093,9 +7096,9 @@ class HttpCli(object): "title": html_escape("%s %s" % (self.args.bname, self.vpath), crlf=True), "srv_info": srv_infot, "srv_name": srv_name, - "space_free": float(h1.split()[0]), - "space_total": float(h2.split()[0]), - "space_unit": h2.split()[1], + "space_used_percent": space_used_percent + "space_free": h1, + "space_total": h2, "dtheme": self.args.theme, } diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index 2bfc4668..be08eb29 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -136,11 +136,11 @@ diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 715a8254..7befc3d1 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -1027,7 +1027,7 @@ ebi('tree').innerHTML = ( '
    \n' + '
     
    ' ); -ebi('thx_ff').before(ebi('acc_button')); +ebi('thx_ff').before(ebi('tree_footer')); clmod(ebi('tree'), 'sbar', 1); ebi('goh').textContent = L.goh; QS('#op_mkdir input[type="submit"]').value = L.ab_mkdir; @@ -7104,7 +7104,7 @@ var treectl = (function () { setcvar('--nav-sz', w); ebi('tree').style.width = w; - ebi('acc_button').style.width = (iw - 2) + 'em'; + ebi('tree_footer').style.width = (iw - 2) + 'em'; ebi('wrap').style.marginLeft = w2; ebi('widget').style.marginLeft = (iw /1.4) + 'em'; onscroll(); From 493ed5d3aaa3072f4b38d93e75394501084c01ce Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 4 Apr 2026 13:14:11 +0200 Subject: [PATCH 11/16] add rtt back --- copyparty/web/browser.html | 4 +++- copyparty/web/browser.js | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index edff8a73..3cbabb1e 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -136,7 +136,9 @@ From 6fd72e2ccf8c94e6d47ec8cc2e189fe593475bf1 Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Tue, 7 Apr 2026 20:51:00 +0200 Subject: [PATCH 16/16] settings modal --- copyparty/web/browser.css | 74 +++++++++++++++++++++- copyparty/web/browser.html | 13 ++++ copyparty/web/browser.js | 123 +++++++++++++++++++++++++++---------- 3 files changed, 173 insertions(+), 37 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 393cf01e..53a7a1e6 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -2444,6 +2444,73 @@ html.y #bbox-overlay figcaption a { + +/* settings css */ +#s_content{ + display: grid; + grid-template-rows: auto auto; + margin: 5%; + border-radius: .5em; + border: var(--a) solid 1px; + background: var(--bg-u1); + max-width: 60em; + position: relative; +} +#s_header{ + margin: .5em; +} +#s_hor{ + display: grid; + grid-template-columns: auto auto auto; + min-height: 0; +} +#s_nav, #s_list{ + display: flex; + flex-direction: column; + overflow-y: scroll; + padding: .5em; + padding-top: 0; +} +#s_divider{ + background: var(--a); + width: 1px; + margin: 1em .5em; +} +#s_nav .btn::after{ + position: absolute; + content: ">"; + right: .5em; +} +#s_nav .btn, +#s_list{ + padding-right: 2em; +} +.setting{ + padding: .5em; + border: var(--bg-u5) solid 1px; + border-top: 0; + margin: -1.5em 0 1.5em 0; +} +.setting:hover{ + background: var(--bg-u3); +} +.s_desc{ + margin: .5em 0 0 0; + font-size: medium; + color: var(--fg-weak); +} +#s_list h3{ + background-color: var(--bg-u5); + border-radius: .3em .3em 0 0; + padding: .5em; + margin: 0 0 1.3em 0; +} +#cs_btn{ + position: absolute; + right: 0; + margin: .5em; + color: var(--fg); +} @@ -2453,14 +2520,15 @@ html.y #bbox-overlay figcaption a { #op_up2k { padding: 0 1em 1em 1em; } -#drops { +.overlaybg { display: none; z-index: 3; background: rgba(48, 48, 48, 0.7); } -#drops.vis, +.overlaybg.vis, .dropzone { - display: block; + display: flex; + justify-content: center; position: fixed; top: 0; left: 0; diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index 22785028..4789283b 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -168,6 +168,19 @@
    + +
    +
    +

    ⚙️

    +
    +
    +
    +
    +
    + +
    +
    +