You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.7 KiB
Lua

1 year ago
--[[
LuCI - Lua Configuration Interface
]]--
local taskd = require "luci.model.tasks"
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("Get Virtual Desktops of all flavors, Alpine, Ubuntu, Fedora, and Arch based containers containing full desktop environments in officially supported versions accessible via any modern web browser.")
.. translate("Official website:") .. ' <a href=\"https://docs.linuxserver.io/images/docker-btcpayserver\" target=\"_blank\">hhttps://docs.linuxserver.io/images/docker-btcpayserver/</a>')
s = m:section(SimpleSection, translate("Service Status"), translate("btcpayserver 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:"))
s.addremove=false
s.anonymous=true
o = s:option(Value, "port", translate("Port").."<b>*</b>")
o.rmempty = false
o.default = "8888"
o.datatype = "port"
o = s:option(Value, "image_name", translate("Lightning").."<b>*</b>")
o.rmempty = false
o.datatype = "string"
o:value("clightning", "clightning")
o:value("lnd", "lnd")
o.default = "clightning"
local blocks = btcpayserver_model.blocks()
local home = btcpayserver_model.home()
o = s:option(Value, "config_path", translate("Network").."<b>*</b>")
o.rmempty = false
o.datatype = "string"
o:value("mainnet", "mainnet")
o:value("testnet", "testnet")
o.default = "mainnet"
local paths, default_path = btcpayserver_model.find_paths(blocks, home, "Configs")
for _, val in pairs(paths) do
o:value(val, val)
end
o.default = default_path
return m