06/05 Optimize app: add email notification
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
<tr>
|
||||
<td>
|
||||
<span style="display:inline-block;width:8px;height:8px;border-radius:2px;background:{{ row.color }};margin-right:6px;"></span>
|
||||
{{ row.icon }} {{ row.name }}
|
||||
<i class="bi {{ row.icon }}" style="color:{{ row.color }};"></i> {{ row.name }}
|
||||
</td>
|
||||
<td class="text-end mono">{{ row.this_month | currency }}</td>
|
||||
<td class="text-end mono text-muted">{{ row.last_month | currency }}</td>
|
||||
|
||||
@@ -43,6 +43,36 @@
|
||||
<small class="text-muted" style="font-size:11px;">AI model used for chat and daily insights.</small>
|
||||
</div>
|
||||
|
||||
<hr style="border-color:var(--border);">
|
||||
|
||||
<div class="mb-3">
|
||||
<div class="form-label fw-medium" style="font-size:13px;">Budget Alerts</div>
|
||||
<div class="form-check">
|
||||
{{ form.budget_alerts_enabled(class="form-check-input") }}
|
||||
{{ form.budget_alerts_enabled.label(class="form-check-label", style="font-size:13px;") }}
|
||||
</div>
|
||||
{% if smtp_ok %}
|
||||
<small class="text-muted" style="font-size:11px;">
|
||||
<i class="bi bi-check-circle-fill text-success me-1"></i>SMTP configured — alerts will go to <strong>{{ alert_email }}</strong>
|
||||
</small>
|
||||
{% else %}
|
||||
<small class="text-danger" style="font-size:11px;">
|
||||
<i class="bi bi-exclamation-circle me-1"></i>SMTP not configured — set SMTP_HOST, SMTP_USER, SMTP_PASSWORD, ALERT_EMAIL in .env to enable emails.
|
||||
</small>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if smtp_ok %}
|
||||
<div class="mb-4">
|
||||
<form method="POST" action="{{ url_for('settings.test_email') }}" style="display:inline;">
|
||||
{{ form.hidden_tag() }}
|
||||
<button type="submit" class="btn btn-sm btn-outline-secondary" style="font-size:12px;">
|
||||
<i class="bi bi-envelope me-1"></i>Send Test Email
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{{ form.submit(class="btn btn-primary") }}
|
||||
<a href="{{ url_for('settings.password') }}" class="btn btn-outline-secondary ms-2">Change Password</a>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user