This commit is contained in:
ed 2022-08-10 23:35:21 +02:00
parent 92ed4ba3f8
commit c00b80ca29
8 changed files with 23 additions and 15 deletions

View file

@ -1,8 +1,8 @@
# coding: utf-8 # coding: utf-8
VERSION = (1, 3, 10) VERSION = (1, 3, 11)
CODENAME = "god dag" CODENAME = "god dag"
BUILD_DT = (2022, 8, 4) BUILD_DT = (2022, 8, 10)
S_VERSION = ".".join(map(str, VERSION)) S_VERSION = ".".join(map(str, VERSION))
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT) S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)

View file

@ -391,7 +391,7 @@ class Ftpd(object):
for h, lp in hs: for h, lp in hs:
FTPServer((ip, int(lp)), h, ioloop) FTPServer((ip, int(lp)), h, ioloop)
thr = threading.Thread(target=ioloop.loop) thr = threading.Thread(target=ioloop.loop, name="ftp")
thr.daemon = True thr.daemon = True
thr.start() thr.start()

View file

@ -102,7 +102,7 @@ class HttpSrv(object):
start_log_thrs(self.log, self.args.log_thrs, nid) start_log_thrs(self.log, self.args.log_thrs, nid)
self.th_cfg: dict[str, Any] = {} self.th_cfg: dict[str, Any] = {}
t = threading.Thread(target=self.post_init) t = threading.Thread(target=self.post_init, name="hsrv-init2")
t.daemon = True t.daemon = True
t.start() t.start()
@ -171,7 +171,7 @@ class HttpSrv(object):
def fun() -> None: def fun() -> None:
self.broker.say("cb_httpsrv_up") self.broker.say("cb_httpsrv_up")
threading.Thread(target=fun).start() threading.Thread(target=fun, name="sig-hsrv-up1").start()
while not self.stopping: while not self.stopping:
if self.args.log_conn: if self.args.log_conn:

View file

@ -269,7 +269,7 @@ class SvcHub(object):
def run(self) -> None: def run(self) -> None:
self.tcpsrv.run() self.tcpsrv.run()
thr = threading.Thread(target=self.thr_httpsrv_up) thr = threading.Thread(target=self.thr_httpsrv_up, name="sig-hsrv-up2")
thr.daemon = True thr.daemon = True
thr.start() thr.start()
@ -308,7 +308,7 @@ class SvcHub(object):
return "cannot reload; already in progress" return "cannot reload; already in progress"
self.reloading = True self.reloading = True
t = threading.Thread(target=self._reload) t = threading.Thread(target=self._reload, name="reloading")
t.daemon = True t.daemon = True
t.start() t.start()
return "reload initiated" return "reload initiated"

View file

@ -509,8 +509,8 @@ class MTHash(object):
self.work_q: Queue[int] = Queue() self.work_q: Queue[int] = Queue()
self.done_q: Queue[tuple[int, str, int, int]] = Queue() self.done_q: Queue[tuple[int, str, int, int]] = Queue()
self.thrs = [] self.thrs = []
for _ in range(cores): for n in range(cores):
t = threading.Thread(target=self.worker) t = threading.Thread(target=self.worker, name="mth-" + str(n))
t.daemon = True t.daemon = True
t.start() t.start()
self.thrs.append(t) self.thrs.append(t)
@ -1390,7 +1390,7 @@ def db_ex_chk(log: "NamedLogger", ex: Exception, db_path: str) -> bool:
if str(ex) != "database is locked": if str(ex) != "database is locked":
return False return False
thr = threading.Thread(target=lsof, args=(log, db_path)) thr = threading.Thread(target=lsof, args=(log, db_path), name="dbex")
thr.daemon = True thr.daemon = True
thr.start() thr.start()

View file

@ -504,7 +504,7 @@ html.dy {
--a: #000; --a: #000;
--a-b: #000; --a-b: #000;
--a-hil: #000; --a-hil: #000;
--a-gray: #000; --a-gray: #bbb;
--a-dark: #000; --a-dark: #000;
--btn-fg: #000; --btn-fg: #000;

View file

@ -4652,9 +4652,9 @@ var treectl = (function () {
return ta[a]; return ta[a];
}; };
r.goto = function (url, push) { r.goto = function (url, push, back) {
get_tree("", url, true); get_tree("", url, true);
r.reqls(url, push, true); r.reqls(url, push, true, back);
}; };
function get_tree(top, dst, rst) { function get_tree(top, dst, rst) {
@ -4823,9 +4823,10 @@ var treectl = (function () {
thegrid.setvis(true); thegrid.setvis(true);
} }
r.reqls = function (url, hpush, no_tree) { r.reqls = function (url, hpush, no_tree, back) {
var xhr = new XHR(); var xhr = new XHR();
xhr.top = url; xhr.top = url;
xhr.back = back
xhr.hpush = hpush; xhr.hpush = hpush;
xhr.ts = Date.now(); xhr.ts = Date.now();
xhr.open('GET', xhr.top + '?ls' + (r.dots ? '&dots' : ''), true); xhr.open('GET', xhr.top + '?ls' + (r.dots ? '&dots' : ''), true);
@ -4893,6 +4894,12 @@ var treectl = (function () {
if (res.readme) if (res.readme)
show_readme(res.readme); show_readme(res.readme);
if (this.hpush && !this.back) {
var ofs = ebi('wrap').offsetTop;
if (document.documentElement.scrollTop > ofs)
document.documentElement.scrollTop = ofs;
}
wintitle(); wintitle();
var fun = r.ls_cb; var fun = r.ls_cb;
if (fun) { if (fun) {
@ -5068,7 +5075,7 @@ var treectl = (function () {
if (url.search.indexOf('doc=') + 1 && hbase == cbase) if (url.search.indexOf('doc=') + 1 && hbase == cbase)
return showfile.show(hbase + showfile.sname(url.search), true); return showfile.show(hbase + showfile.sname(url.search), true);
r.goto(url.pathname); r.goto(url.pathname, false, true);
}; };
hist_replace(get_evpath() + window.location.hash); hist_replace(get_evpath() + window.location.hash);

View file

@ -77,3 +77,4 @@ copyparty/web/splash.js,
copyparty/web/ui.css, copyparty/web/ui.css,
copyparty/web/up2k.js, copyparty/web/up2k.js,
copyparty/web/util.js, copyparty/web/util.js,
copyparty/web/w.hash.js,