Skip to content

Commit ef46cd1

Browse files
Update dashboard.html
1 parent 0d82c95 commit ef46cd1

File tree

1 file changed

+31
-24
lines changed

1 file changed

+31
-24
lines changed

app/templates/dashboard.html

Lines changed: 31 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,49 @@
22

33
{% block content %}
44
<div class="container">
5-
<div class="settings">
6-
<h3>2FA Settings</h3>
7-
<p>Two-Factor Authentication: <strong>{{ 'Enabled' if current_user.totp_enabled else 'Disabled' }}</strong></p>
8-
<button onclick="toggle2FA()">{{ 'Disable' if current_user.totp_enabled else 'Enable' }} 2FA</button>
5+
<div class="dashboard-header">
6+
<h2>Email Forwarders for {{ domain }}</h2>
7+
<div class="header-actions">
8+
<button class="btn-refresh" onclick="loadForwarders()">Refresh</button>
9+
{% if not current_user.totp_enabled %}
10+
<button class="btn-secondary" onclick="window.location.href='/setup-2fa'">Enable 2FA</button>
11+
{% else %}
12+
<button class="btn-secondary btn-success">2FA Enabled ✓</button>
13+
{% endif %}
14+
</div>
915
</div>
1016

11-
<div class="forwarder-create">
12-
<h2>Create Email Forwarder for {{ domain }}</h2>
17+
<div class="card">
18+
<h3>Create New Forwarder</h3>
1319
<form id="createForwarderForm">
1420
<div class="form-group">
15-
<label for="alias">Alias</label>
16-
<input type="text" id="alias" name="alias" required>
17-
<span>@{{ domain }}</span>
21+
<label for="alias">Email Alias</label>
22+
<div class="input-with-domain">
23+
<input type="text" id="alias" name="alias" required placeholder="alias">
24+
<span>@{{ domain }}</span>
25+
</div>
1826
</div>
27+
1928
<div class="form-group">
20-
<label for="destination">Destination</label>
21-
<select id="destination" name="destination" required>
29+
<label for="destination">Forward To</label>
30+
<select id="destination" name="destination" required onchange="toggleCustomEmail()">
2231
<option value="">Loading email accounts...</option>
2332
</select>
33+
34+
<div id="customEmailGroup" style="display: none; margin-top: 10px;">
35+
<input type="email" id="customEmail" placeholder="Enter custom email address" class="custom-email-input">
36+
</div>
2437
</div>
25-
<button type="submit">Create Forwarder</button>
26-
</form>
27-
</div>
2838

29-
<div class="forwarders-list">
30-
<h2>Existing Forwarders</h2>
31-
<div id="forwardersList">Loading...</div>
39+
<button type="submit" class="btn-primary">Create Forwarder</button>
40+
</form>
3241
</div>
33-
</div>
3442

35-
<div id="qrModal" class="modal" style="display: none;">
36-
<div class="modal-content">
37-
<h3>Scan QR Code with Authenticator App</h3>
38-
<div id="qrCode"></div>
39-
<p>Secret: <code id="totpSecret"></code></p>
40-
<button onclick="closeModal()">Close</button>
43+
<div class="card">
44+
<h3>Existing Forwarders</h3>
45+
<div id="forwardersList" class="forwarders-list">
46+
<div class="loading">Loading forwarders...</div>
47+
</div>
4148
</div>
4249
</div>
4350
{% endblock %}

0 commit comments

Comments
 (0)