diff options
Diffstat (limited to 'applications/luci-app-https-dns-proxy/luasrc')
3 files changed, 10 insertions, 15 deletions
diff --git a/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua b/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua index 98fabf86ae..620c8d6c88 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua +++ b/applications/luci-app-https-dns-proxy/luasrc/model/cbi/https-dns-proxy.lua @@ -88,7 +88,7 @@ else end la = la or "127.0.0.1" lp = lp or n + 5053 - packageStatus = packageStatus .. translatef("Running: %s DoH at %s:%s", getProviderName(url), la, lp) .. "\n" + packageStatus = packageStatus .. translatef("%s DoH at %s:%s", getProviderName(url), la, lp) .. "\n" else break end @@ -107,17 +107,10 @@ m = Map("https-dns-proxy", translate("DNS HTTPS Proxy Settings")) h = m:section(TypedSection, "_dummy", translatef("Service Status [%s %s]", packageName, packageVersion)) h.template = "cbi/nullsection" ss = h:option(DummyValue, "_dummy", translate("Service Status")) -if packageStatusCode == -1 then - ss.template = packageName .. "/status" - ss.value = packageStatus -else - if packageStatusCode == 0 then - ss.template = packageName .. "/status" - else - ss.template = packageName .. "/status-textarea" - end - ss.value = packageStatus - buttons = h:option(DummyValue, "_dummy") +ss.template = packageName .. "/status" +ss.value = packageStatus +if packageStatusCode ~= -1 then + buttons = h:option(DummyValue, "_dummy", translate("Service Control")) buttons.template = packageName .. "/buttons" end diff --git a/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm b/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm index c5164d7292..9cfd25e50e 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm +++ b/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/buttons.htm @@ -36,7 +36,7 @@ end -%> -<div class="cbi-value"><label class="cbi-value-title">Service Control</label> +<%+cbi/valueheader%> <div class="cbi-value-field"> <input type="button" class="btn cbi-button cbi-button-apply" id="btn_start" name="start" value="<%:Start%>" onclick="button_action(this)" /> @@ -58,7 +58,7 @@ onclick="button_action(this)" /> <span id="btn_disable_spinner" class="btn_spinner"></span> </div> -</div> +<%+cbi/valuefooter%> <%-if not btn_start_status then%> <script type="text/javascript">document.getElementById("btn_start").disabled = true;</script> diff --git a/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/status.htm b/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/status.htm index c453428405..b02c7faa82 100644 --- a/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/status.htm +++ b/applications/luci-app-https-dns-proxy/luasrc/view/https-dns-proxy/status.htm @@ -5,6 +5,8 @@ This is free software, licensed under the Apache License, Version 2.0 <%+cbi/valueheader%> -<input name="status" id="status" type="text" class="cbi-input-text" style="outline:none;border:none;box-shadow:none;background:transparent;font-weight:bold;line-height:30px;height:30px;width:50em;" value="<%=self:cfgvalue(section)%>" disabled="disabled" /> +<div style="font-weight:bold;"> + <%=self:cfgvalue(section):gsub('\n', '<br />' )%> +</div> <%+cbi/valuefooter%> |