diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 1563316e..99ea09e1 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -1643,6 +1643,9 @@ html:not(.e):not(.d) #up_quick .btn.on { padding: 0 .4em; margin: 0; } +.unfun #ops a { + font-size: 1.2em; +} #ops a.act { color: #fff; color: var(--op-aa-fg); @@ -1670,6 +1673,7 @@ html.y #ops svg circle { font-size: x-large; text-wrap-mode: nowrap; display: block; + line-height: 1.5em; } #treeToggleBtn{ z-index: 6; @@ -1695,9 +1699,9 @@ html.y #ops svg circle { color: #b60; margin: 0 0 0 .5em; } -#acc_pfp { - aspect-ratio: 1 / 1; - width: 1.25em; +.pfp { + /* aspect-ratio: 1 / 1; */ + min-width: 1.25em; background: #ccc; color: #000; @@ -1712,7 +1716,7 @@ html.y #ops svg circle { display: flex; text-shadow: none; } -#acc_pfp.placeholder { +.pfp.placeholder { text-shadow: 1px 1px 0 var(--bg-half), 1px -1px 0 var(--bg-half), -1px -1px 0 var(--bg-half), -1px 1px 0 var(--bg-half); } .opbox { @@ -4190,7 +4194,7 @@ html.e { html.e * { border-radius: 0 !important; } -html.e #acc_pfp { +html.e .pfp { background: transparent; color: var(--fg); } diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 7f9ac2fa..5eca0f8e 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -2,6 +2,15 @@ var J_BRW = 1; +var fun_tgl = sread('fun_tgl'); +if( fun_tgl == null) + swrite('fun_tgl', 1); +fun_tgl = fun_tgl != 0; +console.log('fun_tgl: ' + fun_tgl); +if(!fun_tgl){ + clmod(document.documentElement, 'unfun', true); +} + if (window.dgauto === undefined) alert('FATAL ERROR: receiving stale data from the server; this may be due to a broken reverse-proxy (stuck cache). Try restarting copyparty and press CTRL-SHIFT-R in the browser'); @@ -219,6 +228,7 @@ if (1) "cl_hfsz": "filesize", "cl_themes": "theme", "cl_accent": "accent color (keep empty for default)$Nsupports any css color, like rgba(255, 210, 0, 1)", + "cl_fun": "enables or disables the FUN 🎉🚀👽🐹🥳❗ (reload the page after changing this setting)", "cl_langs": "language", "cl_ziptype": "folder download", "cl_uopts": "upload", @@ -808,13 +818,13 @@ modal.load(); // toolbar ebi('ops').innerHTML = ( //(IE ? '' + L.ot_noie + '' : '') + - '🔎' + - (have_del ? '🧯' : '') + - '🚀' + - '🎈' + - '📟' + - '⚙️' + - '👤' + + '' + (fun_tgl ? '🔎' : 'srch') + '' + + (have_del ? '' + (fun_tgl ? '🧯' : 'undo') + '' : '') + + '' + (fun_tgl ? '🚀' : 'upload') + '' + + '' + (fun_tgl ? '🎈' : 'bup') + '' + + '' + (fun_tgl ? '📟' : 'msg') + '' + + '' + (fun_tgl ? '⚙️' : 'conf') + '' + + '' + (fun_tgl ? '👤' : 'acc') + '' + '
' ); @@ -971,7 +981,7 @@ ebi('uq_nf').onclick = function(){ // up2k ui -ebi('up_header').innerHTML = '🚀 ' + L.cl_uopts; +ebi('up_header').innerHTML = (fun_tgl ? '🚀 ' : '') + L.cl_uopts; ebi('op_up2k').innerHTML = ( '
\n' + @@ -1255,6 +1265,7 @@ ebi('op_cfg').innerHTML = ( ' ' + ' ' + ' ' + + ' 🥳\n' + ' \n' + '\n' + '
\n' + @@ -1314,11 +1325,15 @@ ebi('op_cfg').innerHTML = ( // modalize settings (function () { - ebi('s_header').innerHTML = '⚙️ ' + L.ot_cfg; + ebi('s_header').innerHTML = (fun_tgl ? '⚙️ ' : '') + L.ot_cfg; var sections = ebi('op_cfg').children; for (var i = 0; i < sections.length; i++){ var h = sections[i].children[0]; var sName = h.innerHTML; + if(!fun_tgl){ + if(sName && sName.match(' ') && sName[0] != '<') + sName = sName.split(' ').slice(1).join(' '); + } var sId = h.id; h.id = '' var subSettings = sections[i].children[1]; @@ -1390,6 +1405,9 @@ if(accent && accent.length > 3){ ebi('accent').value = ebi('accent_picker').value = accent; } +// no fun allowed +bcfg_bind(this, 'fun_tgl', 'fun_tgl'); + // navpane ebi('treeh').innerHTML += ( '\n' + @@ -8637,7 +8655,7 @@ function apply_perms(res) { else{ ebi('blogout').style.display = 'none'; ebi('acc_name').innerHTML = L.login; - ebi('acc_pfp').innerHTML = '👤'; + ebi('acc_pfp').innerHTML = fun_tgl ? '👤' : 'acc'; ebi('acc_button').onclick = goHome; } clmod(ebi('acc_pfp'), 'placeholder', acct == '*'); @@ -10618,7 +10636,7 @@ function reload_browser() { o = mknod('a'); o.setAttribute('href', link2); - o.textContent = uricom_dec(parts[a]) || '🏠'; + o.textContent = uricom_dec(parts[a]) || (fun_tgl ? '🏠' : 'home'); ebi('path').appendChild(o); ebi('path').appendChild(mknod('i')); drag.mktarget(o);