diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css index 2842e0de2..3e6836470 100644 --- a/internal/gui/assets/app.css +++ b/internal/gui/assets/app.css @@ -100,9 +100,9 @@ body.panel.tinted { background: transparent; } } :root[data-theme="dark"] body.panel { --bg: #1b1c20; --card: #25262c; --card-2: #212227; --line: rgba(255, 255, 255, .07); --line-2: rgba(255, 255, 255, .06); --pill: #2e2f36; --pill-hover: #383942; --pill-line: rgba(255, 255, 255, .11); --pill-shadow: 0 1px 2px rgba(0, 0, 0, .28); --muted: #9c9ca6; --faint: #7c7c87; --card-edge: inset 0 0 0 1px rgba(255, 255, 255, .06); } @media (prefers-color-scheme: light) { - :root:not([data-theme="dark"]) body.panel { --bg: #f2f2f5; --card: #ffffff; --card-2: #f8f8fa; --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .06); --pill: #ffffff; --pill-hover: #f4f4f7; --pill-line: rgba(0, 0, 0, .12); --pill-shadow: 0 1px 1px rgba(0, 0, 0, .06); --faint: #9a9aa3; --card-edge: 0 0 0 1px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04); } + :root:not([data-theme="dark"]) body.panel { --bg: #f2f2f5; --card: #ffffff; --card-2: #f8f8fa; --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .06); --pill: #ffffff; --pill-hover: #f4f4f7; --skel: #eeeef2; --skel-hi: #e2e2e8; --pill-line: rgba(0, 0, 0, .12); --pill-shadow: 0 1px 1px rgba(0, 0, 0, .06); --faint: #9a9aa3; --card-edge: 0 0 0 1px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04); } } -:root[data-theme="light"] body.panel { --bg: #f2f2f5; --card: #ffffff; --card-2: #f8f8fa; --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .06); --pill: #ffffff; --pill-hover: #f4f4f7; --pill-line: rgba(0, 0, 0, .12); --pill-shadow: 0 1px 1px rgba(0, 0, 0, .06); --faint: #9a9aa3; --card-edge: 0 0 0 1px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04); } +:root[data-theme="light"] body.panel { --bg: #f2f2f5; --card: #ffffff; --card-2: #f8f8fa; --line: rgba(0, 0, 0, .07); --line-2: rgba(0, 0, 0, .06); --pill: #ffffff; --pill-hover: #f4f4f7; --skel: #eeeef2; --skel-hi: #e2e2e8; --pill-line: rgba(0, 0, 0, .12); --pill-shadow: 0 1px 1px rgba(0, 0, 0, .06); --faint: #9a9aa3; --card-edge: 0 0 0 1px rgba(0, 0, 0, .05), 0 1px 2px rgba(0, 0, 0, .04); } button { font: inherit; color: inherit; background: none; border: 0; cursor: default; appearance: none; -webkit-appearance: none; text-align: center; } button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; } input { font: inherit; color: var(--fg); } @@ -434,7 +434,7 @@ body.window .field.solo { grid-column: auto; } .quota-balance { display: flex; align-items: baseline; gap: 6px; font-size: 10.5px; color: var(--muted); } .quota-windows + .quota-balance { margin-top: 9px; } .quota-balance b { margin-left: auto; font-size: 15px; color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; } -.skeleton { display: block; border-radius: 5px; background: linear-gradient(90deg, var(--pill) 25%, var(--pill-hover) 45%, var(--pill) 65%); background-size: 240% 100%; animation: skeleton-shift 1.4s ease-in-out infinite; } +.skeleton { display: block; border-radius: 5px; background: linear-gradient(90deg, var(--skel, var(--pill)) 25%, var(--skel-hi, var(--pill-hover)) 45%, var(--skel, var(--pill)) 65%); background-size: 240% 100%; animation: skeleton-shift 1.4s ease-in-out infinite; } @keyframes skeleton-shift { from { background-position: 100% 0; } to { background-position: -100% 0; } } .sk-cost { width: 72px; height: 15px; } .skeleton-card { min-height: 78px; display: flex; flex-direction: column; gap: 9px; justify-content: center; } @@ -840,6 +840,12 @@ body.window .ag-sk-icon { width: 22px; height: 22px; border-radius: 6px; } .ag-sk-field { height: 25px; border-radius: 6px; } .ag-sk-row:nth-child(2n) .ag-sk-name { width: 64px; } .ag-sk-row:nth-child(3n) .ag-sk-name { width: 78px; } +/* the panel's rows: what is set, as words at the right, then its bars and chevron */ +.ag-sk-sum { display: flex; align-items: center; gap: 10px; } +.ag-sk-value { width: 96px; height: 10px; } +.ag-sk-row:nth-child(2n) .ag-sk-value { width: 124px; } +.ag-sk-row:nth-child(3n) .ag-sk-value { width: 72px; } +.ag-sk-bars { width: 13px; height: 12px; border-radius: 3px; margin-right: 20px; } #view-agents.loading .profiles { visibility: hidden; } .gw-sk-dot { width: 8px; height: 8px; margin: 0 7px; border-radius: 50%; flex: none; } .gw-sk-who { display: flex; flex-direction: column; justify-content: center; gap: 6px; } diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index f106efc5b..a4cb756f1 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -168,11 +168,15 @@ function renderAgentsLoading() { const row = el("div", "row agent ag-sk-row"); const who = el("div", "who"); who.append(el("span", "skeleton ag-sk-name")); - const fields = el("div", "fields"); - fields.append(el("span", "skeleton ag-sk-field"), el("span", "skeleton ag-sk-field")); - row.append(el("span", "skeleton ag-sk-icon"), who, fields); + // the panel says what is set in words at the right; the window has two + // setting columns + const rest = el("div", mode === "panel" ? "ag-sk-sum" : "fields"); + if (mode === "panel") rest.append(el("span", "skeleton ag-sk-value"), el("span", "skeleton ag-sk-bars")); + else rest.append(el("span", "skeleton ag-sk-field"), el("span", "skeleton ag-sk-field")); + row.append(el("span", "skeleton ag-sk-icon"), who, rest); list.append(row); } + fit(); // the panel as tall as the rows, not as it was } function renderAgents() {