7cac910de4
Add the mail, notifications, and broadcast pages over the mail, notification,
and diplomail services (no new business logic), completing the operator console.
- GET /_gm/mail deliveries (paginated) + dead-letters
- GET /_gm/mail/deliveries/{id} delivery detail + attempts
- POST /_gm/mail/deliveries/{id}/resend re-enqueue a non-sent delivery
- GET /_gm/notifications notifications + dead-letters + malformed
- GET/POST /_gm/broadcast multi-game admin diplomatic broadcast
Console depends on MailAdmin / NotificationAdmin / DiplomailAdmin interfaces
(satisfied by the concrete services); pages render in tests without a database.
Delivery detail and dead-letters live under /_gm/mail/deliveries/* and
/_gm/mail/... static segments to avoid a param/static route conflict. Resend
and broadcast flow through the CSRF guard.
Tests: mail page, delivery detail (+ not-found), resend (+ bad-CSRF),
notifications overview, broadcast form + send (input assertions) + bad game
ids, and unavailable. Plus an integration test that drives /_gm end to end
through the real gateway → backend (401 challenge + authenticated dashboard).
Docs: backend/docs/admin-console.md page inventory completed.
104 lines
3.9 KiB
CSS
104 lines
3.9 KiB
CSS
/* Admin console stylesheet. Deliberately small and dependency-free: the
|
|
console is an internal operator tool, not a public surface. */
|
|
:root {
|
|
--bg: #11151c;
|
|
--panel: #1b2230;
|
|
--panel-hi: #232c3d;
|
|
--ink: #e6ebf2;
|
|
--ink-dim: #9aa7ba;
|
|
--line: #2c3850;
|
|
--accent: #5aa9ff;
|
|
--danger: #ff6b6b;
|
|
--ok: #4ecb8d;
|
|
}
|
|
* { box-sizing: border-box; }
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
font: 15px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
}
|
|
a { color: var(--accent); text-decoration: none; }
|
|
a:hover { text-decoration: underline; }
|
|
.topbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
padding: 0.6rem 1.2rem;
|
|
background: var(--panel);
|
|
border-bottom: 1px solid var(--line);
|
|
}
|
|
.topbar .brand { font-weight: 700; letter-spacing: 0.04em; }
|
|
.topbar .mainnav { display: flex; gap: 1rem; flex: 1; }
|
|
.topbar .mainnav a.active { color: var(--ink); border-bottom: 2px solid var(--accent); }
|
|
.topbar .who { color: var(--ink-dim); }
|
|
.content { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
|
|
h1 { font-size: 1.4rem; margin: 0 0 0.4rem; }
|
|
.lede { color: var(--ink-dim); margin-top: 0; }
|
|
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
|
|
.card {
|
|
display: block;
|
|
padding: 1rem 1.2rem;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
color: var(--ink);
|
|
}
|
|
.card:hover { background: var(--panel-hi); text-decoration: none; }
|
|
.card h2 { font-size: 1.05rem; margin: 0 0 0.3rem; color: var(--accent); }
|
|
.card p { margin: 0; color: var(--ink-dim); font-size: 0.9rem; }
|
|
|
|
.panel {
|
|
padding: 0.9rem 1.1rem;
|
|
background: var(--panel);
|
|
border: 1px solid var(--line);
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
}
|
|
.panel h2 { font-size: 1rem; margin: 0 0 0.6rem; color: var(--ink); }
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
|
|
.grid .panel { margin-bottom: 0; }
|
|
.kv { list-style: none; margin: 0; padding: 0; }
|
|
.kv li { padding: 0.15rem 0; color: var(--ink-dim); }
|
|
.counts { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
|
|
.counts td { padding: 0.2rem 0; border-bottom: 1px solid var(--line); color: var(--ink-dim); }
|
|
.counts td.num { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
|
|
.bignum { font-size: 1.6rem; margin: 0; color: var(--ink); }
|
|
.note { color: var(--ink-dim); font-style: italic; margin: 0.2rem 0; }
|
|
.errors { border-color: var(--danger); }
|
|
.errors ul { margin: 0; padding-left: 1.1rem; color: var(--danger); }
|
|
.ok { color: var(--ok); }
|
|
.bad { color: var(--danger); }
|
|
|
|
.list { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-bottom: 1rem; }
|
|
.list th, .list td { text-align: left; padding: 0.35rem 0.6rem; border-bottom: 1px solid var(--line); }
|
|
.list th { color: var(--ink-dim); font-weight: 600; }
|
|
.list tr:hover td { background: var(--panel-hi); }
|
|
.pager { display: flex; gap: 1rem; align-items: center; color: var(--ink-dim); }
|
|
.form { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-top: 0.8rem; }
|
|
.form label { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.85rem; color: var(--ink-dim); }
|
|
.form input, .form select {
|
|
background: var(--bg);
|
|
color: var(--ink);
|
|
border: 1px solid var(--line);
|
|
border-radius: 6px;
|
|
padding: 0.35rem 0.5rem;
|
|
font: inherit;
|
|
}
|
|
button {
|
|
background: var(--accent);
|
|
color: #06121f;
|
|
border: 0;
|
|
border-radius: 6px;
|
|
padding: 0.4rem 0.9rem;
|
|
font: inherit;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
}
|
|
button:hover { filter: brightness(1.1); }
|
|
button.danger { background: var(--danger); color: #1a0606; }
|
|
code { background: var(--bg); padding: 0.05rem 0.3rem; border-radius: 4px; }
|
|
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0.8rem 0; }
|
|
.actions form { margin: 0; }
|
|
.subnav { color: var(--ink-dim); margin: -0.3rem 0 1rem; font-size: 0.9rem; }
|