mirror of
https://github.com/9001/copyparty.git
synced 2026-04-12 15:22:32 -06:00
autogrid global-option
This commit is contained in:
parent
55d37364a6
commit
961a273764
|
|
@ -1868,6 +1868,7 @@ def add_ui(ap, retry: int):
|
||||||
ap2.add_argument("--gsel", action="store_true", help="select files in grid by ctrl-click (volflag=gsel)")
|
ap2.add_argument("--gsel", action="store_true", help="select files in grid by ctrl-click (volflag=gsel)")
|
||||||
ap2.add_argument("--localtime", action="store_true", help="default to local timezone instead of UTC")
|
ap2.add_argument("--localtime", action="store_true", help="default to local timezone instead of UTC")
|
||||||
ap2.add_argument("--ui-filesz", metavar="FMT", type=u, default="1", help="default filesize format; one of these: 0, 1, 2, 2c, 3, 3c, 4, 4c, 5, 5c, fuzzy (see UI)")
|
ap2.add_argument("--ui-filesz", metavar="FMT", type=u, default="1", help="default filesize format; one of these: 0, 1, 2, 2c, 3, 3c, 4, 4c, 5, 5c, fuzzy (see UI)")
|
||||||
|
ap2.add_argument("--gauto", metavar="PERCENT", type=int, default=0, help="switch to gridview if more than \033[33mPERCENT\033[0m of files are pics/vids; 0=disabled")
|
||||||
ap2.add_argument("--rcm", metavar="TXT", default="yy", help="rightclick-menu; two yes/no options: 1st y/n is enable-custom-menu, 2nd y/n is enable-double")
|
ap2.add_argument("--rcm", metavar="TXT", default="yy", help="rightclick-menu; two yes/no options: 1st y/n is enable-custom-menu, 2nd y/n is enable-double")
|
||||||
ap2.add_argument("--lang", metavar="LANG", type=u, default="eng", help="language, for example \033[32meng\033[0m / \033[32mnor\033[0m / ...")
|
ap2.add_argument("--lang", metavar="LANG", type=u, default="eng", help="language, for example \033[32meng\033[0m / \033[32mnor\033[0m / ...")
|
||||||
ap2.add_argument("--glang", action="store_true", help="guess the browser's default language, otherwise fall back to \033[33m--lang\033[0m")
|
ap2.add_argument("--glang", action="store_true", help="guess the browser's default language, otherwise fall back to \033[33m--lang\033[0m")
|
||||||
|
|
|
||||||
|
|
@ -3258,6 +3258,7 @@ class AuthSrv(object):
|
||||||
"idxh": int(self.args.ih),
|
"idxh": int(self.args.ih),
|
||||||
"dutc": not self.args.localtime,
|
"dutc": not self.args.localtime,
|
||||||
"dfszf": self.args.ui_filesz.strip("-"),
|
"dfszf": self.args.ui_filesz.strip("-"),
|
||||||
|
"dgauto": self.args.gauto,
|
||||||
"themes": self.args.themes,
|
"themes": self.args.themes,
|
||||||
"turbolvl": self.args.turbo,
|
"turbolvl": self.args.turbo,
|
||||||
"nosubtle": self.args.nosubtle,
|
"nosubtle": self.args.nosubtle,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
var J_BRW = 1;
|
var J_BRW = 1;
|
||||||
|
|
||||||
if (window.rw_edit === undefined)
|
if (window.dgauto === undefined)
|
||||||
alert('FATAL ERROR: receiving stale data from the server; this may be due to a broken reverse-proxy (stuck cache). Try restarting copyparty and press CTRL-SHIFT-R in the browser');
|
alert('FATAL ERROR: receiving stale data from the server; this may be due to a broken reverse-proxy (stuck cache). Try restarting copyparty and press CTRL-SHIFT-R in the browser');
|
||||||
|
|
||||||
var XHR = XMLHttpRequest;
|
var XHR = XMLHttpRequest;
|
||||||
|
|
@ -6015,13 +6015,13 @@ var thegrid = (function () {
|
||||||
pbar.onresize();
|
pbar.onresize();
|
||||||
vbar.onresize();
|
vbar.onresize();
|
||||||
});
|
});
|
||||||
bcfg_bind(r, 'gaen', 'gauto', false, function(v) {
|
bcfg_bind(r, 'gaen', 'gauto', !!dgauto, function(v) {
|
||||||
if (r.en && sread("griden") != 1) {
|
if (r.en && sread("griden") != 1) {
|
||||||
r.en = false;
|
r.en = false;
|
||||||
r.setvis(true);
|
r.setvis(true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ebi('ga_thresh').value = r.gathr = icfg_get('ga_thresh', 70);
|
ebi('ga_thresh').value = r.gathr = icfg_get('ga_thresh', dgauto || 70);
|
||||||
ebi('ga_thresh').oninput = function (e) {
|
ebi('ga_thresh').oninput = function (e) {
|
||||||
var n = parseInt(this.value);
|
var n = parseInt(this.value);
|
||||||
swrite('ga_thresh', r.gathr = (isNum(n) ? n : 0) || 70);
|
swrite('ga_thresh', r.gathr = (isNum(n) ? n : 0) || 70);
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,7 @@ class Cfg(Namespace):
|
||||||
ex = "ac_convt au_vol dl_list du_iwho mtab_age reg_cap s_thead s_tbody tail_tmax tail_who th_convt th_qv th_qvx ups_who ver_iwho zip_who"
|
ex = "ac_convt au_vol dl_list du_iwho mtab_age reg_cap s_thead s_tbody tail_tmax tail_who th_convt th_qv th_qvx ups_who ver_iwho zip_who"
|
||||||
ka.update(**{k: 9 for k in ex.split()})
|
ka.update(**{k: 9 for k in ex.split()})
|
||||||
|
|
||||||
ex = "ctl_re db_act forget_ip idp_cookie idp_store k304 loris no304 nosubtle qr_pin qr_wait re_maxage rproxy rsp_jtr rsp_slp s_wr_slp snap_wri theme themes turbo u2ow zipmaxn zipmaxs"
|
ex = "ctl_re db_act forget_ip gauto idp_cookie idp_store k304 loris no304 nosubtle qr_pin qr_wait re_maxage rproxy rsp_jtr rsp_slp s_wr_slp snap_wri theme themes turbo u2ow zipmaxn zipmaxs"
|
||||||
ka.update(**{k: 0 for k in ex.split()})
|
ka.update(**{k: 0 for k in ex.split()})
|
||||||
|
|
||||||
ex = "ah_alg bname chdir chmod_f chpw_db db_xattr doctitle df epilogues exit favico fika ipa ipar html_head html_head_d html_head_s idp_login idp_logout lg_sba lg_sbf log_date log_fk md_sba md_sbf name og_desc og_site og_th og_title og_title_a og_title_v og_title_i opds_exts preadmes prologues readmes shr shr1 shr_site site smsg tcolor textfiles th_pregen txt_eol ufavico ufavico_h unlist up_site vc_url vname xff_src zipmaxt R RS SR"
|
ex = "ah_alg bname chdir chmod_f chpw_db db_xattr doctitle df epilogues exit favico fika ipa ipar html_head html_head_d html_head_s idp_login idp_logout lg_sba lg_sbf log_date log_fk md_sba md_sbf name og_desc og_site og_th og_title og_title_a og_title_v og_title_i opds_exts preadmes prologues readmes shr shr1 shr_site site smsg tcolor textfiles th_pregen txt_eol ufavico ufavico_h unlist up_site vc_url vname xff_src zipmaxt R RS SR"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue