mirror of
https://github.com/9001/copyparty.git
synced 2025-08-17 17:12:13 -06:00
improve error messages
This commit is contained in:
parent
fa1445df86
commit
0f37718671
|
@ -318,6 +318,8 @@ var Ls = {
|
||||||
"u_ehsfin": "server rejected the request to finalize upload; retrying...",
|
"u_ehsfin": "server rejected the request to finalize upload; retrying...",
|
||||||
"u_ehssrch": "server rejected the request to perform search; retrying...",
|
"u_ehssrch": "server rejected the request to perform search; retrying...",
|
||||||
"u_ehsinit": "server rejected the request to initiate upload; retrying...",
|
"u_ehsinit": "server rejected the request to initiate upload; retrying...",
|
||||||
|
"u_eneths": "network error while performing upload handshake; retrying...",
|
||||||
|
"u_enethd": "network error while testing target existence; retrying...",
|
||||||
"u_ehsdf": "server ran out of disk space!\n\nwill keep retrying, in case someone\nfrees up enough space to continue",
|
"u_ehsdf": "server ran out of disk space!\n\nwill keep retrying, in case someone\nfrees up enough space to continue",
|
||||||
"u_emtleak1": "it looks like your webbrowser may have a memory leak;\nplease",
|
"u_emtleak1": "it looks like your webbrowser may have a memory leak;\nplease",
|
||||||
"u_emtleak2": ' <a href="{0}">switch to https (recommended)</a> or ',
|
"u_emtleak2": ' <a href="{0}">switch to https (recommended)</a> or ',
|
||||||
|
@ -662,6 +664,8 @@ var Ls = {
|
||||||
"u_ehsfin": "server nektet forespørselen om å ferdigstille filen; prøver igjen...",
|
"u_ehsfin": "server nektet forespørselen om å ferdigstille filen; prøver igjen...",
|
||||||
"u_ehssrch": "server nektet forespørselen om å utføre søk; prøver igjen...",
|
"u_ehssrch": "server nektet forespørselen om å utføre søk; prøver igjen...",
|
||||||
"u_ehsinit": "server nektet forespørselen om å begynne en ny opplastning; prøver igjen...",
|
"u_ehsinit": "server nektet forespørselen om å begynne en ny opplastning; prøver igjen...",
|
||||||
|
"u_eneths": "et problem med nettverket gjorde at avtale om opplastning ikke kunne inngås; prøver igjen...",
|
||||||
|
"u_enethd": "et problem med nettverket gjorde at filsjekk ikke kunne utføres; prøver igjen...",
|
||||||
"u_ehsdf": "serveren er full!\n\nprøver igjen regelmessig,\ni tilfelle noen rydder litt...",
|
"u_ehsdf": "serveren er full!\n\nprøver igjen regelmessig,\ni tilfelle noen rydder litt...",
|
||||||
"u_emtleak1": "uff, det er mulig at nettleseren din har en minnelekkasje...\nForeslår",
|
"u_emtleak1": "uff, det er mulig at nettleseren din har en minnelekkasje...\nForeslår",
|
||||||
"u_emtleak2": ' helst at du <a href="{0}">bytter til https</a>, eller ',
|
"u_emtleak2": ' helst at du <a href="{0}">bytter til https</a>, eller ',
|
||||||
|
@ -4495,7 +4499,7 @@ function aligngriditems() {
|
||||||
var gridwidth = ebi('ggrid').clientWidth;
|
var gridwidth = ebi('ggrid').clientWidth;
|
||||||
var griditemcount = ebi('ggrid').children.length;
|
var griditemcount = ebi('ggrid').children.length;
|
||||||
var totalgapwidth = em2px * griditemcount;
|
var totalgapwidth = em2px * griditemcount;
|
||||||
|
|
||||||
if (((griditemcount * em2px) * gridsz) + totalgapwidth < gridwidth) {
|
if (((griditemcount * em2px) * gridsz) + totalgapwidth < gridwidth) {
|
||||||
ebi('ggrid').style.justifyContent = 'left';
|
ebi('ggrid').style.justifyContent = 'left';
|
||||||
} else if (localStorage.getItem('entreed') == 'na') {
|
} else if (localStorage.getItem('entreed') == 'na') {
|
||||||
|
@ -4694,7 +4698,7 @@ var treectl = (function () {
|
||||||
|
|
||||||
function onresize(e) {
|
function onresize(e) {
|
||||||
aligngriditems();
|
aligngriditems();
|
||||||
|
|
||||||
if (!entreed || r.hidden)
|
if (!entreed || r.hidden)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -1179,7 +1179,7 @@ function up2k_init(subtle) {
|
||||||
|
|
||||||
var msg = [];
|
var msg = [];
|
||||||
|
|
||||||
if (FIREFOX && good_files.length > 5000)
|
if (FIREFOX && good_files.length > 3000)
|
||||||
msg.push(L.u_ff_many);
|
msg.push(L.u_ff_many);
|
||||||
|
|
||||||
msg.push(L.u_asku.format(good_files.length, esc(get_vpath())) + '<ul>');
|
msg.push(L.u_asku.format(good_files.length, esc(get_vpath())) + '<ul>');
|
||||||
|
@ -1948,7 +1948,10 @@ function up2k_init(subtle) {
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.onerror = function () {
|
xhr.onerror = function () {
|
||||||
console.log('head onerror, retrying', t);
|
console.log('head onerror, retrying', t.name, t);
|
||||||
|
if (!toast.visible)
|
||||||
|
toast.warn(9.98, L.u_enethd + "\n\nfile: " + t.name, t);
|
||||||
|
|
||||||
apop(st.busy.head, t);
|
apop(st.busy.head, t);
|
||||||
st.todo.head.unshift(t);
|
st.todo.head.unshift(t);
|
||||||
};
|
};
|
||||||
|
@ -2004,22 +2007,25 @@ function up2k_init(subtle) {
|
||||||
t.t_busied = me;
|
t.t_busied = me;
|
||||||
|
|
||||||
if (keepalive)
|
if (keepalive)
|
||||||
console.log("sending keepalive handshake", t);
|
console.log("sending keepalive handshake", t.name, t);
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
var xhr = new XMLHttpRequest();
|
||||||
xhr.onerror = function () {
|
xhr.onerror = function () {
|
||||||
if (t.t_busied != me) {
|
if (t.t_busied != me) {
|
||||||
console.log('zombie handshake onerror,', t);
|
console.log('zombie handshake onerror,', t.name, t);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
console.log('handshake onerror, retrying', t);
|
if (!toast.visible)
|
||||||
|
toast.warn(9.98, L.u_eneths + "\n\nfile: " + t.name, t);
|
||||||
|
|
||||||
|
console.log('handshake onerror, retrying', t.name, t);
|
||||||
apop(st.busy.handshake, t);
|
apop(st.busy.handshake, t);
|
||||||
st.todo.handshake.unshift(t);
|
st.todo.handshake.unshift(t);
|
||||||
t.keepalive = keepalive;
|
t.keepalive = keepalive;
|
||||||
};
|
};
|
||||||
function orz(e) {
|
function orz(e) {
|
||||||
if (t.t_busied != me) {
|
if (t.t_busied != me) {
|
||||||
console.log('zombie handshake onload,', t);
|
console.log('zombie handshake onload,', t.name, t);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (xhr.status == 200) {
|
if (xhr.status == 200) {
|
||||||
|
@ -2286,7 +2292,7 @@ function up2k_init(subtle) {
|
||||||
}
|
}
|
||||||
else if (txt.indexOf('already got that') + 1 ||
|
else if (txt.indexOf('already got that') + 1 ||
|
||||||
txt.indexOf('already being written') + 1) {
|
txt.indexOf('already being written') + 1) {
|
||||||
console.log("ignoring dupe-segment error", t);
|
console.log("ignoring dupe-segment error", t.name, t);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xhrchk(xhr, L.u_cuerr2.format(npart, Math.ceil(t.size / chunksize), t.name), "404, target folder not found (???)", "warn", t);
|
xhrchk(xhr, L.u_cuerr2.format(npart, Math.ceil(t.size / chunksize), t.name), "404, target folder not found (???)", "warn", t);
|
||||||
|
@ -2323,7 +2329,7 @@ function up2k_init(subtle) {
|
||||||
if (!toast.visible)
|
if (!toast.visible)
|
||||||
toast.warn(9.98, L.u_cuerr.format(npart, Math.ceil(t.size / chunksize), t.name), t);
|
toast.warn(9.98, L.u_cuerr.format(npart, Math.ceil(t.size / chunksize), t.name), t);
|
||||||
|
|
||||||
console.log('chunkpit onerror,', ++tries, t);
|
console.log('chunkpit onerror,', ++tries, t.name, t);
|
||||||
orz2(xhr);
|
orz2(xhr);
|
||||||
};
|
};
|
||||||
xhr.open('POST', t.purl, true);
|
xhr.open('POST', t.purl, true);
|
||||||
|
|
|
@ -51,6 +51,7 @@ onmessage = (d) => {
|
||||||
hash_calc(gc1);
|
hash_calc(gc1);
|
||||||
}
|
}
|
||||||
catch (ex) {
|
catch (ex) {
|
||||||
|
busy = false;
|
||||||
postMessage(["panic", ex + '']);
|
postMessage(["panic", ex + '']);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue