separate account settings from shop settings
All checks were successful
deploy / deploy (push) Successful in 3m28s

- Create dedicated /admin/account page for user account management
- Move email, password, and 2FA settings from /admin/settings
- Add Account link to top of admin sidebar navigation
- Add TOTP-based two-factor authentication with NimbleTOTP
- Add TOTP verification LiveView for login flow
- Add AccountController for TOTP session management
- Remove Advanced section from settings (duplicated in dev tools)
- Remove user email from sidebar footer (replaced by Account link)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-08 18:42:29 +00:00
parent 0c2d4ac406
commit 32cc425458
21 changed files with 1396 additions and 308 deletions

View File

@@ -1208,6 +1208,105 @@
overflow-x: auto;
}
.admin-info-box .admin-btn-primary {
color: var(--t-text-inverse);
}
/* ── TOTP / 2FA ── */
.admin-totp-setup {
display: flex;
flex-direction: column;
gap: 1.25rem;
align-items: center;
text-align: center;
}
.admin-totp-qr {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
}
.admin-qr-code {
padding: 1rem;
background: white;
border-radius: 0.5rem;
box-shadow: 0 1px 3px rgb(0 0 0 / 0.1);
}
.admin-qr-code svg {
display: block;
width: 180px;
height: 180px;
}
.admin-totp-divider {
display: flex;
align-items: center;
gap: 0.75rem;
width: 100%;
color: var(--admin-text-muted);
font-size: 0.8125rem;
&::before,
&::after {
content: "";
flex: 1;
height: 1px;
background: var(--admin-border);
}
}
.admin-totp-copy {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.5rem;
width: 100%;
}
.admin-copy-field {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem;
background: var(--admin-bg-secondary);
border-radius: 0.375rem;
max-width: 100%;
}
.admin-copy-field code {
font-size: 0.8125rem;
word-break: break-all;
}
.admin-backup-codes {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 0.5rem;
margin-top: 1rem;
}
.admin-backup-code {
padding: 0.375rem 0.75rem;
background: white;
border-radius: 0.25rem;
font-family: ui-monospace, monospace;
font-size: 0.875rem;
text-align: center;
letter-spacing: 0.05em;
}
.admin-dl-compact {
font-size: 0.8125rem;
}
.admin-dl-compact .admin-dl-row {
padding-block: 0.25rem;
}
/* ── Link variants ── */
.admin-link-danger {