luci-theme-argon/luasrc/view/themes/argon/out_header_login.htm
Giovanni Giacobbi 147b362334
Removed install scripts hacks as they are no longer needed
- The default 'postinst' from 'luci.mk' is sufficient for what we need, also updated the 'uci-default' to a standard version
- Hack about 'header_login' is replaced with adding 'out_header_login' directly from the sysauth template
- Also added specialized 'out_footer_login' and 'footer_login' for symmetric reasons
- Synced 'out_header_login.htm' with current LuCI 'header.htm'

Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
2021-01-21 11:13:38 +01:00

39 lines
1.5 KiB
HTML

<%#
Copyright 2008 Steven Barth <steven@midlink.org>
Copyright 2008-2019 Jo-Philipp Wich <jo@mein.io>
Licensed to the public under the Apache License 2.0.
-%>
<%
if not luci.dispatcher.context.template_header_sent then
include("themes/" .. theme .. "/header_login")
luci.dispatcher.context.template_header_sent = true
end
local applyconf = luci.config and luci.config.apply
%>
<script type="text/javascript" src="<%=resource%>/promis.min.js"></script>
<script type="text/javascript" src="<%=resource%>/luci.js"></script>
<script type="text/javascript">
L = new LuCI(<%= luci.http.write_json({
token = token,
media = media,
resource = resource,
scriptname = luci.http.getenv("SCRIPT_NAME"),
pathinfo = luci.http.getenv("PATH_INFO"),
documentroot = luci.http.getenv("DOCUMENT_ROOT"),
requestpath = luci.dispatcher.context.requestpath,
dispatchpath = luci.dispatcher.context.path,
pollinterval = luci.config.main.pollinterval or 5,
ubuspath = luci.config.main.ubuspath or '/ubus/',
sessionid = luci.dispatcher.context.authsession,
nodespec = luci.dispatcher.context.dispatched,
apply_rollback = math.max(applyconf and applyconf.rollback or 90, 90),
apply_holdoff = math.max(applyconf and applyconf.holdoff or 4, 1),
apply_timeout = math.max(applyconf and applyconf.timeout or 5, 1),
apply_display = math.max(applyconf and applyconf.display or 1.5, 1),
rollback_token = rollback_token
}) %>);
</script>