themes: render menu even when not logged in
authorJo-Philipp Wich <jo@mein.io>
Sat, 25 Jan 2020 22:28:24 +0000 (23:28 +0100)
committerJo-Philipp Wich <jo@mein.io>
Sat, 25 Jan 2020 22:28:24 +0000 (23:28 +0100)
Ref: #3563
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
themes/luci-theme-bootstrap/luasrc/view/themes/bootstrap/json-menu.htm
themes/luci-theme-material/luasrc/view/themes/material/header.htm
themes/luci-theme-openwrt/luasrc/view/themes/openwrt.org/header.htm

index b38406f65aeb38a24475cc5b4ba383edcc9bd318..9d58ba2dba0f4d8a87d079617cf9a632d0f820a5 100644 (file)
@@ -99,7 +99,7 @@
                }
 
                document.addEventListener('luci-loaded', function(ev) {
-                       var tree = <%= luci.http.write_json(luci.dispatcher.context.authsession and luci.dispatcher.menu_json() or {}) %>,
+                       var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or {}) %>,
                            node = tree,
                            url = '';
 
index 5595b14e49ac243341963e71ce17e9586d4e1731..7541d048c00c98bd703cc9eb2d2272edb3bb6327 100644 (file)
                        }
 
                        document.addEventListener('luci-loaded', function(ev) {
-                               var tree = <%= luci.http.write_json(luci.dispatcher.context.authsession and luci.dispatcher.menu_json() or {}) %>,
+                               var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or {}) %>,
                                    node = tree,
                                    url = '';
 
index 9754e8b61203dbe255ea57d0868941735133b7bc..a5e64cac5aa0f1c0f5e9152be87ca23768eb2b53 100644 (file)
                }
 
                document.addEventListener('luci-loaded', function(ev) {
-                       var tree = <%= luci.http.write_json(luci.dispatcher.context.authsession and luci.dispatcher.menu_json() or {}) %>,
+                       var tree = <%= luci.http.write_json(luci.dispatcher.menu_json() or {}) %>,
                            node = tree,
                            url = '';