mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-30 04:15:13 +08:00
🎁 Sync 2026-05-29 21:08:02
This commit is contained in:
1 parent
0f451257f1
commit
e35ce17f60
10 files changed
+113
-27
No files matched your search
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
-include $(dir $(lastword $(MAKEFILE_LIST)))../version.mk
|
||||
|
||||
PKG_VERSION:=$(or $(EASYTIER_VERSION),2.6.4)
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=10
|
||||
|
||||
LUCI_TITLE:=LuCI support for EasyTier
|
||||
LUCI_DEPENDS:=+kmod-tun +easytier +luci-compat
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user