update 2024-06-21 16:21:21

This commit is contained in:
kenzok8 2024-06-21 16:21:21 +08:00
parent cc10a53f62
commit 43c46d208c
2 changed files with 16 additions and 16 deletions

View File

@ -11,7 +11,7 @@ LUCI_DEPENDS:=+luci-lib-xterm +taskd
LUCI_EXTRA_DEPENDS:=taskd (>=1.0.3-1)
LUCI_PKGARCH:=all
PKG_VERSION:=1.0.19
PKG_VERSION:=1.0.20
PKG_RELEASE:=
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>

View File

@ -24,7 +24,7 @@
if (oReq.status == 403) {
alert($gettext("Lost login status"));
location.href = location.href;
} else if (oReq.status == 404) {
} else if (oReq.status >= 400) {
reject(oEvent);
} else {
resolve(oReq);
@ -155,7 +155,7 @@
}
}).catch(err => {
if (showing) {
if (err.target.status == 0) {
if (err.target.status == 0 || err.target.status == 502) {
title_view.innerText = task_id + ' (' + $gettext("Fetch log failed, retrying...") + ')';
setTimeout(()=>pulllog(true), 1000);
} else if (err.target.status == 403 || err.target.status == 404) {
@ -183,23 +183,23 @@
// compat
if (typeof(window.findParent) !== 'function') {
const elem = function(e) {
return (e != null && typeof(e) == 'object' && 'nodeType' in e);
};
return (e != null && typeof(e) == 'object' && 'nodeType' in e);
};
const matches = function(node, selector) {
var m = elem(node) ? node.matches || node.msMatchesSelector : null;
return m ? m.call(node, selector) : false;
};
var m = elem(node) ? node.matches || node.msMatchesSelector : null;
return m ? m.call(node, selector) : false;
};
window.findParent = function (node, selector) {
if (elem(node) && node.closest)
return node.closest(selector);
if (elem(node) && node.closest)
return node.closest(selector);
while (elem(node))
if (matches(node, selector))
return node;
else
node = node.parentNode;
while (elem(node))
if (matches(node, selector))
return node;
else
node = node.parentNode;
return null;
return null;
};
}
if (typeof(window.cbi_submit) !== 'function') {