chore(agent): move screen.html inline styles into agent.css; add --blue/--yellow/--subtext0 to palette

This commit is contained in:
iris 2026-06-02 10:51:00 +02:00 committed by mara
commit ae695931ce
4 changed files with 112 additions and 74 deletions

View file

@ -23,8 +23,9 @@ html, body { height: 100%; margin: 0; }
/* Legacy in-page layout retained for the sibling stats page
(`stats.html`) which doesn't apply `body.agent-shell` and stays
on a normal-document scroll. */
body:not(.agent-shell) {
on a normal-document scroll. screen-shell is also excluded it
manages its own full-viewport layout below. */
body:not(.agent-shell):not(.screen-shell) {
max-width: 110em;
margin: 1.5em auto;
padding: 0 1.5em;
@ -1033,3 +1034,103 @@ pre.diff {
.stats-card.wide .chart-wrap { height: 260px; }
.stats-empty-note { color: var(--muted); font-style: italic; }
/* ─── /screen page ─── */
/* Full-screen VNC canvas viewer (screen.html). All rules scoped to
body.screen-shell so they can coexist with the agent/stats rules. */
body.screen-shell {
font-size: 14px;
overflow: hidden;
}
/* Toolbar strip at the top of the screen page. */
#toolbar {
display: flex;
align-items: center;
gap: 0.75rem;
padding: 0.4rem 0.75rem;
background: var(--bg-elev);
border-bottom: 1px solid var(--border);
}
#toolbar a {
color: var(--blue);
text-decoration: none;
font-size: 0.85rem;
}
#toolbar a:hover { text-decoration: underline; }
/* Toolbar toggle buttons (fit / match-size / debug). */
.tbtn {
padding: 0.15rem 0.5rem;
font-size: 0.72rem;
font-family: inherit;
background: var(--border);
color: var(--subtext0);
border: 1px solid var(--purple-dim);
border-radius: 4px;
cursor: pointer;
}
.tbtn.active { color: var(--green); border-color: var(--green); }
.tbtn:disabled { opacity: 0.4; cursor: default; }
/* Connection status chip at the right end of the toolbar. */
#status {
margin-left: auto;
font-size: 0.75rem;
color: var(--subtext0);
}
#status.connected { color: var(--green); }
#status.error { color: var(--red); }
/* RFB debug log — fixed panel at the bottom, hidden by default. */
#debug-log {
position: fixed;
bottom: 0; left: 0; right: 0;
max-height: 40vh;
overflow-y: auto;
background: rgba(17, 17, 27, 0.95);
border-top: 1px solid var(--purple-dim);
font-size: 0.72rem;
font-family: ui-monospace, monospace;
padding: 0.4rem 0.6rem;
z-index: 100;
display: none; /* toggled by the debug button */
}
#debug-log .dbg-line { color: var(--subtext0); margin: 1px 0; white-space: pre; }
#debug-log .dbg-line.err { color: var(--red); }
#debug-log .dbg-line.ok { color: var(--green); }
#debug-log .dbg-line.send { color: var(--blue); }
/* Canvas container — centres the VNC framebuffer. */
#canvas-wrap {
display: flex;
justify-content: center;
align-items: flex-start;
width: 100%;
height: calc(100% - 36px);
overflow: auto;
background: var(--crust);
}
/* Fit mode: canvas scaled in JS to fill the container. */
#canvas-wrap.fit { align-items: center; overflow: hidden; }
#canvas-wrap canvas { display: block; cursor: default; }
/* Pin the canvas to the JS-calculated size; prevents flex-item
min-width:auto from silently expanding beyond the scaled size. */
#canvas-wrap.fit canvas { flex: none; min-width: 0; min-height: 0; }
/* Transient flash message (copy-text, disconnect, etc.). */
#msg {
position: fixed;
bottom: 1rem;
left: 50%;
transform: translateX(-50%);
background: var(--border);
color: var(--yellow);
border-radius: 6px;
padding: 0.4rem 0.9rem;
font-size: 0.8rem;
opacity: 0;
transition: opacity 0.3s;
pointer-events: none;
}