🍓 Sync 2025-11-12 00:12:28

This commit is contained in:
actions-user
2025-11-12 00:12:28 +08:00
parent 0a5eef01c8
commit 34c022445a
16 changed files with 261 additions and 62 deletions

View File

@@ -6,17 +6,14 @@ XHR.poll(3, '<%=url([[admin]], [[services]], [[AdGuardHome]], [[status]])%>', nu
if (data && tb) {
if (data.running) {
tb.innerHTML = '<em><b style=color:green>AdGuardHome <%:RUNNING%></b></em>';
} else {
tb.innerHTML = '<em><b style=color:red>AdGuardHome <%:NOT RUNNING%></b></em>';
}
if (data.redirect)
{
URL = window.location.protocol.toLowerCase() + "//" + window.location.hostname + ":<%=luci.model.uci.cursor():get("AdGuardHome", "AdGuardHome", "httpport") %>";
tb.innerHTML+='<em> <b style=color:green><%:Redirected%></b> </em> '
tb.innerHTML += "<input class=\"cbi-button cbi-button-reload \" type=\"button\" value=\" <%: Open Web Interface%>\" onclick=\"window.open('"+URL+"')\"/>";
} else {
tb.innerHTML = '<em><b style=color:red>AdGuardHome <%:NOT RUNNING%></b></em>';
tb.innerHTML+='<em><b style=color:red><%:Not redirect%></b></em>'
}
}
}
);