Main page does not require login. Fixed login redirection

This commit is contained in:
2018-12-01 17:37:33 +01:00
parent 84f37a8780
commit 8abd54e9d2
2 changed files with 7 additions and 2 deletions
+6
View File
@@ -46,10 +46,16 @@
{% endfor%}
</div>
<div class="user-card">
{% if current_user.is_authenticated %}
<img src="{{url_for('static', filename=current_user.name + '.png')}}">
{% endif %}
<div class="user-info">
{% if current_user.is_authenticated %}
<span>{{current_user.name}}</span>
<div class="rect-button" onclick="location.href='/logout';" style="background-color: #EE7500;">LOGOUT</div>
{% else %}
<div class="rect-button" onclick="location.href='/login';" style="background-color: #EE7500;">LOGIN</div>
{% endif %}
</div>
</div>
</div>