06/03 Optimize app

This commit is contained in:
2026-06-03 16:06:30 -04:00
parent 4af31a611e
commit ec1c0fc7c1
14 changed files with 447 additions and 12 deletions
+41
View File
@@ -61,6 +61,47 @@
</div>
</div>
<!-- Two-Factor Authentication -->
<div class="row g-3 mt-1">
<div class="col-12 col-md-6">
<div class="pcard h-100">
<div class="d-flex align-items-center gap-2 mb-3">
<i class="bi bi-shield-lock-fill" style="font-size:1.3rem;color:#5b21b6;"></i>
<span class="pcard-title mb-0">Two-Factor Authentication (2FA)</span>
{% if current_user.totp_enabled %}
<span class="badge ms-auto" style="background:#d1fae5;color:#065f46;font-size:11px;">Enabled</span>
{% else %}
<span class="badge ms-auto" style="background:#fee2e2;color:#991b1b;font-size:11px;">Disabled</span>
{% endif %}
</div>
{% if current_user.totp_enabled %}
<p style="font-size:13px;color:var(--muted);">
2FA is active. Each login requires a 6-digit code from your authenticator app.
</p>
<form method="POST" action="{{ url_for('auth.totp_disable') }}"
onsubmit="return confirm('Disable two-factor authentication?\nYou will only need a password to log in.')">
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
<div class="mb-2">
<input type="password" name="password" class="form-control form-control-sm"
placeholder="Confirm your password" required style="max-width:280px;">
</div>
<button type="submit" class="btn btn-sm btn-outline-danger">
<i class="bi bi-shield-x me-1"></i>Disable 2FA
</button>
</form>
{% else %}
<p style="font-size:13px;color:var(--muted);">
Protect your account with a time-based one-time password (TOTP).
Use Google Authenticator, Authy, or any compatible app.
</p>
<a href="{{ url_for('auth.totp_setup') }}" class="btn btn-sm btn-outline-primary">
<i class="bi bi-shield-plus me-1"></i>Enable 2FA
</a>
{% endif %}
</div>
</div>
</div>
<!-- Maintenance + Email Alerts -->
<div class="row g-3 mt-1">
<div class="col-12 col-md-6">