luci-theme-material: do not show the message 'no password' on the login page
[project/luci.git] / themes / luci-theme-material / ucode / template / themes / material / header.ut
index 24b2c73517adf2bbd9f2be146523b32491636787..b0c48b4736b8c883381154d5d54a477c5ab5daee 100644 (file)
@@ -40,7 +40,8 @@
 <meta name="application-name" content="{{ hostname }} - LuCI">
 <meta name="apple-mobile-web-app-title" content="{{ hostname }} - LuCI">
 <link rel="stylesheet" href="{{ media }}/cascade.css">
-<link rel="shortcut icon" href="{{ media }}/favicon.ico">
+<link rel="icon" href="{{ media }}/logo_48.png" sizes="48x48">
+<link rel="icon" href="{{ media }}/logo.svg" sizes="any">
 {% if (node?.css): %}
 <link rel="stylesheet" href="{{ resource }}/{{ node.css }}">
 {% endif %}
                <div class="darkMask"></div>
                <div id="maincontent">
                        <div class="container">
-                               {% if (getuid() == 0 && getspnam('root')?.pwdp === ''): %}
-                                       <!-- no password set -->
+                               {% if (getuid() == 0 && getspnam('root')?.pwdp === '' && ctx.authsession): %}
+                                       <div class="alert-message warning">
+                                               <h4>{{ _('No password set!') }}</h4>
+                                               <p>{{ _('There is no password set on this router. Please configure a root password to protect the web interface.') }}</p>
+                                               {% if (dispatcher.lookup("admin/system/admin")): %}
+                                                 <div class="right"><a class="btn" href="{{ dispatcher.build_url("admin/system/admin") }}">{{ _('Go to password configuration...') }}</a></div>
+                                               {% endif %}
+                                       </div>
                                {% endif %}
 
                                {% if (boardinfo?.rootfs_type == "initramfs"): %}