set master pwd al primo lancio - ruoli

This commit is contained in:
2025-02-02 16:35:34 +01:00
parent e3ae8300f1
commit 2d172a3620
16 changed files with 174 additions and 168 deletions

View File

@@ -1,8 +1,8 @@
{% load static %}
<header class="d-flex align-items-center justify-content-between bg-dark text-white py-3 px-4 sticky-top z-40">
<header class="d-flex align-items-center justify-content-between bg-secondary text-white py-1 px-4 sticky-top z-40">
<div>
<a class="d-flex align-items-center gap-2 text-decoration-none text-white" href="/">
<img class="h-6" src="{% static 'images/ase-logo.png' %}" alt="ASE" height="40"/>
<img class="h-6" src="{% static 'images/ase-logo.png' %}" alt="ASE" height="30"/>
<span class="text-lg fw-bold">MQTT User Management</span>
</a>
</div>
@@ -14,13 +14,17 @@
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle d-flex align-items-center gap-2 text-white" href="#" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<img class="h-8 w-8 rounded-circle object-cover" src="{{ request.user.profile.avatar }}" alt="Avatar" height="40"/>
<img class="h-8 w-8 rounded-circle object-cover" src="{{ request.user.profile.avatar }}" alt="Avatar" height="30"/>
{{ request.user.profile.name }}
</a>
<ul class="dropdown-menu dropdown-menu-end shadow-lg" style="min-width: 200px;">
<li><a class="dropdown-item" href="{% url 'profile' %}">My Profile</a></li>
<li><a class="dropdown-item" href="{% url 'profile-edit' %}">Edit Profile</a></li>
<li><a class="dropdown-item" href="{% url 'profile-settings' %}">Settings</a></li>
{% if request.user.is_superuser %}
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="{% url 'admin:index' %}">Site Admin</a></li>
{% endif %}
<li><hr class="dropdown-divider" /></li>
<li><a class="dropdown-item" href="{% url 'account_logout' %}">Log Out</a></li>
</ul>

View File

@@ -3,7 +3,7 @@
<div>
{% for message in messages %}
<div
class="position-fixed top-0 start-50 translate-middle-x mt-3 z-50"
class="position-fixed top-10 start-50 translate-middle-x mt-3 z-30"
style="width: 100%; max-width: 576px"
>
<div