From b005acbfda9c4e2f17f0aeb69bf2295c7dc93e02 Mon Sep 17 00:00:00 2001 From: ed Date: Mon, 23 Jan 2023 22:44:29 +0000 Subject: [PATCH] enable text selection between breadcrumbs + update vs --- copyparty/web/browser.css | 12 ++++++------ copyparty/web/browser.js | 13 +++++++------ docs/versus.md | 16 +++++++++++----- scripts/toc.sh | 8 +++++--- 4 files changed, 29 insertions(+), 20 deletions(-) diff --git a/copyparty/web/browser.css b/copyparty/web/browser.css index 9c6fca9f..bded5d96 100644 --- a/copyparty/web/browser.css +++ b/copyparty/web/browser.css @@ -754,8 +754,9 @@ html.y #files thead th { display: inline; } #path a { - margin: 0 0 0 -.2em; - padding: 0 0 0 .4em; + padding: 0 .35em; + position: relative; + z-index: 1; /* ie: */ border-bottom: .1em solid #777\9; margin-right: 1em\9; @@ -763,18 +764,17 @@ html.y #files thead th { #path a:first-child { padding-left: .8em; } -#path a:not(:last-child):after { - content: ''; +#path i { width: 1.05em; height: 1.05em; - margin: -.2em .3em -.2em -.4em; + margin: -.5em .15em -.15em -.7em; display: inline-block; border: 1px solid rgba(255,224,192,0.3); border-width: .05em .05em 0 0; transform: rotate(45deg); background: linear-gradient(45deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.25) 75%, rgba(0,0,0,0.35)); } -html.y #path a:not(:last-child)::after { +html.y #path i { background: none; border-color: rgba(0,0,0,0.2); border-width: .1em .1em 0 0; diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index 1317f4c3..a42f6b9e 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -6903,18 +6903,19 @@ function reload_browser() { filecols.set_style(); var parts = get_evpath().split('/'), - rm = QSA('#path>a+a+a'), + rm = ebi('entree'), ftab = ebi('files'), - link = '/', o; + link = '', o; - for (a = rm.length - 1; a >= 0; a--) - rm[a].parentNode.removeChild(rm[a]); + while (rm.nextSibling) + rm.parentNode.removeChild(rm.nextSibling); - for (var a = 1; a < parts.length - 1; a++) { + for (var a = 0; a < parts.length - 1; a++) { link += parts[a] + '/'; o = mknod('a'); o.setAttribute('href', link); - o.textContent = uricom_dec(parts[a]); + o.textContent = uricom_dec(parts[a]) || '/'; + ebi('path').appendChild(mknod('i')); ebi('path').appendChild(o); } diff --git a/docs/versus.md b/docs/versus.md index 1aca8e7a..dc507189 100644 --- a/docs/versus.md +++ b/docs/versus.md @@ -142,8 +142,8 @@ symbol legend, | ┗ max uploads over time | █ | | | | | | | | | | | | ┗ compress before write | █ | | | | | | | | | | | | ┗ randomize filename | █ | | | | | | | █ | █ | | | -| ┗ mimetype reject-list | ╱ | | | | | | | | • | | | -| ┗ extension reject-list | ╱ | | | | | | | █ | • | | | +| ┗ mimetype reject-list | ╱ | | | | | | | | • | ╱ | | +| ┗ extension reject-list | ╱ | | | | | | | █ | • | ╱ | | | checksums provided | | | | █ | █ | | | | █ | ╱ | | | cloud storage backend | ╱ | ╱ | ╱ | █ | █ | █ | ╱ | | | ╱ | █ | @@ -158,9 +158,12 @@ symbol legend, * `cloud storage backend` = able to serve files from (and write to) s3 or similar cloud services; `╱` means the software can do this with some help from `rclone mount` as a bridge * `a`/copyparty can reject uploaded files (based on complex conditions), for example [by extension](https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/reject-extension.py) or [mimetype](https://github.com/9001/copyparty/blob/hovudstraum/bin/hooks/reject-mimetype.py) -* `j`/filebrowser can provide checksums for single files on request +* `j`/filebrowser remarks: + * can provide checksums for single files on request + * can probably do extension/mimetype rejection similar to copyparty * `k`/filegator download-as-zip is not streaming; it creates the full zipfile before download can start + ## protocols and client support | feature / software | a | b | c | d | e | f | g | h | i | j | k | @@ -288,8 +291,8 @@ symbol legend, | search by custom parser | █ | | | | | | | | | | | | find local file | █ | | | | | | | | | | | | undo recent uploads | █ | | | | | | | | | | | -| create directories | █ | | | █ | █ | ╱ | █ | █ | █ | | █ | -| image viewer | █ | | | █ | █ | | | | █ | | █ | +| create directories | █ | | | █ | █ | ╱ | █ | █ | █ | █ | █ | +| image viewer | █ | | | █ | █ | | | | █ | █ | █ | | markdown viewer | █ | | | | █ | | | | █ | ╱ | ╱ | | markdown editor | █ | | | | █ | | | | █ | ╱ | ╱ | | readme.md in listing | █ | | | █ | | | | | | | | @@ -469,10 +472,13 @@ symbol legend, * ⚠️ on cloudflare: max upload size 100 MiB * ⚠️ http only; no webdav / ftp / zeroconf * ⚠️ doesn't support crazy filenames +* ⚠️ no directory tree nav * ⚠️ limited file search * ✅ settings gui * ✅ good ui/ux * ⚠️ but no directory tree for navigation +* ✅ user signup +* ✅ command runner / remote shell * supposed to have write-only folders but couldn't get it to work ## [filegator](https://github.com/filegator/filegator) diff --git a/scripts/toc.sh b/scripts/toc.sh index 2d53c37c..00fb299b 100755 --- a/scripts/toc.sh +++ b/scripts/toc.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -for f in README.md docs/devnotes.md; do +for f in README.md docs/devnotes.md docs/versus.md; do cat $f | awk ' function pr() { @@ -20,6 +20,8 @@ cat $f | awk ' /^#/{ lv=length($1); sub(/[^ ]+ /,""); + sub(/\[/,""); + sub(/\]\([^)]+\)/,""); bab=$0; gsub(/ /,"-",bab); gsub(/\./,"",bab); @@ -31,9 +33,9 @@ cat $f | awk ' {pr()} ' > toc -grep -E '^#+ [^ ]+ toc$' -B1000 -A2 <$f >p1 +grep -E '^#+ *[^ ]+ toc$' -B1000 -A2 <$f >p1 -h2="$(awk '/^#+ [^ ]+ toc$/{o=1;next} o&&/^#/{print;exit}' <$f)" +h2="$(awk '/^#+ *[^ ]+ toc$/{o=1;next} o&&/^#/{print;exit}' <$f)" grep -F "$h2" -B2 -A999999 <$f >p2