{% extends "base.html" %} {% block title %}Dashboard - AuthKit Admin{% endblock %} {% block extra_css %} /* Metrics Grid Layout */ .metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2.5rem; } .metric-card { display: flex; align-items: center; gap: 1.25rem; border-radius: 12px; } .metric-icon { width: 48px; height: 48px; border-radius: 10px; background: rgba(139, 92, 246, 0.15); display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: var(--accent-purple); border: 1px solid rgba(139, 92, 246, 0.2); } .metric-info h3 { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.25rem; } .metric-info p { font-size: 1.75rem; font-weight: 700; } /* User management list and tables */ .dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; } .dashboard-title { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; } .table-wrapper { overflow-x: auto; margin-bottom: 3rem; } table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.9rem; } th { padding: 1rem 1.5rem; color: var(--text-secondary); font-weight: 600; border-bottom: 1px solid var(--border-color); background: rgba(0, 0, 0, 0.15); } td { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border-color); vertical-align: middle; } tr:hover td { background: rgba(255, 255, 255, 0.015); } /* Switches & Badges */ .badge { padding: 0.25rem 0.5rem; border-radius: 4px; font-size: 0.75rem; font-weight: 600; } .badge-verified { background: rgba(16, 185, 129, 0.1); color: var(--accent-success); border: 1px solid rgba(16, 185, 129, 0.2); } .badge-unverified { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); border: 1px solid rgba(245, 158, 11, 0.2); } /* Role Dropdown Select custom design */ .role-select { background: rgba(0, 0, 0, 0.3); border: 1px solid var(--border-color); padding: 0.35rem 0.75rem; border-radius: 6px; font-size: 0.85rem; width: auto; cursor: pointer; } /* Toggle Switch Styling */ .switch { position: relative; display: inline-block; width: 44px; height: 24px; } .switch input { opacity: 0; width: 0; height: 0; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: rgba(255, 255, 255, 0.1); border: 1px solid var(--border-color); transition: .3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 34px; } .slider:before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: white; transition: .3s cubic-bezier(0.4, 0, 0.2, 1); border-radius: 50%; } input:checked + .slider { background: var(--primary-glow); border-color: transparent; } input:checked + .slider:before { transform: translateX(20px); } /* Delete Button */ .btn-delete { background: rgba(239, 68, 68, 0.1); color: var(--accent-danger); border: 1px solid rgba(239, 68, 68, 0.2); padding: 0.35rem 0.75rem; border-radius: 6px; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; } .btn-delete:hover { background: var(--accent-danger); color: white; } .btn-revoke { background: rgba(245, 158, 11, 0.1); color: var(--accent-warning); border: 1px solid rgba(245, 158, 11, 0.2); padding: 0.35rem 0.75rem; border-radius: 6px; cursor: pointer; font-size: 0.8rem; transition: all 0.2s; } .btn-revoke:hover { background: var(--accent-warning); color: black; } {% endblock %} {% block content %}
👥

Total Users

{{ stats.total_users }}

âš¡

Active Users

{{ stats.active_users }}

🔒

Active Sessions

{{ stats.active_sessions }}

User Database

{% for u in users %} {% endfor %}
Email Address Created At Role Status Actions
{{ u.email }} {% if u.is_verified %} Verified {% else %} Unverified {% endif %} {{ u.created_at.strftime('%Y-%m-%d %H:%M') }}

Active Device Sessions

{% if not sessions %} {% endif %} {% for s in sessions %} {% endfor %}
User IP Address User Agent Expires At Action
No active sessions found.
{{ s.user.email }} {{ s.ip_address or 'Unknown' }}
{{ s.user_agent or 'Unknown' }}
{{ s.expires_at.strftime('%Y-%m-%d %H:%M') }}
{% endblock %} {% block extra_js %} {% endblock %}