This commit is contained in:
ed 2021-05-27 01:41:50 +02:00
parent 69dc433e1c
commit f7ee02ec35
4 changed files with 13 additions and 2 deletions

View file

@ -1216,12 +1216,15 @@ class HttpCli(object):
n = ext.split(".")[1:][::-1] n = ext.split(".")[1:][::-1]
ext = "" ext = ""
for v in n: for v in n:
if len(v) > 7 or bad.match(v): if len(v) > 7 or bad.search(v):
break break
ext = "{}.{}".format(v, ext) ext = "{}.{}".format(v, ext)
ext = ext.rstrip(".") or "unk" ext = ext.rstrip(".") or "unk"
if len(ext) > 11:
ext = "" + ext[-9:]
mime, ico = self.ico.get(ext) mime, ico = self.ico.get(ext)
dt = datetime.utcfromtimestamp(E.t0) dt = datetime.utcfromtimestamp(E.t0)

View file

@ -205,6 +205,7 @@ html.light #ggrid a.sel:hover {
} }
#ggrid a.sel { #ggrid a.sel {
box-shadow: 0 .1em .7em #b36; 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 { #files tr.sel a {
color: #fff; color: #fff;
@ -764,7 +765,6 @@ html.light #ghead {
border-radius: .3em; border-radius: .3em;
padding: .3em; padding: .3em;
margin: .5em; margin: .5em;
transition: all 0.2s cubic-bezier(.4, 2, .7, 1); /* https://cubic-bezier.com/#.4,2,.7,1 */
} }
#ggrid a img { #ggrid a img {
border-radius: .2em; border-radius: .2em;

View file

@ -795,6 +795,9 @@ var thegrid = (function () {
setsz(); setsz();
function seltgl(e) { function seltgl(e) {
if (e && e.ctrlKey)
return true;
ev(e); ev(e);
var oth = ebi(this.getAttribute('ref')), var oth = ebi(this.getAttribute('ref')),
td = oth.parentNode.nextSibling, td = oth.parentNode.nextSibling,

View file

@ -152,6 +152,9 @@ function sortfiles(nodes) {
if (!name) if (!name)
continue; continue;
if (name == 'ts')
typ = 'int';
if (name.indexOf('tags/') === 0) { if (name.indexOf('tags/') === 0) {
name = name.slice(5); name = name.slice(5);
for (var b = 0, bb = nodes.length; b < bb; b++) for (var b = 0, bb = nodes.length; b < bb; b++)
@ -202,6 +205,8 @@ function sortfiles(nodes) {
} }
catch (ex) { catch (ex) {
console.log("failed to apply sort config: " + ex); console.log("failed to apply sort config: " + ex);
console.log("resetting fsort " + sread('fsort'))
localStorage.removeItem('fsort');
} }
return nodes; return nodes;
} }