mirror of
https://github.com/9001/copyparty.git
synced 2025-11-05 22:33:16 +00:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f9be4c62b1 | ||
|
|
027e8c18f1 | ||
|
|
4a3bb35a95 | ||
|
|
4bfb0d4494 | ||
|
|
7e0ef03a1e | ||
|
|
f7dbd95a54 |
@@ -1,8 +1,8 @@
|
|||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
|
|
||||||
VERSION = (0, 11, 42)
|
VERSION = (0, 11, 44)
|
||||||
CODENAME = "the grid"
|
CODENAME = "the grid"
|
||||||
BUILD_DT = (2021, 7, 18)
|
BUILD_DT = (2021, 7, 20)
|
||||||
|
|
||||||
S_VERSION = ".".join(map(str, VERSION))
|
S_VERSION = ".".join(map(str, VERSION))
|
||||||
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
|
S_BUILD_DT = "{0:04d}-{1:02d}-{2:02d}".format(*BUILD_DT)
|
||||||
|
|||||||
@@ -1146,7 +1146,7 @@ var audio_eq = (function () {
|
|||||||
v = parseFloat(vs);
|
v = parseFloat(vs);
|
||||||
|
|
||||||
if (isNaN(v) || v + '' != vs)
|
if (isNaN(v) || v + '' != vs)
|
||||||
throw 42;
|
throw new Error('inval band');
|
||||||
|
|
||||||
if (isNaN(band))
|
if (isNaN(band))
|
||||||
r.amp = Math.round((v + step * 0.2) * 100) / 100;
|
r.amp = Math.round((v + step * 0.2) * 100) / 100;
|
||||||
@@ -1714,12 +1714,13 @@ var thegrid = (function () {
|
|||||||
|
|
||||||
|
|
||||||
function tree_scrollto() {
|
function tree_scrollto() {
|
||||||
var act = QS('#treeul a.hl');
|
var act = QS('#treeul a.hl'),
|
||||||
if (!act)
|
ul = act ? act.offsetParent : null;
|
||||||
|
|
||||||
|
if (!ul)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var ctr = ebi('tree'),
|
var ctr = ebi('tree'),
|
||||||
ul = act.offsetParent,
|
|
||||||
em = parseFloat(getComputedStyle(act).fontSize),
|
em = parseFloat(getComputedStyle(act).fontSize),
|
||||||
top = act.offsetTop + ul.offsetTop,
|
top = act.offsetTop + ul.offsetTop,
|
||||||
min = top - 11 * em,
|
min = top - 11 * em,
|
||||||
@@ -2306,8 +2307,13 @@ var treectl = (function () {
|
|||||||
var fun = treectl.dir_cb;
|
var fun = treectl.dir_cb;
|
||||||
if (fun) {
|
if (fun) {
|
||||||
treectl.dir_cb = null;
|
treectl.dir_cb = null;
|
||||||
|
try {
|
||||||
fun();
|
fun();
|
||||||
}
|
}
|
||||||
|
catch (ex) {
|
||||||
|
console.log("dir_cb failed", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function reload_tree() {
|
function reload_tree() {
|
||||||
@@ -2954,7 +2960,7 @@ var arcfmt = (function () {
|
|||||||
|
|
||||||
var ofs = href.lastIndexOf('?');
|
var ofs = href.lastIndexOf('?');
|
||||||
if (ofs < 0)
|
if (ofs < 0)
|
||||||
throw 'missing arg in url';
|
throw new Error('missing arg in url');
|
||||||
|
|
||||||
o.setAttribute("href", href.slice(0, ofs + 1) + arg);
|
o.setAttribute("href", href.slice(0, ofs + 1) + arg);
|
||||||
o.textContent = fmt.split('_')[0];
|
o.textContent = fmt.split('_')[0];
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ function md_plug_err(ex, js) {
|
|||||||
var lns = js.split('\n');
|
var lns = js.split('\n');
|
||||||
if (ln < lns.length) {
|
if (ln < lns.length) {
|
||||||
o = mknod('span');
|
o = mknod('span');
|
||||||
o.style.cssText = 'color:#ac2;font-size:.9em;font-family:scp;display:block';
|
o.style.cssText = "color:#ac2;font-size:.9em;font-family:'scp',monospace,monospace;display:block";
|
||||||
o.textContent = lns[ln - 1];
|
o.textContent = lns[ln - 1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -290,8 +290,7 @@ function U2pvis(act, btns) {
|
|||||||
if (this.is_act(this.tab[a].in))
|
if (this.is_act(this.tab[a].in))
|
||||||
console.log("tab %d/%d = sz %s", a, aa, this.tab[a].bt);
|
console.log("tab %d/%d = sz %s", a, aa, this.tab[a].bt);
|
||||||
|
|
||||||
console.log("a");
|
throw new Error('see console');
|
||||||
throw 42;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
obj.innerHTML = fo.hp;
|
obj.innerHTML = fo.hp;
|
||||||
@@ -304,15 +303,8 @@ function U2pvis(act, btns) {
|
|||||||
oldcat = fo.in,
|
oldcat = fo.in,
|
||||||
bz_act = this.act == "bz";
|
bz_act = this.act == "bz";
|
||||||
|
|
||||||
if (oldcat == newcat) {
|
if (oldcat == newcat)
|
||||||
throw 42;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
//console.log("oldcat %s %d, newcat %s %d, head=%d, tail=%d, file=%d, act.old=%s, act.new=%s, bz_act=%s",
|
|
||||||
// oldcat, this.ctr[oldcat],
|
|
||||||
// newcat, this.ctr[newcat],
|
|
||||||
// this.head, this.tail, nfile,
|
|
||||||
// this.is_act(oldcat), this.is_act(newcat), bz_act);
|
|
||||||
|
|
||||||
fo.in = newcat;
|
fo.in = newcat;
|
||||||
this.ctr[oldcat]--;
|
this.ctr[oldcat]--;
|
||||||
@@ -468,6 +460,12 @@ function U2pvis(act, btns) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function fsearch_explain(e) {
|
||||||
|
ev(e);
|
||||||
|
alert('you are currently in file-search mode\n\nswitch to upload-mode by clicking the green magnifying glass (next to the big yellow search button), and then refresh\n\nsorry');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function up2k_init(subtle) {
|
function up2k_init(subtle) {
|
||||||
// show modal message
|
// show modal message
|
||||||
function showmodal(msg) {
|
function showmodal(msg) {
|
||||||
@@ -1298,8 +1296,10 @@ function up2k_init(subtle) {
|
|||||||
smsg = '';
|
smsg = '';
|
||||||
|
|
||||||
if (!response || !response.hits || !response.hits.length) {
|
if (!response || !response.hits || !response.hits.length) {
|
||||||
msg = 'not found on server';
|
|
||||||
smsg = '404';
|
smsg = '404';
|
||||||
|
msg = 'not found on server';
|
||||||
|
if (has(perms, 'write'))
|
||||||
|
msg += ' <a href="#" onclick="fsearch_explain()" class="fsearch_explain">(explain)</a>';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
smsg = 'found';
|
smsg = 'found';
|
||||||
|
|||||||
@@ -257,6 +257,11 @@ html.light #u2foot .warn span {
|
|||||||
float: right;
|
float: right;
|
||||||
margin-bottom: -.3em;
|
margin-bottom: -.3em;
|
||||||
}
|
}
|
||||||
|
.fsearch_explain {
|
||||||
|
padding-left: .7em;
|
||||||
|
font-size: 1.1em;
|
||||||
|
line-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,10 @@ dbg.asyncStore.pendingBreakpoints = {}
|
|||||||
about:config >> devtools.debugger.prefs-schema-version = -1
|
about:config >> devtools.debugger.prefs-schema-version = -1
|
||||||
|
|
||||||
# determine server version
|
# determine server version
|
||||||
git pull; git reset --hard origin/HEAD && git log --format=format:"%H %ai %d" --decorate=full > ../revs && cat ../{util,browser}.js >../vr && cat ../revs | while read -r rev extra; do (git reset --hard $rev >/dev/null 2>/dev/null && dsz=$(cat copyparty/web/{util,browser}.js >../vg 2>/dev/null && diff -wNarU0 ../{vg,vr} | wc -c) && printf '%s %6s %s\n' "$rev" $dsz "$extra") </dev/null; done
|
git pull; git reset --hard origin/HEAD && git log --format=format:"%H %ai %d" --decorate=full > ../revs && cat ../{util,browser,up2k}.js >../vr && cat ../revs | while read -r rev extra; do (git reset --hard $rev >/dev/null 2>/dev/null && dsz=$(cat copyparty/web/{util,browser,up2k}.js >../vg 2>/dev/null && diff -wNarU0 ../{vg,vr} | wc -c) && printf '%s %6s %s\n' "$rev" $dsz "$extra") </dev/null; done
|
||||||
|
|
||||||
|
# download all sfx versions
|
||||||
|
curl https://api.github.com/repos/9001/copyparty/releases?per_page=100 | jq -r '.[] | .tag_name + " " + .name' | while read v t; do fn="copyparty $v $t.py"; [ -e $fn ] || curl https://github.com/9001/copyparty/releases/download/$v/copyparty-sfx.py -Lo "$fn"; done
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|||||||
@@ -20,6 +20,11 @@ echo
|
|||||||
#
|
#
|
||||||
# `no-cm` saves ~90k by removing easymde/codemirror
|
# `no-cm` saves ~90k by removing easymde/codemirror
|
||||||
# (the fancy markdown editor)
|
# (the fancy markdown editor)
|
||||||
|
#
|
||||||
|
# `no-fnt` saves ~9k by removing the source-code-pro font
|
||||||
|
# (mainly used my the markdown viewer/editor)
|
||||||
|
#
|
||||||
|
# `no-dd` saves ~2k by removing the mouse cursor
|
||||||
|
|
||||||
|
|
||||||
# port install gnutar findutils gsed coreutils
|
# port install gnutar findutils gsed coreutils
|
||||||
@@ -57,14 +62,18 @@ use_gz=
|
|||||||
do_sh=1
|
do_sh=1
|
||||||
do_py=1
|
do_py=1
|
||||||
while [ ! -z "$1" ]; do
|
while [ ! -z "$1" ]; do
|
||||||
[ "$1" = clean ] && clean=1 && shift && continue
|
case $1 in
|
||||||
[ "$1" = re ] && repack=1 && shift && continue
|
clean) clean=1 ; ;;
|
||||||
[ "$1" = gz ] && use_gz=1 && shift && continue
|
re) repack=1 ; ;;
|
||||||
[ "$1" = no-ogv ] && no_ogv=1 && shift && continue
|
gz) use_gz=1 ; ;;
|
||||||
[ "$1" = no-cm ] && no_cm=1 && shift && continue
|
no-ogv) no_ogv=1 ; ;;
|
||||||
[ "$1" = no-sh ] && do_sh= && shift && continue
|
no-fnt) no_fnt=1 ; ;;
|
||||||
[ "$1" = no-py ] && do_py= && shift && continue
|
no-dd) no_dd=1 ; ;;
|
||||||
break
|
no-cm) no_cm=1 ; ;;
|
||||||
|
no-sh) do_sh= ; ;;
|
||||||
|
no-py) do_py= ; ;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
tmv() {
|
tmv() {
|
||||||
@@ -190,6 +199,18 @@ done
|
|||||||
sed -r '/edit2">edit \(fancy/d' <$f >t && tmv "$f"
|
sed -r '/edit2">edit \(fancy/d' <$f >t && tmv "$f"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[ $no_fnt ] && {
|
||||||
|
rm -f copyparty/web/deps/scp.woff2
|
||||||
|
f=copyparty/web/md.css
|
||||||
|
sed -r '/scp\.woff2/d' <$f >t && tmv "$f"
|
||||||
|
}
|
||||||
|
|
||||||
|
[ $no_dd ] && {
|
||||||
|
rm -rf copyparty/web/dd
|
||||||
|
f=copyparty/web/browser.css
|
||||||
|
sed -r 's/(cursor: )url\([^)]+\), (pointer)/\1\2/; /[0-9]+% \{cursor:/d; /animation: cursor/d' <$f >t && tmv "$f"
|
||||||
|
}
|
||||||
|
|
||||||
[ $repack ] ||
|
[ $repack ] ||
|
||||||
find | grep -E '\.py$' |
|
find | grep -E '\.py$' |
|
||||||
grep -vE '__version__' |
|
grep -vE '__version__' |
|
||||||
|
|||||||
Reference in New Issue
Block a user