dashboard: matrix-accounts page — provision/login per-agent external matrix accounts
New standalone H0M3 page (/matrix-accounts.html) and tile. An agent
picker drives a list of that agent's configured matrix accounts (name,
homeserver, token-stored status) and a provision form that logs in by
password or stores an existing token.
Frontend half of the per-agent external matrix-account provisioning
work. Built against the v1 backend contract:
GET /matrix-accounts?agent=<name>
-> { accounts: [ { name, homeserver, token_present } ] }
POST /matrix-account-login (x-www-form-urlencoded, operator-auth)
fields: agent, account, homeserver, mode=password|token,
user_id?, password?, token?
-> 2xx { ok, user_id } | 4xx { error }
The token is never echoed back; secret inputs are cleared on submit.
Token-status dot reflects token-stored, not live session (a true
up/down indicator needs the daemon account registry, a follow-up). The
form carries an experimental notice pending per-account failure
isolation on the matrix daemon.
Blocked from merge on the backend endpoints and the daemon
failure-isolation fix; opening for review + to pin the UI/backend wire
contract.
This commit is contained in:
parent
c187366961
commit
9293fe3ac9
6 changed files with 394 additions and 3 deletions
87
frontend/packages/dashboard/src/matrix-accounts.css
Normal file
87
frontend/packages/dashboard/src/matrix-accounts.css
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
/* M4TR1X ACC0UNTS page (/matrix-accounts.html) only. Page chrome
|
||||
(.page-header / .page-back / .page-title) comes from the shared
|
||||
chrome.css imported by common.css; this file holds the account-list
|
||||
+ provision-form styling specific to this surface. */
|
||||
|
||||
.ma-main {
|
||||
max-width: 720px;
|
||||
margin: 0 auto;
|
||||
padding: 1rem 1.25rem 3rem;
|
||||
}
|
||||
|
||||
.ma-experimental {
|
||||
border: 1px solid var(--amber);
|
||||
background: color-mix(in srgb, var(--amber) 10%, transparent);
|
||||
color: var(--fg);
|
||||
padding: 0.6rem 0.85rem;
|
||||
border-radius: 6px;
|
||||
margin: 0.8rem 0 1.4rem;
|
||||
font-size: 0.9rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.ma-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.25rem;
|
||||
margin: 0.55rem 0;
|
||||
}
|
||||
.ma-field > span { font-size: 0.8rem; color: var(--muted); }
|
||||
.ma-field input,
|
||||
.ma-field select {
|
||||
padding: 0.4rem 0.5rem;
|
||||
background: var(--bg-elev);
|
||||
color: var(--fg);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
font: inherit;
|
||||
}
|
||||
.ma-field input:focus,
|
||||
.ma-field select:focus {
|
||||
outline: none;
|
||||
border-color: var(--purple);
|
||||
}
|
||||
|
||||
.ma-mode {
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 4px;
|
||||
padding: 0.45rem 0.75rem 0.6rem;
|
||||
margin: 0.85rem 0;
|
||||
}
|
||||
.ma-mode legend { font-size: 0.8rem; color: var(--muted); padding: 0 0.3rem; }
|
||||
.ma-mode label { margin-right: 1.3rem; cursor: pointer; }
|
||||
|
||||
.ma-modefields { margin: 0.4rem 0; }
|
||||
|
||||
.ma-list { margin: 0.5rem 0 1.2rem; }
|
||||
.ma-accounts { list-style: none; padding: 0; margin: 0; }
|
||||
.ma-account {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.6rem;
|
||||
padding: 0.45rem 0.2rem;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
.ma-dot {
|
||||
width: 0.6rem;
|
||||
height: 0.6rem;
|
||||
border-radius: 50%;
|
||||
flex: none;
|
||||
}
|
||||
.ma-dot.ok { background: var(--green); }
|
||||
.ma-dot.absent { background: var(--muted); }
|
||||
.ma-name { font-weight: 600; color: var(--fg); }
|
||||
.ma-hs { color: var(--muted); font-size: 0.85rem; }
|
||||
.ma-status { margin-left: auto; font-size: 0.8rem; }
|
||||
.ma-status.ok { color: var(--green); }
|
||||
.ma-status.absent { color: var(--muted); }
|
||||
|
||||
.ma-result {
|
||||
margin-top: 0.7rem;
|
||||
font-size: 0.9rem;
|
||||
min-height: 1.2em;
|
||||
}
|
||||
.ma-result.ok { color: var(--green); }
|
||||
.ma-result.err { color: var(--red); }
|
||||
|
||||
.ma-list .err { color: var(--red); font-size: 0.9rem; }
|
||||
Loading…
Reference in a new issue