Consolidates three independently-written instances of the same thing: .cred-warning (credentials.html, static markup), .tombstone-warn (core.js, JS-built), .port-conflict (swarm.js, JS-built) -- the first two differed only by an undeliberate 10% vs 8% tint, the strongest argument this was drift rather than three genuinely different needs. New autonomous custom element, frontend/packages/shared/src/hive-warn/, matching the established one-component-one-dir shadow-DOM pattern (hive-btn, hive-toast, hive-dialog). Purely presentational -- no lifecycle beyond attaching its shadow root once, no attributeChangedCallback needed since severity/pulse are read directly by :host([...]) CSS selectors rather than mirrored onto an inner element. Content passes through via a single default <slot>, so every call site keeps writing its existing <strong>/<code> markup unchanged. API: <hive-warn> (amber, default) / <hive-warn severity="red"> for an active incident vs a standing caveat, plus an opt-in pulse boolean modifier (only the port-collision banner wants it -- a banner that's always present and always pulsing just trains you to stop seeing it). Tint is a single canonical 8% for both severities now, replacing the 10%/8% split. Registered once in dashboard's common.js (same side-effect-import pattern as <hive-side-panel>) so every dashboard page picks it up without a per-file import, since all three call sites (core.js, swarm.js, credentials.js) already transitively import it. Verified: npm run build clean for both dashboard and agent packages, grepped source for leftover cred-warning/tombstone-warn/port-conflict references (none), confirmed hive-warn/HiveWarn/hive-warn-pulse present in every affected dist bundle, confirmed the still-live questions-pulse keyframe (.questions) untouched.
131 lines
3.7 KiB
CSS
131 lines
3.7 KiB
CSS
/* CR3D3NTIALS page (/credentials.html) only. Page chrome
|
|
(.page-header / .page-back / .page-title) comes from the shared
|
|
chrome.css imported by common.css; base tab styling lives in
|
|
@hive/shared/tabs.css (.hive-tab*) same as /logs.html. This file holds
|
|
the account-list + provision-form styling specific to this surface,
|
|
carried over from the old /matrix-accounts.html (`.ma-*` classes) plus
|
|
the tab-strip layout delta + github-tab additions (`.cred-*`). */
|
|
|
|
body.cred-shell {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
/* Same layout delta as .logs-tabbar: fill the header row next to the
|
|
← home back-link, and let the flex:1 nav shrink below its intrinsic
|
|
width instead of wrapping onto its own row. */
|
|
.cred-tabbar {
|
|
flex: 1;
|
|
min-width: 0;
|
|
}
|
|
|
|
.cred-main {
|
|
max-width: 720px;
|
|
margin: 0 auto;
|
|
padding: 1.2em 1.25rem 3rem;
|
|
}
|
|
|
|
.cred-pane[hidden] { display: none; }
|
|
|
|
.gh-status { margin: 0.5rem 0 1.2rem; }
|
|
.gh-status-line {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.6rem;
|
|
}
|
|
.gh-dot {
|
|
width: 0.6rem;
|
|
height: 0.6rem;
|
|
border-radius: 50%;
|
|
flex: none;
|
|
}
|
|
.gh-dot.present { background: var(--green); }
|
|
.gh-dot.absent { background: var(--muted); }
|
|
.gh-status-text.present { color: var(--green); }
|
|
.gh-status-text.absent { color: var(--muted); }
|
|
|
|
.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;
|
|
}
|
|
/* `ok` is the v1 (pre BE-4) token-present green; `live` is the v2 online green.
|
|
`offline`/`stale` are the amber states (provisioned-not-live / container-down
|
|
⟹ daemon-down). `absent` = no token. */
|
|
.ma-dot.ok,
|
|
.ma-dot.live { background: var(--green); }
|
|
.ma-dot.offline,
|
|
.ma-dot.stale { background: var(--amber); }
|
|
.ma-dot.absent { background: var(--muted); }
|
|
/* `live stale-age`: snapshot still says live but the daemon heartbeat stalled
|
|
(> ~90s). Keep the green hue but dim + desaturate so it reads "was online,
|
|
now uncertain" — visually distinct from the solid amber container-down
|
|
`stale`. More-specific (3 classes) so it overrides `.ma-dot.live`. */
|
|
.ma-dot.live.stale-age {
|
|
background: var(--green);
|
|
opacity: 0.4;
|
|
filter: saturate(0.45);
|
|
}
|
|
.ma-name { font-weight: 600; color: var(--fg); }
|
|
.ma-uid { color: var(--muted); font-size: 0.8rem; margin-left: 0.4em; }
|
|
.ma-hs { color: var(--muted); font-size: 0.85rem; }
|
|
.ma-status { margin-left: auto; font-size: 0.8rem; }
|
|
.ma-status.ok,
|
|
.ma-status.live { color: var(--green); }
|
|
.ma-status.offline,
|
|
.ma-status.stale { color: var(--amber); }
|
|
.ma-status.absent { color: var(--muted); }
|
|
.ma-status.live.stale-age { color: var(--green); opacity: 0.6; }
|
|
|
|
.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; }
|