From cf650af42e0b8f4cb7f73b1af28b173978b5d2aa Mon Sep 17 00:00:00 2001 From: Til Schmitter Date: Sat, 20 Jun 2026 18:34:51 +0200 Subject: [PATCH] fix hiding ui elements via volflags --- copyparty/web/browser.css | 28 +++++++++++++++++----------- copyparty/web/browser.html | 4 ++-- copyparty/web/browser.js | 13 ++++++++----- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 044a098c..edfe322f 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -624,8 +624,8 @@ html .ayjump:focus-visible { top: 0; margin: 0 -.6em; } -#wfp.shifted { - margin-left: 2em; +#pathBar.shifted { + padding-left: 3.7em; } #path { position: relative; @@ -4204,8 +4204,8 @@ html.d #treepar { #pathBar.thin #path a { padding-top: .45em; } -#pathBar.thin #wfp.shifted { - margin-left: 2.5em; +#pathBar.thin.shifted { + padding-left: 3.5em; } #pathBar.thin #actionsArea { position: fixed; @@ -4413,11 +4413,11 @@ html.e #wrap.thin .ghead { padding: .5em; padding-right: 2em; } - #wfp, - #wfp.shifted, - #pathBar.thin #wfp, - #pathBar.thin #wfp.shifted { - margin-left: 2em; + #pathBar, + #pathBar.shifted, + #pathBar.thin, + #pathBar.thin.shifted { + padding-left: 3em; } #wrap.thin .ghead { top: 7em; @@ -5316,6 +5316,9 @@ html.e #pathBar { top: 0; background: var(--ttlbar); } +html.e #pathBar.shifted { + padding-left: 2.5em; +} html.e #pathBar.thin #actionsArea { top: 0 !important; } @@ -5950,8 +5953,11 @@ html.fy #wfp .btn { margin: 0; border: none; } -html.fy #wfp.shifted { - margin-left: 2.5em; +html.fy #actionsArea { + margin-left: auto; +} +html.fy #pathBar.shifted { + padding-left: 3.5em; } html.fy #wfp .btn { padding: .3em; diff --git a/copyparty/web/browser.html b/copyparty/web/browser.html index 61d352c1..9ce3aaeb 100644 --- a/copyparty/web/browser.html +++ b/copyparty/web/browser.html @@ -45,8 +45,8 @@
-
-

+
+

diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index a3a018e3..457f2b85 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -1852,16 +1852,18 @@ var ACtx = !IPHONE && (window.AudioContext || window.webkitAudioContext), var x = ''; if (!fullui) { if (window.ui_nombar || /[?&]nombar\b/.exec(sloc0)) x += '#ops,'; - if (window.ui_noacci || /[?&]noacci\b/.exec(sloc0)) x += '#acc_info,'; - if (window.ui_nosrvi || /[?&]nosrvi\b/.exec(sloc0)) x += '#srv_info,#srv_info2,'; + if (window.ui_noacci || /[?&]noacci\b/.exec(sloc0)) x += '#acc_info,#opa_acc,'; + if (window.ui_nosrvi || /[?&]nosrvi\b/.exec(sloc0)) x += '#srv_info,#srv_info2,#tree_footer'; if (window.ui_nocpla || /[?&]nocpla\b/.exec(sloc0)) x += '#goh,'; if (window.ui_nolbar || /[?&]nolbar\b/.exec(sloc0)) x += '#wfp,'; + if (nonav) x += '#path,'; if (window.ui_noctxb || /[?&]noctxb\b/.exec(sloc0)) x += '#wtoggle,'; if (window.ui_norepl || /[?&]norepl\b/.exec(sloc0)) x += '#repl,'; } if (x) document.head.appendChild(mknod('style', '', x.slice(0, -1) + '{display:none!important}')); +if(nonav) if (location.pathname.indexOf('//') === 0) hist_replace(location.pathname.replace(/^\/+/, '/')); @@ -7978,14 +7980,13 @@ var treectl = (function () { r.show = function (instant) { r.hidden = false; if (!entreed) { - ebi('path').style.display = nonav ? 'none' : 'inline-block'; return; } var tree = ebi('tree') tree.style.display = 'block'; tree.style.width = 0; - clmod(ebi('wfp'), 'shifted', false); + clmod(ebi('pathBar'), 'shifted', false); window.addEventListener('scroll', onscroll); window.addEventListener('resize', onresize); @@ -8034,7 +8035,7 @@ var treectl = (function () { ebi('tree_footer').style.display = 'none'; ebi('widget').style.marginLeft = '0'; ebi('wrap').style.marginLeft = ''; - clmod(ebi('wfp'), 'shifted', true); + clmod(ebi('pathBar'), 'shifted', true); window.removeEventListener('resize', onresize); window.removeEventListener('scroll', onscroll); aligngriditems(); @@ -8949,6 +8950,8 @@ var treectl = (function () { if (notree) { cs = 'na'; r.detree(null, 1); + ebi('treeToggleBtn').style.display = 'none'; + clmod(ebi('pathBar'), 'shifted', false); } if (cs == 'tree' || (cs != 'na' && vw >= 60))