summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-simple-adblock/luasrc
diff options
context:
space:
mode:
authorStan Grishin <stangri@melmac.net>2021-03-09 20:35:28 -0800
committerGitHub <noreply@github.com>2021-03-09 20:35:28 -0800
commitefecdae6524c669e2edfe8cb21cfd393904c3437 (patch)
tree5faed523116d429f1c418652fa9004c57381237a /applications/luci-app-simple-adblock/luasrc
parentb79a41c4939ff78fc95a786f37272905b427173d (diff)
parent13c6ff1297acfd16508c25f21f773b7e0fd8654c (diff)
Merge pull request #4885 from stangri/master-luci-app-simple-adblock
luci-app-simple-adblock: bugfix: template layout on theme-openwrt-2020
Diffstat (limited to 'applications/luci-app-simple-adblock/luasrc')
-rw-r--r--applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua6
-rw-r--r--applications/luci-app-simple-adblock/luasrc/view/simple-adblock/buttons.htm4
-rw-r--r--applications/luci-app-simple-adblock/luasrc/view/simple-adblock/status.htm4
3 files changed, 8 insertions, 6 deletions
diff --git a/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua b/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua
index dfe3b8a365..b60123e5d5 100644
--- a/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua
+++ b/applications/luci-app-simple-adblock/luasrc/model/cbi/simple-adblock.lua
@@ -195,7 +195,7 @@ else
ss = h:option(DummyValue, "_dummy", translate("Service Status"))
ss.template = "simple-adblock/status"
if tmpfsStatus == "statusSuccess" then
- ss.value = translatef("%s is blocking %s domains (with %s).", packageVersion, getFileLines(outputFile), targetDNS)
+ ss.value = translatef("Blocking %s domains (with %s).", getFileLines(outputFile), targetDNS)
else
ss.value = statusTable[tmpfsStatus]
end
@@ -206,7 +206,7 @@ else
end
if tmpfsError then
es = h:option(DummyValue, "_dummy", translate("Collected Errors"))
- es.template = "simple-adblock/error"
+ es.template = "simple-adblock/status"
es.value = ""
local err, e, url
for err in tmpfsError:gmatch("[%p%w]+") do
@@ -220,7 +220,7 @@ else
end
end
if packageVersion ~= "" then
- buttons = h:option(DummyValue, "_dummy")
+ buttons = h:option(DummyValue, "_dummy", translate("Service Control"))
buttons.template = packageName .. "/buttons"
end
end
diff --git a/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/buttons.htm b/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/buttons.htm
index 74eb5e8394..131112c8a7 100644
--- a/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/buttons.htm
+++ b/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/buttons.htm
@@ -47,7 +47,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)" />
@@ -69,7 +69,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-simple-adblock/luasrc/view/simple-adblock/status.htm b/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/status.htm
index c453428405..b02c7faa82 100644
--- a/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/status.htm
+++ b/applications/luci-app-simple-adblock/luasrc/view/simple-adblock/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%>