From b9130a1b11c887f7baa63506e09f7c443209fe07 Mon Sep 17 00:00:00 2001 From: riley Date: Sun, 17 Sep 2023 14:38:42 -0400 Subject: [PATCH 1/3] Interface cleanup --- luasrc/model/cbi/btcpayserver.lua | 6 +++--- luasrc/view/btcpayserver/status.htm | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/luasrc/model/cbi/btcpayserver.lua b/luasrc/model/cbi/btcpayserver.lua index 41c62d9..283390e 100644 --- a/luasrc/model/cbi/btcpayserver.lua +++ b/luasrc/model/cbi/btcpayserver.lua @@ -7,11 +7,11 @@ local btcpayserver_model = require "luci.model.btcpayserver" local m, s, o m = taskd.docker_map("btcpayserver", "btcpayserver", "/usr/libexec/apps/btcpayserver/btcpayserver.sh", - translate("btcpayserver"), + translate("BTCPay Server"), translate("BTCPay Server is a self-hosted, open-source cryptocurrency payment processor. It's secure, private, censorship-resistant and free.") - .. translate("Official website:") .. ' hhttps://docs.linuxserver.io/images/docker-btcpayserver/') + .. "
" .. translate("Official website:") .. ' https://docs.linuxserver.io/images/docker-btcpayserver/') -s = m:section(SimpleSection, translate("Service Status"), translate("btcpayserver status:")) +s = m:section(SimpleSection, translate("Container Status")) s:append(Template("btcpayserver/status")) s = m:section(TypedSection, "btcpayserver", translate("Setup"), translate("The following parameters will only take effect during installation or upgrade:")) diff --git a/luasrc/view/btcpayserver/status.htm b/luasrc/view/btcpayserver/status.htm index 393c36b..41039b7 100644 --- a/luasrc/view/btcpayserver/status.htm +++ b/luasrc/view/btcpayserver/status.htm @@ -5,7 +5,6 @@ local container_running = string.match(string.lower(container_status), "^up%W") -%>
-
<% if container_running then %> -- 2.38.4 From 41cdbe55b141995de3d91ebaca9605d4b40a1480 Mon Sep 17 00:00:00 2001 From: riley Date: Tue, 17 Oct 2023 17:15:38 -0400 Subject: [PATCH 2/3] More interface cleanup --- luasrc/view/btcpayserver/status.htm | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/luasrc/view/btcpayserver/status.htm b/luasrc/view/btcpayserver/status.htm index 41039b7..1a55d66 100644 --- a/luasrc/view/btcpayserver/status.htm +++ b/luasrc/view/btcpayserver/status.htm @@ -2,29 +2,21 @@ local util = require "luci.util" local container_status = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh status")) local container_running = string.match(string.lower(container_status), "^up%W") +local port = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh port")) -%>
<% if container_running then %> + <% + if port == "" then + port = "3000" + end + -%> + <% else %> <% end %>
- -<% -if container_running then - local port = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh port")) - if port == "" then - port = "3000" - end --%> -
- -
- -
-
-<% end %> -- 2.38.4 From 0e3c757ed1d0ae22c2ebb6e5176774a4a66b6b7c Mon Sep 17 00:00:00 2001 From: riley Date: Tue, 17 Oct 2023 17:55:29 -0400 Subject: [PATCH 3/3] Lil refactor --- luasrc/view/btcpayserver/status.htm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/luasrc/view/btcpayserver/status.htm b/luasrc/view/btcpayserver/status.htm index 1a55d66..800d120 100644 --- a/luasrc/view/btcpayserver/status.htm +++ b/luasrc/view/btcpayserver/status.htm @@ -3,17 +3,15 @@ local util = require "luci.util" local container_status = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh status")) local container_running = string.match(string.lower(container_status), "^up%W") local port = util.trim(util.exec("/usr/libexec/apps/btcpayserver/btcpayserver.sh port")) +if port == "" then + port = "3000" +end -%>
<% if container_running then %> - <% - if port == "" then - port = "3000" - end - -%> <% else %> -- 2.38.4