summaryrefslogtreecommitdiffhomepage
path: root/themes/luci-theme-material/luasrc/view
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2015-10-22 21:07:40 +0200
committerJo-Philipp Wich <jow@openwrt.org>2015-10-22 21:08:22 +0200
commitf9e590aa4741bf337029be3f374a33543cc3f37b (patch)
treee555ea583b6f88262b728dc4c30b7ae43ec98071 /themes/luci-theme-material/luasrc/view
parent6c4341ee012b1c946f63a39d5b9a4e5b0abc1f75 (diff)
luci-theme-material: do not infer login state from url (#520)
Checking for `;` in the url is no good indicator whether a user is logged in, instead query the dispatcher and set a `logged-in` CSS class on the `<body>` element if a session exists. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'themes/luci-theme-material/luasrc/view')
-rwxr-xr-xthemes/luci-theme-material/luasrc/view/themes/material/header.htm2
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/luci-theme-material/luasrc/view/themes/material/header.htm b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
index 99afc065b3..153be101a5 100755
--- a/themes/luci-theme-material/luasrc/view/themes/material/header.htm
+++ b/themes/luci-theme-material/luasrc/view/themes/material/header.htm
@@ -135,7 +135,7 @@
<script src="<%=resource%>/xhr.js"></script>
</head>
-<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %>">
+<body class="lang_<%=luci.i18n.context.lang%> <%- if node then %><%= striptags( node.title ) %><%- end %> <% if luci.dispatcher.context.authsession then %>logged-in<% end %>">
<header>
<div class="container">