diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 66834bdc..e3ed8f89 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -133,6 +133,7 @@ ebi('op_cfg').innerHTML = ( '
\n' + ' ℹ️ tooltips\n' + ' ☀️ lightmode\n' + + ' dotfiles\n' + ' 田 the grid\n' + ' 🖼️ thumbs\n' + '
\n' + @@ -2415,6 +2416,7 @@ var treectl = (function () { prev_atop = null, prev_winh = null, dyn = bcfg_get('dyntree', true), + dots = bcfg_get('dotfiles', false), treesz = icfg_get('treesz', 16); treesz = Math.min(Math.max(treesz, 4), 50); @@ -2533,7 +2535,7 @@ var treectl = (function () { xhr.dst = dst; xhr.rst = rst; xhr.ts = Date.now(); - xhr.open('GET', dst + '?tree=' + top, true); + xhr.open('GET', dst + '?tree=' + top + (dots ? '&dots' : ''), true); xhr.onreadystatechange = recvtree; xhr.send(); enspin('#tree'); @@ -2637,7 +2639,7 @@ var treectl = (function () { xhr.top = url; xhr.hpush = hpush; xhr.ts = Date.now(); - xhr.open('GET', xhr.top + '?ls', true); + xhr.open('GET', xhr.top + '?ls' + (dots ? '&dots' : ''), true); xhr.onreadystatechange = recvls; xhr.send(); if (hpush) @@ -2774,6 +2776,13 @@ var treectl = (function () { return ret; } + function tdots(e) { + ev(e); + dots = !dots; + bcfg_set('dotfiles', dots); + treectl.goto(get_evpath()); + } + function dyntree(e) { ev(e); dyn = !dyn; @@ -2793,6 +2802,7 @@ var treectl = (function () { ebi('entree').onclick = treectl.entree; ebi('detree').onclick = treectl.detree; + ebi('dotfiles').onclick = tdots; ebi('dyntree').onclick = dyntree; ebi('twig').onclick = scaletree; ebi('twobytwo').onclick = scaletree;