diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index ad87141e..49579358 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -731,14 +731,13 @@ html.y #files thead th { margin: 0; padding: .3em .5em; background: var(--bg); + max-width: var(--file-td-w); + word-wrap: break-word; + overflow: hidden; } #files tr:nth-child(2n) td { background: var(--row-alt); } -#files td+td+td { - max-width: 30em; - overflow: hidden; -} #files td+td { box-shadow: 1px 0 0 0 rgba(128,128,128,var(--f-sh1)) inset, 0 1px 0 rgba(255,255,255,var(--f-sh2)) inset, 0 -1px 0 rgba(255,255,255,var(--f-sh2)) inset; } diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index f9cf3933..73c65d1b 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -5207,6 +5207,23 @@ function aligngriditems() { onresize100.add(aligngriditems); +var filecolwidth = (function () { + var lastwidth = -1; + + return function () { + var vw = window.innerWidth / parseFloat(getComputedStyle(document.body)['font-size']), + w = Math.floor(vw - 2); + + if (w == lastwidth) + return; + + lastwidth = w; + document.documentElement.style.setProperty('--file-td-w', w + 'em'); + } +})(); +onresize100.add(filecolwidth, true); + + var treectl = (function () { var r = { "hidden": true, diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 97122931..46642ebf 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -1103,7 +1103,7 @@ function Debounce(delay) { return; clearTimeout(r.timer); - r.timer = setTimeout(r.doit, r.delay); + r.timer = setTimeout(r.run, r.delay); r.t_hit = now; }; };