🎉 Improved session management system and logs organization 🎨

This commit is contained in:
2025-06-13 07:05:57 +02:00
parent 3ff5f17f42
commit ae95d82afc
81 changed files with 950 additions and 11 deletions

View File

@ -187,7 +187,7 @@
<!-- Desktop Navigation -->
{% if current_user.is_authenticated %}
<div class="hidden lg:flex items-center space-x-1 flex-1 justify-center mx-8">
{% set current_route = request.endpoint %}
{% set current_route = request.endpoint or '' %}
<a href="{{ url_for('dashboard') }}"
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route == 'dashboard' else '' }}">
@ -226,20 +226,20 @@
</a>
<a href="{{ url_for('tapo.tapo_dashboard') }}"
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if 'tapo' in current_route else '' }}">
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route and 'tapo' in current_route else '' }}">
<i class="fas fa-plug mr-2"></i>
<span>Smart Plugs</span>
</a>
<a href="{{ url_for('guest.guest_request_form') }}"
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if 'guest' in current_route else '' }}">
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route and 'guest' in current_route else '' }}">
<i class="fas fa-user-plus mr-2"></i>
<span>Gast</span>
</a>
{% if current_user.is_admin %}
<a href="{{ url_for('admin.admin_dashboard') }}"
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if 'admin' in current_route else '' }}">
class="nav-item flex items-center px-4 py-2 rounded-lg text-sm font-medium hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route and 'admin' in current_route else '' }}">
<i class="fas fa-cog mr-2"></i>
<span>Admin</span>
</a>
@ -339,7 +339,7 @@
{% if current_user.is_authenticated %}
<div class="space-y-1">
{% set current_route = request.endpoint %}
{% set current_route = request.endpoint or '' %}
<a href="{{ url_for('dashboard') }}"
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route == 'dashboard' else '' }}">
@ -378,20 +378,20 @@
</a>
<a href="{{ url_for('tapo.tapo_dashboard') }}"
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if 'tapo' in current_route else '' }}">
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route and 'tapo' in current_route else '' }}">
<i class="fas fa-plug w-5 mr-3"></i>
Smart Plugs
</a>
<a href="{{ url_for('guest.guest_request_form') }}"
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if 'guest' in current_route else '' }}">
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route and 'guest' in current_route else '' }}">
<i class="fas fa-user-plus w-5 mr-3"></i>
Gast-Anfrage
</a>
{% if current_user.is_admin %}
<a href="{{ url_for('admin.admin_dashboard') }}"
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if 'admin' in current_route else '' }}">
class="flex items-center px-3 py-2 rounded-lg hover:bg-white/10 dark:hover:bg-black/10 {{ 'nav-active' if current_route and 'admin' in current_route else '' }}">
<i class="fas fa-cog w-5 mr-3"></i>
Admin
</a>