cookie value

This commit is contained in:
Mateusz Gruszczyński
2025-07-03 22:52:09 +02:00
parent b48d702aca
commit 84d902deb1
4 changed files with 19 additions and 9 deletions

View File

@ -20,12 +20,15 @@
🛒 Live <span class="text-warning">Lista</span> Zakupów
</a>
{% if current_user.is_authenticated %}
<span class="mx-auto text-white">Zalogowany jako: <strong>{{ current_user.username }}</strong></span>
{% else %}
<span class="mx-auto text-white">Przeglądasz jako <strong>gość</strong></span>
{% if has_authorized_cookie %}
{% if current_user.is_authenticated %}
<span class="mx-auto text-white">Zalogowany jako: <strong>{{ current_user.username }}</strong></span>
{% else %}
<span class="mx-auto text-white">Przeglądasz jako <strong>gość</strong></span>
{% endif %}
{% endif %}
<div class="d-flex align-items-center gap-2">
{% if current_user.is_authenticated and current_user.is_admin %}
<a href="{{ url_for('admin_panel') }}" class="btn btn-outline-warning btn-sm">⚙️ Panel admina</a>