GithubHelp home page GithubHelp logo

Comments (4)

hnyman avatar hnyman commented on August 23, 2024

The issue is apparently using the existence of ";" in the URL to sniff if the user is logged in or still at the login screen. In the new scheme there is no ";" in the URL, so Material gets it wrong.
https://github.com/LuttyYang/luci-theme-material/blob/master/files/htdocs/js/script.js#L147

I made a small patch in a live router to /www/luci-static/material/js/script.js . I eliminated the sniffing for ";". This works for me otherwise ok, but there is an empty left menu visible at the login screen:

root@OpenWrt:/usr/lib/lua/luci# diff /rom/www/luci-static/material/js/script.js
/www/luci-static/material/js/script.js
--- /rom/www/luci-static/material/js/script.js
+++ /www/luci-static/material/js/script.js
@@ -145,9 +145,6 @@
         var ret = false;
         var getUrlNode = function (href){
             var linkPos = href.indexOf(";");
-            if (linkPos == -1){
-                return "login";
-            }else{
                 linkPos = href.indexOf("/", linkPos);
                 if (linkPos == -1){
                     return "overview";
@@ -158,7 +155,6 @@
                     else
                         return link;
                 }
-            }
         };

         var currentNode = getUrlNode(window.location.pathname);

from luci-theme-material.

hnyman avatar hnyman commented on August 23, 2024

Jow implemented a fix at the Openwrt Luci repo:
openwrt/luci@f9e590a

from luci-theme-material.

LuttyYang avatar LuttyYang commented on August 23, 2024

I'm busy these days, forgive me for not fixing it in time.

I will merger it latter, thanks

from luci-theme-material.

LuttyYang avatar LuttyYang commented on August 23, 2024

I fix it in version 0.2.13, I created a PR to fix it.

from luci-theme-material.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.