mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
persist dotfile preference as cookie for initial listing
This commit is contained in:
parent
50e01d6904
commit
c5a6ac8417
|
@ -881,7 +881,10 @@ class HttpCli(object):
|
||||||
return self.tx_404(True)
|
return self.tx_404(True)
|
||||||
else:
|
else:
|
||||||
if self.vpath:
|
if self.vpath:
|
||||||
self.log(t.format(self.uname, self.vpath))
|
ptn = self.args.nonsus_urls
|
||||||
|
if not ptn or not ptn.search(self.vpath):
|
||||||
|
self.log(t.format(self.uname, self.vpath))
|
||||||
|
|
||||||
return self.tx_404(True)
|
return self.tx_404(True)
|
||||||
|
|
||||||
self.uparam["h"] = ""
|
self.uparam["h"] = ""
|
||||||
|
@ -3822,7 +3825,9 @@ class HttpCli(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
# show dotfiles if permitted and requested
|
# show dotfiles if permitted and requested
|
||||||
if not self.args.ed or "dots" not in self.uparam:
|
if not self.args.ed or (
|
||||||
|
"dots" not in self.uparam and (is_ls or "dots" not in self.cookies)
|
||||||
|
):
|
||||||
ls_names = exclude_dotfiles(ls_names)
|
ls_names = exclude_dotfiles(ls_names)
|
||||||
|
|
||||||
add_fk = vn.flags.get("fk")
|
add_fk = vn.flags.get("fk")
|
||||||
|
|
|
@ -5273,6 +5273,9 @@ var treectl = (function () {
|
||||||
bcfg_bind(r, 'csel', 'csel', false);
|
bcfg_bind(r, 'csel', 'csel', false);
|
||||||
bcfg_bind(r, 'dots', 'dotfiles', false, function (v) {
|
bcfg_bind(r, 'dots', 'dotfiles', false, function (v) {
|
||||||
r.goto(get_evpath());
|
r.goto(get_evpath());
|
||||||
|
var xhr = new XHR();
|
||||||
|
xhr.open('GET', SR + '/?setck=dots=' + (v ? 'y' : ''), true);
|
||||||
|
xhr.send();
|
||||||
});
|
});
|
||||||
bcfg_bind(r, 'dir1st', 'dir1st', true, function (v) {
|
bcfg_bind(r, 'dir1st', 'dir1st', true, function (v) {
|
||||||
treectl.gentab(get_evpath(), treectl.lsc);
|
treectl.gentab(get_evpath(), treectl.lsc);
|
||||||
|
|
Loading…
Reference in a new issue