Squashed 'luci-app-smartdns/' changes from e634b6f..26e7e29

26e7e29 luci: Fix the issue of logging in for non-IP addresses.

git-subtree-dir: luci-app-smartdns
git-subtree-split: 26e7e2973c21fec8b35266073ef7cf8bc2ac0396
This commit is contained in:
bgme 2025-08-05 01:24:06 +00:00
parent ffaa8c5685
commit 8d0ffc9f8e

View file

@ -68,7 +68,9 @@ function smartdnsRenderStatus(res) {
renderHTML += "<span style=\"color:green;font-weight:bold\">SmartDNS - " + _("RUNNING") + "</span>"; renderHTML += "<span style=\"color:green;font-weight:bold\">SmartDNS - " + _("RUNNING") + "</span>";
if (uiEnable === '1') { if (uiEnable === '1') {
var uiLink = "http://" + window.location.hostname + ":" + uiPort + "/"; var protocol = window.location.protocol;
var hostname = window.location.hostname;
var uiLink = protocol + "//" + hostname + ":" + uiPort;
renderHTML += "&#160; <a class=\"btn cbi-button\" style=\"margin-left: 10px; background-color: black; color: white; border-color: #333;\" href=\"" + uiLink + "\" target=\"_blank\">" + _("Open the WebUI") + "</a>"; renderHTML += "&#160; <a class=\"btn cbi-button\" style=\"margin-left: 10px; background-color: black; color: white; border-color: #333;\" href=\"" + uiLink + "\" target=\"_blank\">" + _("Open the WebUI") + "</a>";
} }
} else { } else {