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]
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)

View file

@ -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;

View file

@ -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,

View file

@ -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;
}