Files
bourbonacci/frontend/admin.html
T
derekcandClaude Opus 5.5 6272322f31 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]>
2026-11-23 00:24:19 -08:00

55 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Admin — Bourbonacci</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>🥃</text></svg>" />
<link rel="stylesheet" href="/css/style.css" />
</head>
<body>
<nav>
<div class="nav-left">
<span class="nav-brand">🥃 Bourbonacci — Admin</span>
</div>
<div class="nav-user">
<button onclick="Admin.signOut()" class="btn btn-sm btn-ghost">Sign out</button>
</div>
</nav>
<main>
<div class="tabs">
<div class="tab" data-tab="users" onclick="Admin.showTab('users')">Users</div>
<div class="tab" data-tab="notifications" onclick="Admin.showTab('notifications')">Notifications</div>
<div class="tab" data-tab="backups" onclick="Admin.showTab('backups')">Backups</div>
<div class="tab" data-tab="reset" onclick="Admin.showTab('reset')">Reset</div>
</div>
<div id="tab-content"></div>
<!-- Delete user confirmation modal -->
<div id="delete-modal" class="modal-overlay" style="display:none">
<div class="modal-box">
<h2>Delete User</h2>
<p style="margin-bottom:1rem;color:var(--cream-dim)">
This permanently deletes <strong id="delete-email"></strong>'s account and every entry they own.
This cannot be undone. Type the email address to confirm.
</p>
<div id="delete-msg"></div>
<div class="form-group">
<input type="text" id="delete-confirm" autocomplete="off" oninput="Admin.onDeleteConfirmInput()" />
</div>
<div style="display:flex;gap:0.5rem;justify-content:flex-end">
<button class="btn btn-ghost" onclick="Admin.hideDeleteModal()">Cancel</button>
<button class="btn btn-danger" id="delete-submit" disabled onclick="Admin.submitDelete()">Delete permanently</button>
</div>
</div>
</div>
</main>
<script src="/js/api.js"></script>
<script src="/js/admin.js?v=2"></script>
</body>
</html>