Show Settings button when auth is diabled

This commit is contained in:
Daniel Markstedt 2023-12-02 17:16:25 +09:00
parent f4e782fe20
commit a48a4429b1
2 changed files with 22 additions and 40 deletions

View File

@ -282,18 +282,6 @@ div.header div.login-form-title {
display: none;
}
div.header div.authentication-disabled span.separator {
display: none;
}
div.header div.authentication-disabled span.wiki-help-text {
display: block;
}
div.header div.authentication-disabled a {
color: #fff;
}
@media (max-width: 900px) {
div.header {
flex-wrap: wrap;

View File

@ -27,13 +27,14 @@
<body class="{{ body_classes|join(' ') }}">
<div class="header">
{% if env["auth_active"] %}
{% if env["logged_in"] %}
{% if env["logged_in"] or not env["auth_active"] %}
<div align="center" class="login-status logged-in">
{% if env["logged_in"] %}
<span class="logged-in-as-text">{{ _("Logged in as <em>%(username)s</em>", username=env["username"]) }}</span>
<span class="separator">-</span>
<span class="log-out-button"><a href="/logout">{{ _("Log Out") }}</a></span>
<span class="separator">-</span>
{% endif %}
<span class="admin-button"><a href="/sys/admin">{{ _("Settings") }}</a></span>
</div>
{% else %}
@ -52,13 +53,6 @@
</form>
</div>
{% endif %}
{% else %}
<div align="center" class="login-status authentication-disabled">
<span class="authentication-disabled-text">{{ _("Web Interface Authentication Disabled") }}</span>
<span class="separator">-</span>
<span class="wiki-help-text">{{ _("See <a href=\"%(url)s\" target=\"_blank\">Wiki</a> for more information", url="https://github.com/PiSCSI/piscsi/wiki/Web-Interface#enable-authentication") }}</span>
</div>
{% endif %}
<div align="center" class="title">
<a href="/">