kaizen-agent 1.85.0 → 1.85.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/accounts.ts +50 -10
- package/cli/install.ts +12 -19
- package/cli/state.ts +2 -2
- package/cli/web.ts +39 -15
- package/cli/whatsapp.ts +15 -2
- package/package.json +1 -1
- package/web/annotate.js +7 -2
- package/web/board/annotate.ts +23 -1
- package/web/board/home-ws.ts +21 -9
- package/web/board/phone.ts +8 -5
- package/web/board/resources.ts +48 -30
- package/web/board/run-view.ts +5 -1
- package/web/board/settings-accounts.ts +13 -11
- package/web/board/settings.ts +50 -8
- package/web/board/whatsapp-setup.ts +7 -1
- package/web/board.html +40 -11
- package/web/board.js +218 -210
- package/web/notebook.js +164 -159
- package/web/term.js +48 -48
- package/web/term.ts +24 -4
- package/web/video.js +193 -188
package/web/board/resources.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
// The footer's resource monitor, left of the terminal button
|
|
2
|
-
//
|
|
3
|
-
|
|
1
|
+
// The footer's resource monitor, left of the terminal button, laid out like macOS Control Center
|
|
2
|
+
// (approved concept "Control Center", .preview/resource-monitor): a Memory tile and a Storage tile
|
|
3
|
+
// side by side, each opening in place to its detail, and every live terminal heaviest first.
|
|
4
|
+
import { $, html, ico, raw } from "./dom.ts";
|
|
4
5
|
|
|
5
6
|
const size = (n: number) => {
|
|
6
7
|
if (n < 1024 ** 2) return `${Math.round(n / 1024)} KB`;
|
|
@@ -12,8 +13,14 @@ let res: any = null, disk: any = null, confirm = "", failed = "", timer: any = n
|
|
|
12
13
|
|
|
13
14
|
// Recent memory use, kept in this page only: it starts empty on each load.
|
|
14
15
|
const history: number[] = [];
|
|
15
|
-
let diskOpen = false;
|
|
16
|
-
try { diskOpen = localStorage.getItem("kz-res-disk") === "1"; } catch {}
|
|
16
|
+
let diskOpen = false, memOpen = false;
|
|
17
|
+
try { diskOpen = localStorage.getItem("kz-res-disk") === "1"; memOpen = localStorage.getItem("kz-res-mem") === "1"; } catch {}
|
|
18
|
+
const keep = (k: string, v: boolean) => { try { localStorage.setItem(k, v ? "1" : "0"); } catch {} };
|
|
19
|
+
const MARKS = ["claude", "codex", "gemini"];
|
|
20
|
+
const CHEV = raw('<svg class="rchev" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg>');
|
|
21
|
+
// Cleanup is a broom, Rescan a refresh arrow: icon buttons, named by title and aria-label.
|
|
22
|
+
const BROOM = raw('<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M14 3l-4 9"/><path d="M6.5 12h8l1.5 8.5a.5.5 0 0 1-.5.5H5.5a.5.5 0 0 1-.5-.5z"/><path d="M8 21l.5-4M11.5 21v-4M15 21l-.5-4"/></svg>');
|
|
23
|
+
const REFRESH = raw('<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20 12a8 8 0 1 1-2.3-5.7"/><path d="M20 4v5h-5"/></svg>');
|
|
17
24
|
|
|
18
25
|
// The largest rows, the rest folded into one, so the bar stays readable.
|
|
19
26
|
const top = (rows: any[]) => {
|
|
@@ -41,34 +48,46 @@ function draw() {
|
|
|
41
48
|
const box = pop();
|
|
42
49
|
if (!box || !res) return;
|
|
43
50
|
const pct = Math.round((res.system.used / res.system.total) * 100);
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
51
|
+
const other = Math.max(0, res.system.used - res.kaizen), free = Math.max(0, res.system.total - res.system.used);
|
|
52
|
+
const C = 94.25; // the ring's circumference (r 15)
|
|
53
|
+
const mem = html`<button type="button" class="rtile${memOpen ? " open" : ""}" data-mem aria-expanded="${memOpen}">
|
|
54
|
+
<span class="rth">Memory${CHEV}</span>
|
|
55
|
+
<svg class="rring" viewBox="0 0 36 36" role="img" aria-label="${pct}% of memory used"><circle cx="18" cy="18" r="15"></circle><circle class="on" cx="18" cy="18" r="15" stroke-dasharray="${((pct / 100) * C).toFixed(1)} ${C}" transform="rotate(-90 18 18)"></circle><text x="18" y="20.6" text-anchor="middle">${pct}%</text></svg>
|
|
56
|
+
<span class="rcap">${size(res.system.used)} of ${size(res.system.total)}</span>
|
|
57
|
+
${memOpen ? html`<span class="rmore">${spark()}${split([["Kaizen and its terminals", res.kaizen], ["Other apps", other], ["Free", free]])}</span>` : ""}
|
|
58
|
+
</button>`;
|
|
59
|
+
const dsk = html`<div class="rtile${diskOpen ? " open" : ""}">
|
|
60
|
+
<div class="rth"><button type="button" class="rtt" data-fold aria-expanded="${diskOpen}">Storage${CHEV}</button><span class="rib"><button type="button" data-cleanup title="Clean up: a Claude Code in Home runs /disk-cleanup" aria-label="Clean up">${BROOM}</button><button type="button" class="${disk?.scanning ? "spin" : ""}" data-rescan title="${disk?.scanning ? "Scanning…" : "Rescan"}" aria-label="Rescan">${REFRESH}</button></span></div>
|
|
61
|
+
${disk?.at ? html`<div class="rbig">${size(disk.total)}</div><span class="rcap l">used by kaizen</span>${split(top(disk.rows), false)}${diskOpen ? html`<div class="rmore">${disk.rows.slice(0, 6).map((r) => html`<div class="rsrow"><span title="${r.name}">${r.name}</span><b>${size(r.bytes)}</b></div>`)}${disk.rows.length > 6 ? html`<div class="rsrow"><span>${disk.rows.length - 6} more</span><b>${size(disk.rows.slice(6).reduce((n, r) => n + r.bytes, 0))}</b></div>` : ""}</div>` : ""}` : html`<span class="skel" style="width:70%"></span><span class="skel" style="width:45%"></span>`}
|
|
62
|
+
</div>`;
|
|
63
|
+
const ts = [...res.terminals].sort((a, b) => (b.rss ?? 0) - (a.rss ?? 0));
|
|
64
|
+
const mark = (t: any) => (MARKS.includes(t.agent) ? raw(`<svg><use href="#i-${t.agent}"/></svg>`) : ico("term"));
|
|
65
|
+
const row = (t: any) => html`<div class="rtr"><span class="ric">${mark(t)}</span><span class="rnm"><b title="${t.title}">${t.title}</b><small>${t.project || "Home"} / ${t.ws.split(/[\\/]/).pop() || "main"}</small></span><span class="rsz">${t.rss == null ? "–" : size(t.rss)}</span><span class="ract">${
|
|
50
66
|
confirm === t.key
|
|
51
67
|
? html`<button type="button" data-keep>Keep</button><button type="button" class="yes" data-kill="${t.key}">Kill</button>`
|
|
52
68
|
: html`${t.dir ? html`<button type="button" data-open="${t.key}">Open</button>` : ""}<button type="button" class="kill" data-ask="${t.key}" aria-label="Kill ${t.title}">Kill</button>`
|
|
53
|
-
}</div>`;
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
<h3>Memory</h3>
|
|
57
|
-
<div class="rhero"><b>${pct}%</b><span>${size(res.system.used)} of ${size(res.system.total)} used</span></div>
|
|
58
|
-
${spark()}
|
|
59
|
-
${split([["Kaizen and its terminals", res.kaizen], ["Other apps", other], ["Free", free]])}`;
|
|
60
|
-
const rest = html`
|
|
61
|
-
<h3><button type="button" class="rfold" data-fold aria-expanded="${diskOpen}"><span>${diskOpen ? "▾" : "▸"}</span> Storage</button><button type="button" data-rescan>${disk?.scanning ? "Scanning…" : "Rescan"}</button></h3>
|
|
62
|
-
${disk?.at ? html`<div class="rhero"><b>${size(disk.total)}</b><span>used by kaizen</span></div>${split(top(disk.rows), diskOpen)}` : html`<div class="rnote">Scanning…</div>`}
|
|
63
|
-
<h3>Terminals (${res.terminals.length})</h3>
|
|
69
|
+
}</span></div>`;
|
|
70
|
+
const term = html`<div class="rtile w">
|
|
71
|
+
<div class="rth"><span>Terminals</span><small>${ts.length ? `${ts.length} running` : ""}</small></div>
|
|
64
72
|
${failed ? html`<div class="rnote" role="alert">${failed}</div>` : ""}
|
|
65
|
-
${
|
|
66
|
-
|
|
67
|
-
|
|
73
|
+
${ts.length ? html`<div class="rterms" id="rterms">${ts.map(row)}</div>` : html`<div class="rnote">No terminals. Start one with + in a workspace.</div>`}
|
|
74
|
+
</div>`;
|
|
75
|
+
// Each tile is redrawn only when its own markup changed: memory moves on every poll, and a
|
|
76
|
+
// terminal row's button keeps focus while the rest stays put.
|
|
77
|
+
for (const [id, m] of [["resm", mem], ["resd", dsk], ["rest", term]] as const) {
|
|
68
78
|
let el = document.getElementById(id);
|
|
69
79
|
if (!el) { el = document.createElement("div"); el.id = id; box.append(el); }
|
|
70
80
|
const text = String(m);
|
|
71
81
|
if (el.dataset.was !== text) { el.dataset.was = text; el.innerHTML = text; }
|
|
82
|
+
el.className = id === "rest" || (id === "resm" ? memOpen : diskOpen) ? "rcell w" : "rcell";
|
|
83
|
+
}
|
|
84
|
+
// The other half tile does not stay alone beside a gap while one is open.
|
|
85
|
+
box.classList.toggle("one", memOpen || diskOpen);
|
|
86
|
+
const list = document.getElementById("rterms");
|
|
87
|
+
if (list) {
|
|
88
|
+
const end = () => list.classList.toggle("end", list.scrollHeight - list.scrollTop - list.clientHeight < 4);
|
|
89
|
+
list.onscroll = end;
|
|
90
|
+
end();
|
|
72
91
|
}
|
|
73
92
|
}
|
|
74
93
|
|
|
@@ -118,12 +137,11 @@ async function click(e: MouseEvent) {
|
|
|
118
137
|
const b = (e.target as HTMLElement).closest("button");
|
|
119
138
|
if (!b) return;
|
|
120
139
|
const d = b.dataset;
|
|
121
|
-
if ("fold" in d) {
|
|
122
|
-
|
|
123
|
-
try { localStorage.setItem("kz-res-disk", diskOpen ? "1" : "0"); } catch {}
|
|
124
|
-
return draw();
|
|
125
|
-
}
|
|
140
|
+
if ("fold" in d) { diskOpen = !diskOpen; keep("kz-res-disk", diskOpen); return draw(); }
|
|
141
|
+
if ("mem" in d) { memOpen = !memOpen; keep("kz-res-mem", memOpen); return draw(); }
|
|
126
142
|
if ("rescan" in d) return void loadDisk(true);
|
|
143
|
+
// Cleanup: a new Claude Code in the Home window, starting on the disk-cleanup skill.
|
|
144
|
+
if ("cleanup" in d) return void dispatchEvent(new CustomEvent("kz-home-start", { detail: { agent: "claude", prompt: "/disk-cleanup" } }));
|
|
127
145
|
if ("keep" in d) { confirm = ""; return draw(); }
|
|
128
146
|
if (d.ask) { confirm = d.ask; failed = ""; return draw(); }
|
|
129
147
|
if (d.open) {
|
package/web/board/run-view.ts
CHANGED
|
@@ -1018,7 +1018,11 @@ async function autoBrowse() {
|
|
|
1018
1018
|
let u: string | undefined;
|
|
1019
1019
|
try {
|
|
1020
1020
|
const doc = await (await fetch(`/run/${encodeURIComponent(c.id)}?dir=${encodeURIComponent(c.state)}`)).json();
|
|
1021
|
-
|
|
1021
|
+
// Only an address the report names: with none, the lowest port in the workspace was a guess
|
|
1022
|
+
// (it once opened Claude Code's own local port, "not found").
|
|
1023
|
+
const pv = preview(doc.impl);
|
|
1024
|
+
if (!loopbackUrl(pv)) continue;
|
|
1025
|
+
u = devUrl(pv, await (await fetch("/devports?ws=" + encodeURIComponent(ctx.ws))).json());
|
|
1022
1026
|
} catch {}
|
|
1023
1027
|
if (!u || ctx?.k !== k || saved().seen?.includes(key(c))) continue;
|
|
1024
1028
|
(saved().seen ||= []).push(key(c));
|
|
@@ -5,15 +5,17 @@ import { store } from "./store.ts";
|
|
|
5
5
|
import { toast } from "./toast.ts";
|
|
6
6
|
|
|
7
7
|
// Settings → AI Accounts. /accounts never carries a token.
|
|
8
|
-
type Row = { id: string; tool: string; name: string; isDefault: boolean; signedIn: boolean; signIn: string; usage: any; who?: string; plan?: string; via?: string };
|
|
9
|
-
type Normal = { tool: string; isDefault: boolean; signedIn: boolean; signIn: string; usage: any; who?: string; plan?: string; via?: string };
|
|
8
|
+
type Row = { id: string; tool: string; name: string; isDefault: boolean; signedIn: boolean; signIn: string; usage: any; usageKnown?: boolean; who?: string; plan?: string; via?: string };
|
|
9
|
+
type Normal = { tool: string; isDefault: boolean; signedIn: boolean; signIn: string; usage: any; usageKnown?: boolean; noAccounts?: boolean; who?: string; plan?: string; via?: string };
|
|
10
10
|
// Who the tool says is signed in: an email (Claude), else how (Codex: "ChatGPT"), and the plan.
|
|
11
11
|
const whoLine = (a: { signedIn: boolean; who?: string; plan?: string; via?: string }) =>
|
|
12
12
|
a.signedIn && (a.who || a.via || a.plan) ? html`<span class="ac-who">${[a.who ?? (a.via ? `via ${a.via}` : ""), a.plan].filter(Boolean).join(" · ")}</span>` : "";
|
|
13
|
-
const TOOL: Record<string, string> = { claude: "Claude", codex: "Codex" };
|
|
13
|
+
const TOOL: Record<string, string> = { claude: "Claude", codex: "Codex", gemini: "Gemini CLI", agy: "Antigravity" };
|
|
14
|
+
const TOOLS = ["claude", "codex", "gemini", "agy"];
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
// `known`: the tool keeps plan usage kaizen can read (Gemini CLI does not).
|
|
17
|
+
function usageLine(u: any, signed: boolean, known = true) {
|
|
18
|
+
if (!u) return html`<span class="ac-u${signed ? "" : " bad"}">${signed ? (known ? "Signed in · no usage yet" : "Signed in") : "Not signed in"}</span>`;
|
|
17
19
|
if (u.expired) return html`<span class="ac-u bad">Sign-in expired. Sign in again</span>`;
|
|
18
20
|
if (u.error) return html`<span class="ac-u bad">Usage unavailable</span>`;
|
|
19
21
|
return html`<span class="ac-u">${u.five ? `${u.five.pct}% of 5 hours` : ""}${u.five && u.week ? " · " : ""}${u.week ? `${u.week.pct}% of the week` : ""}</span>`;
|
|
@@ -21,7 +23,7 @@ function usageLine(u: any, signed: boolean) {
|
|
|
21
23
|
|
|
22
24
|
const row = (a: Row) =>
|
|
23
25
|
html`<div class="sk" data-q="account ${a.name.toLowerCase()} ${a.tool}">
|
|
24
|
-
<div class="sk-h"><img class="ag-i" src="${AGENT_FAVICONS[a.tool] ?? ""}" alt="" width="28" height="28"><span class="sk-n"><input class="sel ac-name" data-ac-name="${a.id}" value="${a.name}" aria-label="Account name, click to rename" title="Click to rename" maxlength="60" autocomplete="off" spellcheck="false">${whoLine(a)}${usageLine(a.usage, a.signedIn)}</span>
|
|
26
|
+
<div class="sk-h"><img class="ag-i" src="${AGENT_FAVICONS[a.tool] ?? ""}" alt="" width="28" height="28"><span class="sk-n"><input class="sel ac-name" data-ac-name="${a.id}" value="${a.name}" aria-label="Account name, click to rename" title="Click to rename" maxlength="60" autocomplete="off" spellcheck="false">${whoLine(a)}${usageLine(a.usage, a.signedIn, a.usageKnown !== false)}</span>
|
|
25
27
|
${a.signedIn && !a.usage?.expired ? "" : html`<button type="button" class="btn" data-ac-sign="${a.id}" data-tool="${a.tool}">Sign in</button>`}
|
|
26
28
|
<button type="button" class="btn" data-ac-def="${a.isDefault ? "" : a.id}" data-tool="${a.tool}" aria-pressed="${String(a.isDefault)}">${a.isDefault ? "✓ Default" : "Default"}</button>
|
|
27
29
|
<button type="button" class="btn" data-ac-rm="${a.id}" data-name="${a.name}">Remove</button></div>
|
|
@@ -32,16 +34,16 @@ const row = (a: Row) =>
|
|
|
32
34
|
// account below is.
|
|
33
35
|
const normalRow = (n: Normal) =>
|
|
34
36
|
html`<div class="sk ac-normal" data-q="account login normal default ${n.tool} ${(n.who ?? "").toLowerCase()}">
|
|
35
|
-
<div class="sk-h"><img class="ag-i" src="${AGENT_FAVICONS[n.tool] ?? ""}" alt="" width="28" height="28"><span class="sk-n"><span class="ac-nm">Your login <i>~/.${n.tool}</i></span>${whoLine(n)}${usageLine(n.usage, n.signedIn)}</span>
|
|
37
|
+
<div class="sk-h"><img class="ag-i" src="${AGENT_FAVICONS[n.tool] ?? ""}" alt="" width="28" height="28"><span class="sk-n"><span class="ac-nm">Your login <i>~/.${n.tool}</i></span>${whoLine(n)}${usageLine(n.usage, n.signedIn, n.usageKnown !== false)}</span>
|
|
36
38
|
${n.signedIn && !n.usage?.expired ? "" : html`<button type="button" class="btn" data-ac-sign="" data-tool="${n.tool}">Sign in</button>`}
|
|
37
|
-
|
|
39
|
+
${n.noAccounts ? "" : html`<button type="button" class="btn" data-ac-def="" data-tool="${n.tool}" aria-pressed="${String(n.isDefault)}"${n.isDefault ? " disabled" : ""} title="${n.isDefault ? "Runs use this login" : "Use this login for runs again"}">${n.isDefault ? "✓ Default" : "Default"}</button>`}</div>
|
|
38
40
|
${n.signedIn && !n.usage?.expired ? "" : html`<div class="sk-a"><code>${n.signIn}</code></div>`}
|
|
39
41
|
</div>`;
|
|
40
42
|
|
|
41
43
|
export const accountRows = (d: { accounts: Row[]; normal?: Normal[]; windows: boolean }) =>
|
|
42
|
-
html`${
|
|
43
|
-
<h3 class="sg">Add an account</h3><div class="sgrp"><div class="ac-add" data-q="add account sign in claude codex provider">
|
|
44
|
-
<div class="achips">${
|
|
44
|
+
html`${TOOLS.filter((t) => d.accounts.some((a) => a.tool === t) || (d.normal ?? []).some((n) => n.tool === t)).map((t) => html`<h3 class="sg">${TOOL[t]}</h3><div class="sgrp">${(d.normal ?? []).filter((n) => n.tool === t).map(normalRow)}${d.accounts.filter((a) => a.tool === t).map(row)}</div>`)}
|
|
45
|
+
<h3 class="sg">Add an account</h3><div class="sgrp"><div class="ac-add" data-q="add account sign in claude codex gemini provider">
|
|
46
|
+
<div class="achips">${TOOLS.filter((t) => t !== "agy").filter((t) => t !== "gemini" || (d.normal ?? []).some((n) => n.tool === t) || d.accounts.some((a) => a.tool === t)).map((t) => html`<button type="button" data-ac-new="${t}"${d.windows ? " disabled" : ""}><img src="${AGENT_FAVICONS[t]}" alt="" width="16" height="16">Add ${TOOL[t]} account</button>`)}</div></div></div>`;
|
|
45
47
|
|
|
46
48
|
export function wireAccounts(redraw: () => Promise<unknown>) {
|
|
47
49
|
const send = async (body: object) => {
|
package/web/board/settings.ts
CHANGED
|
@@ -42,7 +42,8 @@ export async function openSettings() {
|
|
|
42
42
|
if (!$("panel").classList.contains("open") || $("ptitle").textContent !== "Settings") {
|
|
43
43
|
$("pbody").innerHTML = SET_SKEL;
|
|
44
44
|
$("psub").textContent = "";
|
|
45
|
-
|
|
45
|
+
// Always All projects on opening: a project's own settings are picked on purpose, never by where you came from.
|
|
46
|
+
store.setScope = "all";
|
|
46
47
|
}
|
|
47
48
|
termStop();
|
|
48
49
|
store.openKey = null;
|
|
@@ -192,9 +193,13 @@ export async function openSettings() {
|
|
|
192
193
|
<nav class="snav" aria-label="Settings">
|
|
193
194
|
<button class="sback" id="sback" type="button">${ico("chev")}Back to app</button>
|
|
194
195
|
<div class="sq"><input class="sel" id="sq" type="search" placeholder="Search settings" aria-label="Search settings" spellcheck="false" autocomplete="off" value="${store.setQ}"></div>
|
|
195
|
-
${cfg ? html`<div class="sacct"
|
|
196
|
-
<
|
|
197
|
-
|
|
196
|
+
${cfg ? html`<div class="sacct-w">
|
|
197
|
+
<button type="button" class="sacct" id="s-scope" aria-haspopup="listbox" aria-expanded="false" aria-controls="s-scope-list" title="${scoped ? "This project's own .kaizen/config.yml; anything it does not set comes from All projects." : "~/.kaizen/config.yml; a project's own config wins where it sets a value."}">
|
|
198
|
+
<span class="stile">${ico(scoped ? "board" : "home")}</span>
|
|
199
|
+
<span class="sacct-t"><small>Settings for</small><b>${scoped ? String(scopeName).split(/[\\/]/).filter(Boolean).pop() : "All projects"}</b><small>${scoped ? "Overrides All projects" : "Every project"}</small></span>
|
|
200
|
+
<svg class="sacct-c" viewBox="0 0 24 24" aria-hidden="true"><path d="M7 10l5 5 5-5" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
|
201
|
+
</button>
|
|
202
|
+
<div class="spop" id="s-scope-list" role="listbox" aria-label="Settings for" hidden>${[{ dir: "all", label: "All projects" }, ...cfg.projects].map((p) => html`<button type="button" role="option" data-v="${p.dir}" aria-selected="${String(p.dir === cfg.scope)}"><span class="stile">${ico(p.dir === "all" ? "home" : "board")}</span><span>${p.dir === "all" ? p.label : html`${p.label.split(/[\\/]/).filter(Boolean).pop()}<small>${"\u200e" + p.label + "\u200e"}</small>`}</span>${p.dir === cfg.scope ? ico("check") : ""}</button>`)}</div>
|
|
198
203
|
</div>` : ""}
|
|
199
204
|
<div class="snavs">${SETTINGS_NAV.map(([g, ps]) => html`<div class="snavg" role="group" aria-label="${g}">${ps.map((p) => html`<button type="button" data-page="${p.id}"><span class="stile">${ico(p.ico)}</span><span>${p.title}</span></button>`)}</div>`)}</div>
|
|
200
205
|
</nav>
|
|
@@ -231,7 +236,10 @@ export async function openSettings() {
|
|
|
231
236
|
const secs = [...$("pbody").querySelectorAll<HTMLElement>(".spage")];
|
|
232
237
|
const hits = secs.filter(has);
|
|
233
238
|
const picked = store.setPage && secs.find((s) => s.dataset.page === store.setPage);
|
|
234
|
-
|
|
239
|
+
// A phone shows a page or the list, and the search box lives in the list: while it is being typed in,
|
|
240
|
+
// stay on the list (narrowed to matching pages), or the first letter opens a page and hides the box.
|
|
241
|
+
const typing = narrow() && !!q && document.activeElement?.id === "sq";
|
|
242
|
+
const cur = typing ? null : (picked && has(picked) ? picked : null) || (q || !narrow() ? hits[0] : null);
|
|
235
243
|
secs.forEach((s) => (s.hidden = s !== cur));
|
|
236
244
|
$("sset").classList.toggle("pick", !cur);
|
|
237
245
|
$("pbody").querySelectorAll<HTMLElement>(".snavg button").forEach((b) => {
|
|
@@ -243,6 +251,8 @@ export async function openSettings() {
|
|
|
243
251
|
};
|
|
244
252
|
// The page goes in the address, without a history step per page: Back to app leaves in one.
|
|
245
253
|
const pick = (id) => {
|
|
254
|
+
// Picking a page ends typing in the search box (a tapped button takes no focus on iOS).
|
|
255
|
+
if (document.activeElement?.id === "sq") (document.activeElement as HTMLElement).blur();
|
|
246
256
|
store.setPage = id;
|
|
247
257
|
history.replaceState(null, "", "?view=settings" + (id ? "&page=" + id : ""));
|
|
248
258
|
filter();
|
|
@@ -389,11 +399,43 @@ export async function openSettings() {
|
|
|
389
399
|
} catch (e) {}
|
|
390
400
|
playSound(v);
|
|
391
401
|
});
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
402
|
+
// "Settings for": the board's own list rather than a native select, so it is drawn like the rest of
|
|
403
|
+
// the page (and shows in a screenshot). Enter/Space/↓ open it, arrows move, Enter picks, Escape closes.
|
|
404
|
+
if (cfg) {
|
|
405
|
+
const btn = $("s-scope"), list = $("s-scope-list");
|
|
406
|
+
const opts = () => [...list.querySelectorAll<HTMLElement>("[role=option]")];
|
|
407
|
+
const shut = (focus = true) => {
|
|
408
|
+
list.hidden = true;
|
|
409
|
+
btn.setAttribute("aria-expanded", "false");
|
|
410
|
+
removeEventListener("pointerdown", outside, true);
|
|
411
|
+
if (focus) btn.focus();
|
|
412
|
+
};
|
|
413
|
+
const outside = (e: Event) => { if (!list.contains(e.target as Node) && !btn.contains(e.target as Node)) shut(false); };
|
|
414
|
+
const show = () => {
|
|
415
|
+
list.hidden = false;
|
|
416
|
+
btn.setAttribute("aria-expanded", "true");
|
|
417
|
+
addEventListener("pointerdown", outside, true);
|
|
418
|
+
(opts().find((o) => o.getAttribute("aria-selected") === "true") ?? opts()[0])?.focus();
|
|
419
|
+
};
|
|
420
|
+
btn.onclick = () => (list.hidden ? show() : shut());
|
|
421
|
+
btn.onkeydown = (e) => { if (e.key === "ArrowDown" || e.key === "ArrowUp") (e.preventDefault(), show()); };
|
|
422
|
+
list.onclick = (e) => {
|
|
423
|
+
const o = (e.target as HTMLElement).closest<HTMLElement>("[role=option]");
|
|
424
|
+
if (!o) return;
|
|
425
|
+
shut(false);
|
|
426
|
+
if (o.dataset.v === store.setScope) return btn.focus();
|
|
427
|
+
store.setScope = o.dataset.v!;
|
|
395
428
|
openSettings();
|
|
396
429
|
};
|
|
430
|
+
list.onkeydown = (e) => {
|
|
431
|
+
const os = opts(), i = os.indexOf(document.activeElement as HTMLElement);
|
|
432
|
+
if (e.key === "Escape" || e.key === "Tab") return void (e.key === "Escape" && e.preventDefault(), shut(e.key === "Escape"));
|
|
433
|
+
const to = e.key === "ArrowDown" ? i + 1 : e.key === "ArrowUp" ? i - 1 : e.key === "Home" ? 0 : e.key === "End" ? os.length - 1 : null;
|
|
434
|
+
if (to === null) return;
|
|
435
|
+
e.preventDefault();
|
|
436
|
+
os[Math.max(0, Math.min(os.length - 1, to))]?.focus();
|
|
437
|
+
};
|
|
438
|
+
}
|
|
397
439
|
if (cfg)
|
|
398
440
|
cfg.rows.forEach((r) => {
|
|
399
441
|
const el = $("s-" + r.key.replace(/\./g, "-"));
|
|
@@ -4,6 +4,7 @@ import { html, raw } from "./dom.ts";
|
|
|
4
4
|
|
|
5
5
|
type WAStatus = {
|
|
6
6
|
installed: boolean;
|
|
7
|
+
saved?: boolean;
|
|
7
8
|
running: boolean;
|
|
8
9
|
connected: boolean;
|
|
9
10
|
user: string | null;
|
|
@@ -77,6 +78,11 @@ export async function mountWhatsApp(el: HTMLElement) {
|
|
|
77
78
|
return;
|
|
78
79
|
}
|
|
79
80
|
|
|
81
|
+
// A saved login with the bridge down or coming back: the board restarts it and it reconnects by itself.
|
|
82
|
+
if (s.saved) {
|
|
83
|
+
el.innerHTML = String(html`<div><p class="ph-h">WhatsApp Bridge</p><p class="ph-st"><i class="ph-dot"></i> Linked · reconnecting…</p><p class="ph-note">Your saved login is used; no new QR code.</p><div class="ph-row" style="margin-top:12px"><button type="button" class="btn" data-wa="disconnect">${busy ? "Unlinking…" : "Unlink WhatsApp"}</button></div>${e}</div>`);
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
80
86
|
// Bridge up, no QR and not linked: mid-scan or reconnecting. Keep polling, say so.
|
|
81
87
|
if (s.running) {
|
|
82
88
|
el.innerHTML = String(html`<div><p class="ph-h">WhatsApp Bridge</p><p class="ph-wait">Connecting…</p>${e}</div>`);
|
|
@@ -111,7 +117,7 @@ export async function mountWhatsApp(el: HTMLElement) {
|
|
|
111
117
|
clearInterval(timer);
|
|
112
118
|
return;
|
|
113
119
|
}
|
|
114
|
-
if (s && !s.connected && (s.qrSvg || busy || s.running)) {
|
|
120
|
+
if (s && !s.connected && (s.qrSvg || busy || s.running || s.saved)) {
|
|
115
121
|
const r = await callWA();
|
|
116
122
|
if (!r.error) {
|
|
117
123
|
s = r;
|
package/web/board.html
CHANGED
|
@@ -231,6 +231,8 @@ body.phomev #phome{display:block;flex:1;min-height:0;overflow:auto;padding:4px 1
|
|
|
231
231
|
pre.mark{margin:0;font:700 5px/1 var(--mono)}
|
|
232
232
|
pre.mark span:nth-child(1){color:var(--ink-hi)}pre.mark span:nth-child(2){color:color-mix(in srgb,var(--ink-hi),var(--accent))}pre.mark span:nth-child(3){color:var(--accent)}
|
|
233
233
|
.sel{border:1px solid var(--line);border-radius:var(--r-s);padding:4px 10px;background-color:var(--bg-2);color:var(--ink);font-size:13px}
|
|
234
|
+
/* A select's own list follows the theme: options inherit a select's text colour (white in dark on the scope card), so they get the theme's surface and ink, or the native list showed white on white. */
|
|
235
|
+
select.sel{color-scheme:inherit}select.sel option{background-color:var(--bg-2);color:var(--ink)}
|
|
234
236
|
/* One line, one height: a select, a field and a picker button stand as tall as .ib and .btn. */
|
|
235
237
|
:is(input,select,button,summary).sel{height:var(--btn-s)}
|
|
236
238
|
select.sel,button.sel{cursor:pointer;appearance:none;padding-right:30px;max-width:100%;background-image:linear-gradient(45deg,transparent 50%,var(--dim) 50%),linear-gradient(135deg,var(--dim) 50%,transparent 50%);background-position:calc(100% - 16px) 50%,calc(100% - 11px) 50%;background-size:5px 5px;background-repeat:no-repeat}
|
|
@@ -529,14 +531,33 @@ aside.wide{width:100%;border-left:0}@media(min-width:901px){aside.wide{width:62%
|
|
|
529
531
|
.foot .umtr{width:54px;height:5px;border-radius:3px;background:var(--line);overflow:hidden}.foot .umtr i{display:block;height:100%;background:var(--ok)}.foot .umtr i.mid{background:var(--warn)}.foot .umtr i.hi{background:var(--danger)}
|
|
530
532
|
.foot .fb{display:flex;align-items:center;gap:6px;padding:3px 7px;border-radius:var(--r-s);color:var(--dim);text-decoration:none}.foot .fb:hover{background:var(--hover);color:var(--ink)}.foot .fb[hidden],.foot .uchip[hidden]{display:none}
|
|
531
533
|
.foot button.fb{border:0;background:none;font:inherit;cursor:pointer}.foot .fb[aria-expanded=true]{background:var(--hover);color:var(--ink)}
|
|
532
|
-
|
|
533
|
-
#respop
|
|
534
|
-
#respop .
|
|
535
|
-
#respop .
|
|
536
|
-
#respop .
|
|
537
|
-
#respop .
|
|
538
|
-
#respop .
|
|
539
|
-
#respop .
|
|
534
|
+
/* Resource monitor, laid out like macOS Control Center: two half tiles (Memory, Storage) that open in place, then the terminals */
|
|
535
|
+
#respop{position:fixed;right:12px;bottom:calc(var(--foot-h,32px) + 6px);z-index:40;width:360px;max-width:calc(100vw - 24px);max-height:calc(100vh - var(--foot-h,32px) - 24px);overflow:auto;padding:10px;display:grid;grid-template-columns:1fr 1fr;gap:8px;align-content:start;border:1px solid var(--line);border-radius:var(--r-l);background:color-mix(in srgb,var(--bg-2) 94%,transparent);backdrop-filter:blur(24px);box-shadow:var(--shadow-2);color:var(--ink);font-size:var(--fs-s);white-space:normal}
|
|
536
|
+
#respop .rcell{min-width:0;display:flex}#respop .rcell.w{grid-column:1/-1}
|
|
537
|
+
#respop .rtile{flex:1;min-width:0;display:block;text-align:left;padding:10px 12px;border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:var(--r);background:color-mix(in srgb,var(--ink) 4%,var(--bg-2));color:var(--ink);font:inherit}#respop button.rtile{cursor:pointer}#respop button.rtile:hover{background:color-mix(in srgb,var(--ink) 7%,var(--bg-2))}
|
|
538
|
+
#respop .rth{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px;font-size:var(--fs-s);font-weight:600;color:var(--ink-hi)}#respop .rth small{font-weight:400;color:var(--dim);font-size:var(--fs-xs);font-variant-numeric:tabular-nums}
|
|
539
|
+
#respop .rchev{width:14px;height:14px;fill:none;stroke:var(--dim);stroke-width:2;transition:transform .2s}#respop .open .rchev{transform:rotate(180deg)}
|
|
540
|
+
#respop .rtt{all:unset;display:inline-flex;align-items:center;gap:4px;cursor:pointer;border-radius:4px}#respop .rtt:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
|
|
541
|
+
#respop .rib{display:inline-flex;gap:2px}#respop .rib button{width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:var(--r-s);background:none;color:var(--dim);cursor:pointer}#respop .rib button:hover{background:var(--hover);color:var(--ink-hi)}#respop .rib svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}#respop .rib .spin svg{animation:rspin .9s linear infinite}@keyframes rspin{to{transform:rotate(360deg)}}
|
|
542
|
+
#respop .rring{display:block;width:72px;height:72px;margin:2px auto 4px}#respop .rring circle{fill:none;stroke:var(--line);stroke-width:3.5}#respop .rring circle.on{stroke:var(--accent);stroke-linecap:round;transition:stroke-dasharray .5s ease-out}#respop .rring text{stroke:none;fill:var(--ink-hi);font-size:7.5px;font-weight:600;font-variant-numeric:tabular-nums}
|
|
543
|
+
#respop .rcap{display:block;text-align:center;color:var(--dim);font-size:var(--fs-xs);font-variant-numeric:tabular-nums}#respop .rcap.l{text-align:left}
|
|
544
|
+
#respop .rbig{font-size:22px;font-weight:600;color:var(--ink-hi);letter-spacing:-.01em;font-variant-numeric:tabular-nums}
|
|
545
|
+
#respop .rmore{display:block;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
|
|
546
|
+
/* one tile open: it spans the panel, the other becomes a slim full-width strip */
|
|
547
|
+
#respop.one .rcell{grid-column:1/-1}#respop.one .rcell:not(.w) .rtile{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:8px 12px}#respop.one .rcell:not(.w) .rth{margin:0}#respop.one .rcell:not(.w) .rring{width:36px;height:36px;margin:0}#respop.one .rcell:not(.w) .rcap{text-align:right}#respop.one .rcell:not(.w) .rseg{display:none}
|
|
548
|
+
#respop .rsrow{display:flex;align-items:center;gap:8px;min-height:20px}#respop .rsrow>span:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#respop .rsrow>b{font-weight:500;font-variant-numeric:tabular-nums}
|
|
549
|
+
#respop .rspark{display:block;width:100%;height:40px;margin-bottom:6px}#respop .rspark polygon{stroke:none;fill:color-mix(in srgb,var(--accent) 12%,transparent)}#respop .rspark polyline{fill:none;stroke:var(--accent);stroke-width:2}
|
|
550
|
+
#respop .rseg{display:flex;gap:2px;height:6px;margin:8px 0 4px;border-radius:3px;overflow:hidden}#respop .rseg i{min-width:2px}#respop .s0{background:var(--accent)}#respop .s1{background:color-mix(in srgb,var(--ink) 55%,var(--bg-2))}#respop .s2{background:color-mix(in srgb,var(--ink) 32%,var(--bg-2))}#respop .s3{background:color-mix(in srgb,var(--ink) 20%,var(--bg-2))}#respop .s4{background:var(--line)}
|
|
551
|
+
#respop .rsrow u{display:inline-block;width:8px;height:8px;margin-right:8px;border-radius:2px}#respop .rsrow em{font-style:normal;color:var(--dim);font-variant-numeric:tabular-nums}
|
|
552
|
+
/* terminals: heaviest first; about five rows, then the list scrolls (a fade says there is more) */
|
|
553
|
+
#respop .rterms{max-height:226px;overflow-y:auto;overscroll-behavior:contain;margin-right:-6px;padding-right:6px;-webkit-mask-image:linear-gradient(#000 calc(100% - 22px),transparent);mask-image:linear-gradient(#000 calc(100% - 22px),transparent)}#respop .rterms.end{-webkit-mask-image:none;mask-image:none}
|
|
554
|
+
#respop .rtr{display:grid;grid-template-columns:24px minmax(0,1fr) auto auto;gap:10px;align-items:center;padding:7px 0;border-top:1px solid color-mix(in srgb,var(--line) 70%,transparent)}#respop .rtr:first-child{border-top:0}
|
|
555
|
+
#respop .ric{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;background:var(--bg-2);border:1px solid var(--line)}#respop .ric svg{width:14px;height:14px}
|
|
556
|
+
#respop .rnm{min-width:0}#respop .rnm b{display:block;font-weight:500;color:var(--ink-hi);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#respop .rnm small{display:block;color:var(--dim);font-size:var(--fs-xs);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
557
|
+
#respop .rsz{font-variant-numeric:tabular-nums}
|
|
558
|
+
#respop .ract{display:flex;gap:4px}#respop .ract button{height:26px;padding:0 8px;border:1px solid var(--line);border-radius:var(--r-s);background:var(--bg-2);color:var(--ink);font:inherit;font-size:var(--fs-xs);cursor:pointer}#respop .ract button:hover{background:var(--hover)}#respop .ract .kill{opacity:0}#respop .rtr:hover .kill,#respop .rtr:focus-within .kill{opacity:1}#respop .ract .yes{color:var(--danger);border-color:color-mix(in srgb,var(--danger) 40%,var(--line))}
|
|
559
|
+
@media(hover:none){#respop .ract .kill{opacity:1}}
|
|
560
|
+
#respop .rnote{color:var(--dim);font-size:var(--fs-xs)}#respop .skel{display:block;height:10px;margin:8px 0}
|
|
540
561
|
.foot .dot{width:7px;height:7px;border-radius:50%;background:var(--ok);box-shadow:0 0 6px var(--ok)}.foot .dot.off{background:var(--dim);box-shadow:none}
|
|
541
562
|
@media(max-width:640px){.foot{order:1;gap:10px;padding:4px 10px;border-top:1px solid var(--line)}.foot .umtr,.foot .wk,.foot .ptxt{display:none}}
|
|
542
563
|
@media(max-width:640px){.foot #res{display:none}}
|
|
@@ -682,7 +703,11 @@ body.runv #runv{grid-area:1/1;display:flex;flex-direction:column;min-width:0;min
|
|
|
682
703
|
.hwsb{flex:1;min-height:0;display:flex;flex-direction:column;background:var(--bg)}.hwsb .term{flex:1;min-height:0;padding:6px 0 0 8px}.hwsb .term .xterm{height:100%}.hwsb .term .xterm-viewport{background:transparent!important}.hwsempty{margin:auto;color:var(--dim);font-size:var(--fs-s)}
|
|
683
704
|
.hwsbtn{position:fixed;z-index:34;right:16px;bottom:calc(var(--foot-h,0px) + 16px);width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:var(--bg-2);color:var(--ink);border:1px solid var(--line);box-shadow:var(--shadow-2)}.hwsbtn:hover{color:var(--ink-hi);background:color-mix(in srgb,var(--bg-2) 85%,var(--ink))}.hwsbtn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.hwsbtn[hidden]{display:none}.hwsbtn:focus-visible,.hws button:focus-visible{outline:2px solid var(--accent)}
|
|
684
705
|
.rail .plist.hwsslot{flex:none;min-height:0;overflow:visible}.rail .plist.hwsslot[hidden]{display:none}.hwsslot .proj .c{margin-left:auto}.hwsslot .wadd{opacity:.6}.hwsslot .plogo.hwsico{background:none;color:var(--ink);fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}[data-rail=min] .hwsslot .proj .hwsico use{display:inline}
|
|
685
|
-
@media(max-width:640px){.
|
|
706
|
+
@media(max-width:640px){.hwsbtn,.hwsslot{display:none!important}
|
|
707
|
+
/* On a phone Home opens full screen (from the New sheet or a tapped Home agent), over the page and its bars. */
|
|
708
|
+
.hws{position:fixed;inset:0!important;width:auto!important;height:auto!important;min-width:0;min-height:0;max-width:none;max-height:none;border:0;border-radius:0;box-shadow:none;z-index:60;resize:none;padding:env(safe-area-inset-top) 0 env(safe-area-inset-bottom)}.hws[hidden]{display:none}
|
|
709
|
+
.hwsh{height:48px;cursor:default;padding:0 4px 0 12px}#hwsmin,#hwsmax{display:none}.hwsh #hwsx{width:40px;height:40px}.hwsh .radd>summary{width:40px;height:40px}
|
|
710
|
+
.hwstab{min-width:0;max-width:160px;padding:0 4px 0 10px}.hwstab i{width:28px;height:28px;opacity:.6}}
|
|
686
711
|
.radd{position:relative}.radd summary{list-style:none}.radd summary::-webkit-details-marker{display:none}
|
|
687
712
|
.radd .menu-pop{position:fixed;z-index:20;right:auto;bottom:auto;width:max-content;margin-top:0;min-width:250px;padding:5px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-2);display:flex;flex-direction:column}
|
|
688
713
|
.radd .menu-pop button{display:grid;grid-template-columns:18px 1fr;gap:10px;align-items:start;text-align:left;padding:7px 9px;border-radius:var(--r)}.radd .menu-pop button:hover{background:var(--hover)}.radd .menu-pop svg{width:16px;height:16px;margin-top:1px}.radd small{display:block;color:var(--dim);font-size:11.5px}.radd .agent-yolo{margin:0 0 4px;padding:7px 9px;border-block:0;border-bottom:1px solid var(--line);border-radius:0;font-size:13px}
|
|
@@ -738,6 +763,8 @@ body.runv.rflip #panel::before{content:"";position:absolute;top:7px;left:50%;wid
|
|
|
738
763
|
#rtabs .rtab span{max-width:110px;overflow:hidden;text-overflow:ellipsis}}
|
|
739
764
|
/* A phone: the panel is a sheet opened from the run tab (#rside); compact tabs */
|
|
740
765
|
@media(max-width:640px){body.runv #rbar{height:40px;min-height:40px;padding:0 10px 4px 10px;border-bottom:1px solid var(--line)}body.runv #rtabs{height:36px;min-height:36px;padding:0;gap:4px}body.runv #rtabs .rtab{min-height:32px;height:32px;padding:0 10px;font-size:12px;border-radius:var(--r-s)}body.runv #rtabs .rtab i{padding:0 2px 0 6px}body.runv #rbar :is(.rbtn,.ib.xs){min-height:32px;height:32px;min-width:32px;width:32px;padding:0;border-radius:var(--r-s)}body.runv #rbar :is(.rbtn,.ib.xs) svg{width:16px;height:16px}body.runv #pnotes{width:44px;height:44px}body.runv #pfoot details button{min-height:44px}body .termtools button{min-width:40px;min-height:40px}body.runv #ptabs button{width:44px;height:44px}body.runv #pclose{width:44px;height:44px}body.runv #pfoot .btn{min-height:44px}}
|
|
766
|
+
/* Phone workspace tabs in the Orca style too: flat, an underline under the active one, × at the end, finger-sized. */
|
|
767
|
+
@media(max-width:640px){body.runv #rbar{padding-bottom:0}body.runv #rtabs{height:40px;min-height:40px;align-items:stretch;gap:0}body.runv #rtabs>:not(.rtab){align-self:center}body.runv #rtabs .rtab{height:auto;min-height:0;border-radius:0;background:none;color:var(--dim);gap:6px;padding:0 2px 0 10px}body.runv #rtabs .rtab i{display:grid;place-items:center;width:28px;height:28px;padding:0;margin-left:auto;opacity:.6}body.runv #rtabs .rtab.on{color:var(--ink-hi);background:none;box-shadow:inset 0 -2px var(--ink-hi)}}
|
|
741
768
|
/* Workspace tabs as Orca's: flat, the bar's full height, an underline under the active one, × at the end. */
|
|
742
769
|
@media(min-width:641px){#rtabs{align-items:stretch;gap:0}html body.runv #rtabs{padding-top:0;padding-bottom:0}#rtabs>:not(.rtab){align-self:center}#rtabs>.rtab+:not(.rtab){margin-left:4px}#rtabs .rtab{height:auto;min-width:140px;max-width:240px;padding:0 8px 0 12px;gap:8px;border-radius:0;background:none;color:var(--dim)}#rtabs .rtab span:not(.si){flex:1;min-width:0;max-width:none;text-align:left}#rtabs .rtab i{margin-left:auto;padding:0 4px;opacity:0}#rtabs .rtab:hover i,#rtabs .rtab.on i,#rtabs .rtab i:focus-visible{opacity:.6}#rtabs .rtab i:hover{opacity:1}#rtabs .rtab:hover{color:var(--ink);background:var(--hover)}#rtabs .rtab.on{color:var(--ink-hi);background:none;box-shadow:inset 0 -2px var(--ink-hi)}}
|
|
743
770
|
/* A terminal fills its pane in its own colours (--term-bg, set by web/term.ts from its palette), edge to edge;
|
|
@@ -978,7 +1005,9 @@ aside .foot .more .menu-pop{left:0;right:auto;top:auto;bottom:calc(100% + 4px)}.
|
|
|
978
1005
|
.sacct{flex:none;display:flex;align-items:center;gap:10px;margin:0 0 10px;padding:10px 12px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r-l)}
|
|
979
1006
|
.sacct .stile,.spage>header .stile{background:var(--bg);border:1px solid var(--line);color:var(--ink)}.sacct .stile{width:34px;height:34px;border-radius:var(--r)}.sacct .stile svg{width:18px;height:18px}
|
|
980
1007
|
.sacct-t{display:grid;min-width:0;flex:1;line-height:1.3}.sacct-t small{font-size:var(--fs-xs);color:var(--dim)}
|
|
981
|
-
.sacct
|
|
1008
|
+
.sacct-w{position:relative;flex:none;margin:0 0 10px}.sacct-w .sacct{margin:0;width:100%;font:inherit;color:inherit;text-align:left;cursor:pointer}.sacct:hover{background:color-mix(in srgb,var(--hover) 60%,var(--bg-2))}.sacct:focus-visible{outline:2px solid var(--accent);outline-offset:1px}.sacct-t b{font-size:var(--fs-l);font-weight:600;color:var(--ink-hi);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sacct-c{flex:none;width:16px;height:16px;color:var(--dim)}.sacct[aria-expanded=true] .sacct-c{transform:rotate(180deg)}
|
|
1009
|
+
/* "Settings for" list: the board's own popover, so it follows the theme and shows in a screenshot. */
|
|
1010
|
+
.spop{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:30;display:flex;flex-direction:column;gap:1px;max-height:min(360px,60vh);overflow-y:auto;padding:4px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r-l);box-shadow:var(--shadow-2)}.spop[hidden]{display:none}.spop button{display:flex;align-items:center;gap:10px;width:100%;min-height:36px;padding:4px 8px;border:0;border-radius:var(--r-s);background:none;color:var(--ink);font:inherit;font-size:var(--fs);text-align:left;cursor:pointer}.spop button>span:not(.stile){flex:1;min-width:0;display:grid;line-height:1.3}.spop button>span:not(.stile),.spop small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.spop small{font-size:var(--fs-xs);color:var(--dim);font-weight:400;direction:rtl;text-align:left}.spop button:is(:hover,:focus-visible){background:var(--hover);outline:none}.spop button[aria-selected=true]{color:var(--ink-hi);font-weight:500}.spop .stile{width:24px;height:24px;border-radius:var(--r-s);display:grid;place-items:center;background:var(--bg);border:1px solid var(--line);flex:none}.spop .stile svg{width:14px;height:14px}.spop button>svg{width:14px;height:14px;flex:none;color:var(--accent)}
|
|
982
1011
|
.snavs{flex:1;min-height:0;overflow-y:auto;padding:12px}
|
|
983
1012
|
.snavg{display:grid;gap:1px;margin-bottom:14px}.snavg[hidden],.snavg button[hidden],.spage[hidden]{display:none}
|
|
984
1013
|
.snavg button{display:flex;align-items:center;gap:8px;height:30px;padding:0 6px;border-radius:var(--r-s);font-size:13px;color:var(--ink);text-align:left;white-space:nowrap;overflow:hidden}
|
|
@@ -1021,7 +1050,7 @@ aside .foot .more .menu-pop{left:0;right:auto;top:auto;bottom:calc(100% + 4px)}.
|
|
|
1021
1050
|
/* General opens on About: the version and the update check, in a box like the rest. */
|
|
1022
1051
|
#supd:not(:empty){margin-bottom:24px}#supd:not(:empty)::before{content:"About";display:block;margin:0 0 8px;font-size:13px;font-weight:600;color:var(--ink-hi)}.sset #supd .updbar{margin:0;padding:10px 14px;border-radius:var(--r-l)}.sset #supd .updbar.quiet{padding:10px 14px;border:1px solid var(--line);background:var(--bg-2);color:var(--ink-hi)}
|
|
1023
1052
|
/* A phone opens on the list of pages, drawn as grouped boxes, and each page has a back row. */
|
|
1024
|
-
@media(max-width:640px){.sset{display:block;height:auto}.snav{background:none;border:0}.sback{display:none}.snav .sq{border:0;padding:0 0 12px}.sacct{margin:0 0 16px}.snavs{overflow:visible;padding:0}.snavg{gap:0;margin-bottom:20px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r-l);overflow:hidden}.snavg button{height:44px;padding:0 12px;gap:12px;border-radius:0;font-size:15px}.snavg button:not([hidden])~button:not([hidden]){border-top:1px solid var(--line)}.snavg .stile{width:28px;height:28px}.snavg .stile svg{width:var(--ico);height:var(--ico)}.sset:not(.pick) .snav{display:none}.sset.pick .smain>.spage{display:none}.smain{overflow:visible;padding:0 0 24px}.sup{display:flex;align-items:center;gap:6px;margin-bottom:12px;font-size:13px;color:var(--dim)}.spage>header{gap:12px;margin-bottom:20px}.spage>header .stile{width:40px;height:40px}.spage>header .stile svg{width:20px;height:20px}.sset .srow{grid-template-columns:minmax(0,1fr)}.sset .srow>:nth-child(2){grid-column:1;grid-row:auto;justify-self:start;margin-top:6px;max-width:100%}.sset .srow .hint{grid-row:auto}.sset .srow input.sel,.sset .fpick{width:100%}.sset .fpick input.sel{flex:1;min-width:0}.sset .bar{flex-wrap:wrap}}
|
|
1053
|
+
@media(max-width:640px){.sset{display:block;height:auto}.snav{background:none;border:0}.sback{display:none}.snav .sq{border:0;padding:0 0 12px}.sacct-w{margin:0 0 16px}.snavs{overflow:visible;padding:0}.snavg{gap:0;margin-bottom:20px;background:var(--bg-2);border:1px solid var(--line);border-radius:var(--r-l);overflow:hidden}.snavg button{height:44px;padding:0 12px;gap:12px;border-radius:0;font-size:15px}.snavg button:not([hidden])~button:not([hidden]){border-top:1px solid var(--line)}.snavg .stile{width:28px;height:28px}.snavg .stile svg{width:var(--ico);height:var(--ico)}.sset:not(.pick) .snav{display:none}.sset.pick .smain>.spage{display:none}.smain{overflow:visible;padding:0 0 24px}.sup{display:flex;align-items:center;gap:6px;margin-bottom:12px;font-size:13px;color:var(--dim)}.spage>header{gap:12px;margin-bottom:20px}.spage>header .stile{width:40px;height:40px}.spage>header .stile svg{width:20px;height:20px}.sset .srow{grid-template-columns:minmax(0,1fr)}.sset .srow>:nth-child(2){grid-column:1;grid-row:auto;justify-self:start;margin-top:6px;max-width:100%}.sset .srow .hint{grid-row:auto}.sset .srow input.sel,.sset .fpick{width:100%}.sset .fpick input.sel{flex:1;min-width:0}.sset .bar{flex-wrap:wrap}}
|
|
1025
1054
|
/* the one switch, everywhere (toggle() in board/dom.ts writes it): a <button role="switch"> flipped with .on, or a
|
|
1026
1055
|
checkbox (:checked) where a form reads it; drawn as a track and a thumb. .sm is the compact size. */
|
|
1027
1056
|
.chk{appearance:none;margin:0;border:0;cursor:pointer;width:51px;height:31px;flex:none;border-radius:var(--r-pill);background:color-mix(in srgb,var(--dim) 40%,transparent);position:relative;transition:background .12s}
|