update 2026-05-29 15:51:13

This commit is contained in:
action committed 2026-05-29 15:51:13 +08:00
1 parent b251881116
commit 6d0d9bb4da
4 files changed
+17 -4

No files matched your search

@@ -147,7 +147,7 @@ function act_status()
end
e.no_tun = uci:get_first("easytier", "easytier", "no_tun") == "1"
e.dev_name = uci:get_first("easytier", "easytier", "dev_name") or "tun0"
e.dev_name = uci:get_first("easytier", "easytier", "tunname") or "tun0"
luci.http.prepare_content("application/json")
luci.http.write_json(e)
@@ -1232,6 +1232,18 @@ function refreshConnInfo() {
}
}
};
xhr.onerror = function() {
isRefreshing = false;
btn.disabled = false;
btn.classList.remove('loading');
btnText.textContent = originalText;
};
xhr.onabort = function() {
isRefreshing = false;
btn.disabled = false;
btn.classList.remove('loading');
btnText.textContent = originalText;
};
xhr.send();
}
@@ -1496,7 +1508,7 @@ function loadContributors() {
// 自动刷新
XHR.poll(5, '<%=url("admin", "vpn", "easytier", "api_conninfo")%>', null, function(x, data) {
if (!isRefreshing) {
if (!isRefreshing && data) {
updateConnInfo(data);
}
});
@@ -1075,6 +1075,7 @@ function updateTunInterface(coreRunning, noTun, devName) {
var firstLoad = true;
XHR.poll(3, '<%=url("admin", "vpn", "easytier", "api_status")%>', null, function(x, data) {
if (!data) return;
updateStatus(data);
updateTunInterface(data.crunning, data.no_tun, data.dev_name);