feat(admin): rebuild admin panel as out-of-band login with backups
- Separate admin login (ADMIN_USERNAME/ADMIN_PASSWORD) with its own JWT, no longer a seeded user account; lockout after 5 failed attempts - Admin panel tabs: Users, Notifications, Backups, Reset - Ntfy settings moved from .env/compose into admin_settings (token encrypted) - Scheduled and on-demand mariadb-dump backups to NFS volume, with restore (entries only or all) and retention pruning - Reset all entries, guarded by an automatic safety backup - Remove user impersonation and the admin link in the user nav - Login page falls back to admin login; nginx sends Cache-Control: no-cache Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
c54d2b251f
commit
6272322f31
28 files changed
+1523
-461
No files matched your search
+19
-16
@@ -81,20 +81,6 @@ nav {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.nav-impersonating {
|
||||
color: var(--amber-light);
|
||||
font-size: 0.85rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.btn-amber {
|
||||
background: var(--amber);
|
||||
color: #0d0800;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-amber:hover { background: var(--amber-light); }
|
||||
|
||||
/* ---- Modal ---- */
|
||||
.modal-overlay {
|
||||
position: fixed;
|
||||
@@ -140,8 +126,6 @@ nav {
|
||||
}
|
||||
|
||||
/* ---- Admin badges ---- */
|
||||
.badge-admin { background: rgba(200,134,10,.2); color: var(--amber-light); border: 1px solid var(--amber-dim); }
|
||||
.badge-user { background: rgba(245,230,200,.1); color: var(--cream-dim); border: 1px solid var(--border); }
|
||||
.badge-active { background: rgba(39,174,96,.15); color: #5dd490; border: 1px solid #1e6b3d; }
|
||||
.badge-disabled { background: rgba(192,57,43,.2); color: #e07060; border: 1px solid var(--danger-dim); }
|
||||
|
||||
@@ -475,6 +459,25 @@ tbody td {
|
||||
.tab.active, .tab:hover { color: var(--amber-light); }
|
||||
.tab.active { border-bottom-color: var(--amber); }
|
||||
|
||||
/* ---- Admin panel ---- */
|
||||
.admin-card { margin-bottom: 1.5rem; }
|
||||
.card + .admin-card { margin-top: 0; }
|
||||
.admin-muted { color: var(--cream-dim); font-size: .85rem; margin-bottom: 1rem; }
|
||||
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 1rem; }
|
||||
.admin-check { display: flex; align-items: center; gap: .5rem; color: var(--cream); margin-bottom: 1rem; cursor: pointer; }
|
||||
.admin-check input { width: auto; }
|
||||
.admin-confirm { display: flex; gap: .5rem; align-items: center; }
|
||||
.admin-confirm input { max-width: 220px; padding: .4rem .7rem; font-size: .85rem; }
|
||||
.admin-file { padding: 1rem; margin-bottom: .75rem; }
|
||||
.admin-file .admin-muted { margin-bottom: 0; }
|
||||
.admin-file-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
|
||||
.admin-restore { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: .75rem; }
|
||||
.admin-restore label, .admin-card label code { font-size: .8rem; }
|
||||
.temp-pw { display: flex; gap: .75rem; align-items: center; background: rgba(200,134,10,.12); border: 1px solid var(--amber-dim); border-radius: var(--radius); padding: .5rem .75rem; font-size: .85rem; color: var(--amber-light); }
|
||||
.temp-pw code { font-size: .95rem; color: var(--cream); }
|
||||
.text-success { color: #5dd490; }
|
||||
.text-danger { color: #e07060; }
|
||||
|
||||
/* ---- Custom scrollbar ---- */
|
||||
::-webkit-scrollbar { width: 8px; }
|
||||
::-webkit-scrollbar-track { background: var(--bg-card); }
|
||||
|
||||
Reference in new issue
Block a user