fix hiding ui elements via volflags

This commit is contained in:
Til Schmitter 2026-06-20 18:34:51 +02:00
parent c2bd3b9754
commit cf650af42e
3 changed files with 27 additions and 18 deletions

View file

@ -624,8 +624,8 @@ html .ayjump:focus-visible {
top: 0; top: 0;
margin: 0 -.6em; margin: 0 -.6em;
} }
#wfp.shifted { #pathBar.shifted {
margin-left: 2em; padding-left: 3.7em;
} }
#path { #path {
position: relative; position: relative;
@ -4204,8 +4204,8 @@ html.d #treepar {
#pathBar.thin #path a { #pathBar.thin #path a {
padding-top: .45em; padding-top: .45em;
} }
#pathBar.thin #wfp.shifted { #pathBar.thin.shifted {
margin-left: 2.5em; padding-left: 3.5em;
} }
#pathBar.thin #actionsArea { #pathBar.thin #actionsArea {
position: fixed; position: fixed;
@ -4413,11 +4413,11 @@ html.e #wrap.thin .ghead {
padding: .5em; padding: .5em;
padding-right: 2em; padding-right: 2em;
} }
#wfp, #pathBar,
#wfp.shifted, #pathBar.shifted,
#pathBar.thin #wfp, #pathBar.thin,
#pathBar.thin #wfp.shifted { #pathBar.thin.shifted {
margin-left: 2em; padding-left: 3em;
} }
#wrap.thin .ghead { #wrap.thin .ghead {
top: 7em; top: 7em;
@ -5316,6 +5316,9 @@ html.e #pathBar {
top: 0; top: 0;
background: var(--ttlbar); background: var(--ttlbar);
} }
html.e #pathBar.shifted {
padding-left: 2.5em;
}
html.e #pathBar.thin #actionsArea { html.e #pathBar.thin #actionsArea {
top: 0 !important; top: 0 !important;
} }
@ -5950,8 +5953,11 @@ html.fy #wfp .btn {
margin: 0; margin: 0;
border: none; border: none;
} }
html.fy #wfp.shifted { html.fy #actionsArea {
margin-left: 2.5em; margin-left: auto;
}
html.fy #pathBar.shifted {
padding-left: 3.5em;
} }
html.fy #wfp .btn { html.fy #wfp .btn {
padding: .3em; padding: .3em;

View file

@ -45,8 +45,8 @@
<div id="wrap"> <div id="wrap">
<div id="pathBar" class="normalrcm"> <div id="pathBar" class="normalrcm shifted">
<h2 id="wfp" class="shifted"> <h2 id="wfp">
<a href="#" id="gop" class="btn"></a> <a href="#" id="gop" class="btn"></a>
<a href="#" id="gon" class="btn"></a> <a href="#" id="gon" class="btn"></a>
<a href="#" id="gou" class="btn"></a> <a href="#" id="gou" class="btn"></a>

View file

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