From d5a79455d1927c0358cd32daa5a293955e7c82e4 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 26 Jul 2021 23:31:45 +0200 Subject: [PATCH] cleanup --- copyparty/__main__.py | 10 ++++++++-- copyparty/web/browser.js | 9 +++------ copyparty/web/util.js | 4 ++-- tests/test_httpcli.py | 1 + tests/test_vfs.py | 1 + 5 files changed, 15 insertions(+), 10 deletions(-) diff --git a/copyparty/__main__.py b/copyparty/__main__.py index ec84843a..51bba006 100644 --- a/copyparty/__main__.py +++ b/copyparty/__main__.py @@ -199,10 +199,16 @@ def run_argparse(argv, formatter): epilog=dedent( """ -a takes username:password, - -v takes src:dst:permset:permset:cflag:cflag:... - where "permset" is "accesslevel,username" + -v takes src:dst:perm1:perm2:permN:cflag1:cflag2:cflagN:... + where "perm" is "accesslevels,username1,username2,..." and "cflag" is config flags to set on this volume + list of accesslevels: + "r" (read): list folder contents, download files + "w" (write): upload files; need "r" to see the uploads + "m" (move): move files and folders; need "w" at destination + "d" (delete): permanently delete files and folders + list of cflags: "c,nodupe" rejects existing files (instead of symlinking them) "c,e2d" sets -e2d (all -e2* args can be set using ce2* cflags) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index daa5d3a5..996d8ace 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -35,7 +35,7 @@ ebi('widget').innerHTML = ( ' href="#" id="fcut" tt="cut selected items <small>(then paste somewhere else)</small>$NHotkey: ctrl-X">✂cut📋paste' + 'sel.
allsel.
allsel.
inv.zip' + '
you hit a bug!

try to reset copyparty settings if you are stuck here, or ignore this / ignore all

please send me a screenshot arigathanks gozaimuch: ed/irc.rizon.net or ed#2644
  (and if you can, press F12 and include the "Console" tab in the screenshot too)

', + var html = ['

you hit a bug!

try to reset copyparty settings if you are stuck here, or ignore this / ignore all

please send me a screenshot arigathanks gozaimuch: ed/irc.rizon.net or ed#2644
  (and if you can, press F12 and include the "Console" tab in the screenshot too)

', esc(url + ' @' + lineNo + ':' + columnNo), '
' + esc(String(msg)) + '

']; try { @@ -63,7 +63,7 @@ function vis_exh(msg, url, lineNo, columnNo, error) { document.body.appendChild(exbox); var s = mknod('style'); - s.innerHTML = '#exbox{background:#333;color:#ddd;font-family:sans-serif;font-size:0.8em;padding:0 1em 1em 1em;z-index:80386;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%} #exbox h1{margin:.5em 1em 0 0;padding:0} #exbox h3{border-top:1px solid #999;margin:1em 0 0 0} #exbox code{color:#bf7;background:#222;padding:.1em;margin:.2em;font-size:1.1em;font-family:monospace,monospace} #exbox *{line-height:1.5em}'; + s.innerHTML = '#exbox{background:#333;color:#ddd;font-family:sans-serif;font-size:0.8em;padding:0 1em 1em 1em;z-index:80386;position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%} #exbox h1{margin:.5em 1em 0 0;padding:0} #exbox h3{border-top:1px solid #999;margin:1em 0 0 0} #exbox a{text-decoration:underline;color:#fc0} #exbox code{color:#bf7;background:#222;padding:.1em;margin:.2em;font-size:1.1em;font-family:monospace,monospace} #exbox *{line-height:1.5em}'; document.head.appendChild(s); } exbox.innerHTML = html.join('\n'); diff --git a/tests/test_httpcli.py b/tests/test_httpcli.py index da4c9d25..6a8ee8ba 100644 --- a/tests/test_httpcli.py +++ b/tests/test_httpcli.py @@ -32,6 +32,7 @@ class Cfg(Namespace): ed=False, nw=False, no_zip=False, + no_voldump=True, no_scandir=False, no_sendfile=True, no_rescan=True, diff --git a/tests/test_vfs.py b/tests/test_vfs.py index 285bbc54..42396202 100644 --- a/tests/test_vfs.py +++ b/tests/test_vfs.py @@ -24,6 +24,7 @@ class Cfg(Namespace): "hist": None, "no_hash": False, "css_browser": None, + "no_voldump": True, "rproxy": 0, } ex.update(ex2)