build-logs viewer: add --crust var + aria-expanded on row buttons (argus nits)
This commit is contained in:
parent
cc6227ccb5
commit
c4ce91b61f
3 changed files with 11 additions and 4 deletions
|
|
@ -487,7 +487,7 @@ a:hover {
|
|||
.journal-refresh { font-size: 0.75em; padding: 0.15em 0.5em; }
|
||||
.journal-output {
|
||||
margin: 0;
|
||||
background: #11111b;
|
||||
background: var(--crust);
|
||||
color: var(--fg);
|
||||
border: 1px solid var(--purple-dim);
|
||||
padding: 0.5em 0.7em;
|
||||
|
|
@ -572,7 +572,7 @@ a:hover {
|
|||
.build-logs-detail { padding: 0 0.4em 0.4em; }
|
||||
.build-logs-output {
|
||||
margin: 0;
|
||||
background: #11111b;
|
||||
background: var(--crust);
|
||||
color: var(--fg);
|
||||
border: 1px solid var(--purple-dim);
|
||||
padding: 0.5em 0.7em;
|
||||
|
|
|
|||
|
|
@ -1126,7 +1126,7 @@ window.marked = marked;
|
|||
const age = h.started_at
|
||||
? fmtAgeSecs(nowUnix - h.started_at) + ' ago' : '?';
|
||||
const rowBtn = el('button',
|
||||
{ type: 'button', class: 'build-logs-row-btn' },
|
||||
{ type: 'button', class: 'build-logs-row-btn', 'aria-expanded': 'false' },
|
||||
el('span', { class: `badge ${statusCls}` }, statusLabel),
|
||||
el('span', { class: 'build-logs-kind' }, h.kind),
|
||||
el('span', { class: 'build-logs-age meta' }, age),
|
||||
|
|
@ -1136,10 +1136,15 @@ window.marked = marked;
|
|||
detail.hidden = true;
|
||||
let loaded = false;
|
||||
rowBtn.addEventListener('click', async () => {
|
||||
if (!detail.hidden) { detail.hidden = true; return; }
|
||||
if (!detail.hidden) {
|
||||
detail.hidden = true;
|
||||
rowBtn.setAttribute('aria-expanded', 'false');
|
||||
return;
|
||||
}
|
||||
if (!loaded) {
|
||||
detail.textContent = 'fetching…';
|
||||
detail.hidden = false;
|
||||
rowBtn.setAttribute('aria-expanded', 'true');
|
||||
try {
|
||||
const r2 = await fetch('/api/build-logs/id/' + h.id);
|
||||
if (!r2.ok) {
|
||||
|
|
@ -1156,6 +1161,7 @@ window.marked = marked;
|
|||
}
|
||||
} else {
|
||||
detail.hidden = false;
|
||||
rowBtn.setAttribute('aria-expanded', 'true');
|
||||
}
|
||||
});
|
||||
li.append(rowBtn, detail);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
:root {
|
||||
--bg: #1e1e2e; /* base */
|
||||
--bg-elev: #181825; /* mantle */
|
||||
--crust: #11111b; /* crust — terminal background */
|
||||
--fg: #cdd6f4; /* text */
|
||||
--muted: #7f849c; /* overlay1 */
|
||||
--purple: #cba6f7; /* mauve */
|
||||
|
|
|
|||
Loading…
Reference in a new issue