mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 09:02:15 -06:00
hide fileman buttons when argv-disabled
This commit is contained in:
parent
d5a79455d1
commit
72574da834
|
@ -1699,6 +1699,8 @@ class HttpCli(object):
|
||||||
"tag_order": [],
|
"tag_order": [],
|
||||||
"have_up2k_idx": ("e2d" in vn.flags),
|
"have_up2k_idx": ("e2d" in vn.flags),
|
||||||
"have_tags_idx": ("e2t" in vn.flags),
|
"have_tags_idx": ("e2t" in vn.flags),
|
||||||
|
"have_mv": (not self.args.no_mv),
|
||||||
|
"have_del": (not self.args.no_del),
|
||||||
"have_zip": (not self.args.no_zip),
|
"have_zip": (not self.args.no_zip),
|
||||||
"have_b_u": (self.can_write and self.uparam.get("b") == "u"),
|
"have_b_u": (self.can_write and self.uparam.get("b") == "u"),
|
||||||
"url_suf": url_suf,
|
"url_suf": url_suf,
|
||||||
|
|
|
@ -126,6 +126,8 @@
|
||||||
tag_order_cfg = {{ tag_order }},
|
tag_order_cfg = {{ tag_order }},
|
||||||
have_up2k_idx = {{ have_up2k_idx|tojson }},
|
have_up2k_idx = {{ have_up2k_idx|tojson }},
|
||||||
have_tags_idx = {{ have_tags_idx|tojson }},
|
have_tags_idx = {{ have_tags_idx|tojson }},
|
||||||
|
have_mv = {{ have_mv|tojson }},
|
||||||
|
have_del = {{ have_del|tojson }},
|
||||||
have_zip = {{ have_zip|tojson }};
|
have_zip = {{ have_zip|tojson }};
|
||||||
</script>
|
</script>
|
||||||
<script src="/.cpr/util.js?_={{ ts }}"></script>
|
<script src="/.cpr/util.js?_={{ ts }}"></script>
|
||||||
|
|
|
@ -1483,10 +1483,10 @@ var fileman = (function () {
|
||||||
clmod(bdel, 'en', sel.length);
|
clmod(bdel, 'en', sel.length);
|
||||||
clmod(bcut, 'en', sel.length);
|
clmod(bcut, 'en', sel.length);
|
||||||
clmod(bpst, 'en', r.clip && r.clip.length);
|
clmod(bpst, 'en', r.clip && r.clip.length);
|
||||||
bren.style.display = has(perms, 'write') && has(perms, 'move') ? '' : 'none';
|
bren.style.display = have_mv && has(perms, 'write') && has(perms, 'move') ? '' : 'none';
|
||||||
bdel.style.display = has(perms, 'delete') ? '' : 'none';
|
bdel.style.display = have_del && has(perms, 'delete') ? '' : 'none';
|
||||||
bcut.style.display = has(perms, 'move') ? '' : 'none';
|
bcut.style.display = have_mv && has(perms, 'move') ? '' : 'none';
|
||||||
bpst.style.display = has(perms, 'write') ? '' : 'none';
|
bpst.style.display = have_mv && has(perms, 'write') ? '' : 'none';
|
||||||
bpst.setAttribute('tt', 'paste ' + r.clip.length + ' items$NHotkey: ctrl-V');
|
bpst.setAttribute('tt', 'paste ' + r.clip.length + ' items$NHotkey: ctrl-V');
|
||||||
ebi('wfm').style.display = QS('#wfm a.en:not([display])') ? '' : 'none';
|
ebi('wfm').style.display = QS('#wfm a.en:not([display])') ? '' : 'none';
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,6 +31,8 @@ class Cfg(Namespace):
|
||||||
rproxy=0,
|
rproxy=0,
|
||||||
ed=False,
|
ed=False,
|
||||||
nw=False,
|
nw=False,
|
||||||
|
no_mv=False,
|
||||||
|
no_del=False,
|
||||||
no_zip=False,
|
no_zip=False,
|
||||||
no_voldump=True,
|
no_voldump=True,
|
||||||
no_scandir=False,
|
no_scandir=False,
|
||||||
|
|
Loading…
Reference in a new issue