mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
v1.9.12
This commit is contained in:
parent
9ca8154651
commit
ac40dccc8f
|
@ -580,7 +580,8 @@ the up2k UI is the epitome of polished inutitive experiences:
|
|||
* "parallel uploads" specifies how many chunks to upload at the same time
|
||||
* `[🏃]` analysis of other files should continue while one is uploading
|
||||
* `[🥔]` shows a simpler UI for faster uploads from slow devices
|
||||
* `[💭]` ask for confirmation before files are added to the queue
|
||||
* `[🎲]` generate random filenames during upload
|
||||
* `[📅]` preserve last-modified timestamps; server times will match yours
|
||||
* `[🔎]` switch between upload and [file-search](#file-search) mode
|
||||
* ignore `[🔎]` if you add files by dragging them into the browser
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# coding: utf-8
|
||||
|
||||
VERSION = (1, 9, 11)
|
||||
VERSION = (1, 9, 12)
|
||||
CODENAME = "prometheable"
|
||||
BUILD_DT = (2023, 10, 9)
|
||||
BUILD_DT = (2023, 10, 15)
|
||||
|
||||
S_VERSION = ".".join(map(str, VERSION))
|
||||
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
|
||||
|
|
|
@ -86,6 +86,7 @@ flagcats = {
|
|||
"vmaxn=4k": "max 4096 files in volume (suffixes: b, k, m, g, t)",
|
||||
"rand": "force randomized filenames, 9 chars long by default",
|
||||
"nrand=N": "randomized filenames are N chars long",
|
||||
"u2ts=fc": "[f]orce [c]lient-last-modified or [u]pload-time",
|
||||
"sz=1k-3m": "allow filesizes between 1 KiB and 3MiB",
|
||||
"df=1g": "ensure 1 GiB free disk space",
|
||||
},
|
||||
|
|
|
@ -4,6 +4,7 @@ from __future__ import print_function, unicode_literals
|
|||
import argparse # typechk
|
||||
import colorsys
|
||||
import hashlib
|
||||
import re
|
||||
|
||||
from .__init__ import PY2
|
||||
from .th_srv import HAVE_PIL, HAVE_PILF
|
||||
|
@ -24,7 +25,7 @@ class Ico(object):
|
|||
zb = [ord(x) for x in zb]
|
||||
|
||||
c1 = colorsys.hsv_to_rgb(zb[0] / 256.0, 1, 0.3)
|
||||
c2 = colorsys.hsv_to_rgb(zb[0] / 256.0, 1, 1)
|
||||
c2 = colorsys.hsv_to_rgb(zb[0] / 256.0, 0.8 if HAVE_PILF else 1, 1)
|
||||
ci = [int(x * 255) for x in list(c1) + list(c2)]
|
||||
c = "".join(["{:02x}".format(x) for x in ci])
|
||||
|
||||
|
@ -38,16 +39,21 @@ class Ico(object):
|
|||
if chrome:
|
||||
# cannot handle more than ~2000 unique SVGs
|
||||
if HAVE_PILF:
|
||||
# pillow 10.1 made this the default font;
|
||||
# svg: 3.7s, this: 36s
|
||||
try:
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
h = int(96 * h / w)
|
||||
w = 96
|
||||
# [.lt] are hard to see lowercase / unspaced
|
||||
ext2 = re.sub("(.)", "\\1 ", ext).upper()
|
||||
|
||||
h = int(128 * h / w)
|
||||
w = 128
|
||||
img = Image.new("RGB", (w, h), "#" + c[:6])
|
||||
pb = ImageDraw.Draw(img)
|
||||
_, _, tw, th = pb.textbbox((0, 0), ext, font_size=16)
|
||||
_, _, tw, th = pb.textbbox((0, 0), ext2, font_size=16)
|
||||
xy = ((w - tw) // 2, (h - th) // 2)
|
||||
pb.text(xy, ext, fill="#" + c[6:], font_size=16)
|
||||
pb.text(xy, ext2, fill="#" + c[6:], font_size=16)
|
||||
|
||||
img = img.resize((w * 2, h * 2), Image.NEAREST)
|
||||
|
||||
|
|
|
@ -1050,7 +1050,7 @@ ebi('op_up2k').innerHTML = (
|
|||
' </td>\n' +
|
||||
' <td class="c" rowspan="2">\n' +
|
||||
' <input type="checkbox" id="u2ts" />\n' +
|
||||
' <label for="u2ts" tt="' + L.ut_u2ts + '">🕒</a>\n' +
|
||||
' <label for="u2ts" tt="' + L.ut_u2ts + '">📅</a>\n' +
|
||||
' </td>\n' +
|
||||
' <td class="c" data-perm="read" data-dep="idx" rowspan="2">\n' +
|
||||
' <input type="checkbox" id="fsearch" />\n' +
|
||||
|
@ -3147,7 +3147,7 @@ function eval_hash() {
|
|||
|
||||
function read_dsort(txt) {
|
||||
try {
|
||||
var zt = txt.trim().split(/,+/g);
|
||||
var zt = (('' + txt).trim() || 'href').split(/,+/g);
|
||||
dsort = [];
|
||||
for (var a = 0; a < zt.length; a++) {
|
||||
var z = zt[a].trim(), n = 1, t = "";
|
||||
|
@ -3163,6 +3163,7 @@ function read_dsort(txt) {
|
|||
}
|
||||
catch (ex) {
|
||||
toast.warn(10, 'failed to apply default sort order [' + txt + ']:\n' + ex);
|
||||
dsort = [['href', 1, '']];
|
||||
}
|
||||
}
|
||||
read_dsort(dsort);
|
||||
|
@ -6400,7 +6401,7 @@ var filecols = (function () {
|
|||
toh = ths[a].outerHTML, // !ff10
|
||||
ttv = L.cols[ths[a].textContent];
|
||||
|
||||
ttv = (ttv ? ttv + '$N' : '') + 'ID: <code>' + th.getAttribute('name') + '</code>';
|
||||
ttv = (ttv ? ttv + '; ' : '') + 'id=<code>' + th.getAttribute('name') + '</code>';
|
||||
if (!MOBILE && toh) {
|
||||
th.innerHTML = '<div class="cfg"><a href="#">-</a></div>' + toh;
|
||||
th.getElementsByTagName('a')[0].onclick = ev_row_tgl;
|
||||
|
|
Loading…
Reference in a new issue