Skip to content

Commit

Permalink
chore: refine
Browse files Browse the repository at this point in the history
  • Loading branch information
vernesong committed Dec 31, 2024
1 parent f4e58fe commit dcb127c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
30 changes: 15 additions & 15 deletions luci-app-openclash/luasrc/view/openclash/update.htm
Original file line number Diff line number Diff line change
Expand Up @@ -283,28 +283,28 @@
{
var v = core_version.value;
var r = release_branch.value;
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "save_corever_branch")%>', {core_ver: v, release_branch: r}, function(x, status) {
if (x && x.status == 200) {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "coreupdate")%>', {core_type: type}, function(x, status) {
btn.value = '<%:Check And Update%>';
btn.disabled = false;
return false;
});
}
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "save_corever_branch")%>', {core_ver: v, release_branch: r}, function(x, status) {
if (x && x.status == 200) {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "coreupdate")%>', {core_type: type}, function(x, status) {
btn.value = '<%:Check And Update%>';
btn.disabled = false;
return false;
});
}
});
}

function op_update(btn)
{
var r = release_branch.value;
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "save_corever_branch")%>', {release_branch: r}, function(x, status) {
if (x && x.status == 200) {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "opupdate")%>', null, function(x, status) {
btn.value = '<%:Check And Update%>';
btn.disabled = false;
return false;
});
}
if (x && x.status == 200) {
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash", "opupdate")%>', null, function(x, status) {
btn.value = '<%:Check And Update%>';
btn.disabled = false;
return false;
});
}
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1590,7 +1590,7 @@ function network_test()
return
end
end
print("Error: Network Anomaly, Suspend Unlock Detection...")
print(os.date("%Y-%m-%d %H:%M:%S").." Error: Network Anomaly, Suspend Unlock Detection...")
end

network_test()

0 comments on commit dcb127c

Please sign in to comment.