mirror of
				https://github.com/9001/copyparty.git
				synced 2025-11-02 21:13:26 +00:00 
			
		
		
		
	ux fixes
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
 
 | 
			
		||||
@@ -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,
 | 
			
		||||
 
 | 
			
		||||
@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user