cosmetic + do not show API url for non authenticated users since it does not play nice with HTTP authentication

This commit is contained in:
ziirish 2017-06-01 14:49:43 +02:00
parent a9203e28b7
commit 0239a2c4b4
2 changed files with 6 additions and 4 deletions

View file

@ -18,7 +18,9 @@
</p>
<p>
{% endraw %}
{% if current_user.is_authenticated -%}
{{ _('Browse the ') }}<a ng-href="{{ '{{' }} api {{ '}}' }}">API</a>&nbsp;<i class="fa fa-flask" aria-hidden="true"></i>
{% endif -%}
</p>
</div>
{% endblock %}

View file

@ -30,14 +30,14 @@
</a>
</li>
{% endif -%}
{% else -%}
{% else -%}
<li class="detail {% if clients %}active{% endif %}">
<a href="{{ url_for('view.home') }}">
<i class="fa fa-tasks" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Clients') }}</span>
</a>
</li>
{% endif -%}
{% if config.STANDALONE or server or me -%}
{% endif -%}
{% if config.STANDALONE or server or me -%}
<li class="detail {% if settings %}active{% endif %}">
<a href="{{ url_for('view.settings', server=server) }}">
<i class="fa fa-wrench" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Settings') }}</span>
@ -66,7 +66,7 @@
</li>
<li class="detail">
<a href="{{ url_for('view.logout') }}">
<i class="fa fa-sign-out" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Logout') }}{% if 'login' in session %}&nbsp;<small>({{ session['login'] }})</small>{% endif %}</span>
<i class="fa fa-sign-out" aria-hidden="true"></i><span class="dtl">&nbsp;{{ _('Logout') }}&nbsp;<small>({{ current_user.name }})</small></span>
</a>
</li>
{% endif -%}