Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/frontend/packages/agent/src/agent.css

140 lines
3.4 KiB
CSS

/* Shared Catppuccin palette + body typography.
Bundled in front of the screen page's rules below via esbuild. */
@import "@hive/shared/base.css";
/* Shared page-header chrome (page-header / page-back / page-title) — gives the
agent sub-page (screen) the same back-link nav the dashboard's
standalone pages use. */
@import "@hive/shared/chrome.css";
/* Shared pill/chip/badge shape (the "extract pill component" issue,
resolved as shared CSS rather than a JS component) — see pill.css
itself for the classnames it covers. */
@import "@hive/shared/pill.css";
/* Themed dialog/toast component CSS (modal.js) lives in each
component's own shadow root (adoptedStyleSheets), not a global
stylesheet — nothing to @import here. */
html,
body {
height: 100%;
margin: 0;
}
/* ─── /screen page ─── */
/* Full-screen VNC canvas viewer (screen.html). All rules scoped to
body.screen-shell so they stay out of any other page's way. */
body.screen-shell {
font-size: 14px;
overflow: hidden;
}
/* The screen page header (back link + title + controls) uses the
shared `.page-header` chrome (chrome.css). The fit/match/debug
controls + status chip below sit inside that header. */
/* 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 screen page header. */
#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: color-mix(in srgb, var(--crust) 95%, transparent);
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;
}