diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 32282746..d8647124 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -1216,12 +1216,15 @@ class HttpCli(object): n = ext.split(".")[1:][::-1] ext = "" for v in n: - if len(v) > 7 or bad.match(v): + if len(v) > 7 or bad.search(v): break ext = "{}.{}".format(v, ext) ext = ext.rstrip(".") or "unk" + if len(ext) > 11: + ext = "⋯" + ext[-9:] + mime, ico = self.ico.get(ext) dt = datetime.utcfromtimestamp(E.t0) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 6680f49c..e73ee12a 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -205,6 +205,7 @@ html.light #ggrid a.sel:hover { } #ggrid a.sel { box-shadow: 0 .1em .7em #b36; + transition: all 0.2s cubic-bezier(.2, 2.2, .5, 1); /* https://cubic-bezier.com/#.4,2,.7,1 */ } #files tr.sel a { color: #fff; @@ -764,7 +765,6 @@ html.light #ghead { border-radius: .3em; padding: .3em; margin: .5em; - transition: all 0.2s cubic-bezier(.4, 2, .7, 1); /* https://cubic-bezier.com/#.4,2,.7,1 */ } #ggrid a img { border-radius: .2em; diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index bc4d6959..bc60afa5 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -795,6 +795,9 @@ var thegrid = (function () { setsz(); function seltgl(e) { + if (e && e.ctrlKey) + return true; + ev(e); var oth = ebi(this.getAttribute('ref')), td = oth.parentNode.nextSibling, diff --git a/copyparty/web/util.js b/copyparty/web/util.js index da2bf863..d09f05da 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -152,6 +152,9 @@ function sortfiles(nodes) { if (!name) continue; + if (name == 'ts') + typ = 'int'; + if (name.indexOf('tags/') === 0) { name = name.slice(5); for (var b = 0, bb = nodes.length; b < bb; b++) @@ -202,6 +205,8 @@ function sortfiles(nodes) { } catch (ex) { console.log("failed to apply sort config: " + ex); + console.log("resetting fsort " + sread('fsort')) + localStorage.removeItem('fsort'); } return nodes; }