summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-07-26 20:19:02 +0200
committerGitHub <noreply@github.com>2018-07-26 20:19:02 +0200
commit9a489da90f1edeb01e88959c3092602bccf50a79 (patch)
treecbc75aa63b59cf3d797f9557ee1a7730e7368cfd
parent2519d7ee8b28936f7ff31386e3c8e08c97017f26 (diff)
parent2fd794dbc3a9026b24a606651e22d66bc60349c9 (diff)
Merge pull request #1946 from korzhyk/web_home
luci-app-transmission: Allow user to define custom web interface
-rw-r--r--applications/luci-app-transmission/luasrc/model/cbi/transmission.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/applications/luci-app-transmission/luasrc/model/cbi/transmission.lua b/applications/luci-app-transmission/luasrc/model/cbi/transmission.lua
index ec19f477b..fd4deba97 100644
--- a/applications/luci-app-transmission/luasrc/model/cbi/transmission.lua
+++ b/applications/luci-app-transmission/luasrc/model/cbi/transmission.lua
@@ -8,7 +8,7 @@ require("luci.model.ipkg")
local uci = require "luci.model.uci".cursor()
local trport = uci:get_first("transmission", "transmission", "rpc_port") or 9091
local running = (luci.sys.call("pidof transmission-daemon > /dev/null") == 0)
-local webinstalled = luci.model.ipkg.installed("transmission-web")
+local webinstalled = luci.model.ipkg.installed("transmission-web") or uci:get_first("transmission", "transmission", "web_home")
local button = ""
if running and webinstalled then
button = "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type=\"button\" value=\" " .. translate("Open Web Interface") .. " \" onclick=\"window.open('http://'+window.location.hostname+':" .. trport .. "')\"/>"
@@ -29,6 +29,7 @@ for _, p_user in luci.util.vspairs(luci.util.split(luci.sys.exec("cat /etc/passw
user:value(p_user)
end
cache_size_mb=s:option(Value, "cache_size_mb", translate("Cache size in MB"))
+web_home=s:option(Value, "web_home", translate("Custom WEB UI directory"))
bandwidth=m:section(TypedSection, "transmission", translate("Bandwidth settings"))
bandwidth.anonymous=true