@songsid/agend 2.3.5-alpha.11 → 2.3.5-alpha.12
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/dist/accounts-view.d.ts +3 -0
- package/dist/accounts-view.js +2 -2
- package/dist/accounts-view.js.map +1 -1
- package/dist/auth-api.js +12 -28
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.js +16 -3
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +16 -0
- package/dist/backend/credential-profile.js +44 -0
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/muse.d.ts +3 -1
- package/dist/backend/muse.js +31 -1
- package/dist/backend/muse.js.map +1 -1
- package/dist/backend/types.d.ts +12 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/create-host-account.d.ts +17 -0
- package/dist/create-host-account.js +47 -0
- package/dist/create-host-account.js.map +1 -0
- package/dist/daemon.d.ts +23 -0
- package/dist/daemon.js +114 -8
- package/dist/daemon.js.map +1 -1
- package/dist/delivery-outbox.js +7 -0
- package/dist/delivery-outbox.js.map +1 -1
- package/dist/fleet-manager.d.ts +32 -8
- package/dist/fleet-manager.js +146 -31
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +1 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +1 -1
- package/dist/instance-lifecycle.js +29 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +7 -7
- package/dist/public-web-link.d.ts +5 -0
- package/dist/public-web-link.js +8 -0
- package/dist/public-web-link.js.map +1 -1
- package/dist/settings-api.js +5 -17
- package/dist/settings-api.js.map +1 -1
- package/dist/signin-keepalive.d.ts +25 -1
- package/dist/signin-keepalive.js +44 -1
- package/dist/signin-keepalive.js.map +1 -1
- package/dist/ui/accounts-view.js +9 -7
- package/dist/ui/hub-strings.js +6 -6
- package/dist/ui/panel-chat.js +2 -1
- package/dist/ui/panel-fleet.js +7 -1
- package/dist/ui/panel-settings.js +7 -1
- package/dist/ui/settings-access-overview.js +167 -0
- package/dist/ui/settings-access-strings.js +1 -1
- package/dist/ui/settings-devices.js +5 -5
- package/dist/ui/settings-layout.js +3 -1
- package/dist/ui/settings-strings.js +8 -8
- package/dist/ui/shared/app-shell.js +1 -1
- package/dist/ui/shared/app-store.js +2 -0
- package/dist/ui/shared/app.css +50 -12
- package/dist/ui/shared/chat-render.js +17 -5
- package/dist/ui/shared/device-roles.js +1 -1
- package/dist/ui/shared/signin.js +130 -43
- package/dist/ui/shared/usage-dialog.js +27 -15
- package/dist/ui/shared/web-authorize.js +2 -2
- package/dist/ui/signin.html +19 -8
- package/dist/usage/format-rich.js +1 -1
- package/dist/usage/format-rich.js.map +1 -1
- package/dist/usage/usage-api.d.ts +8 -2
- package/dist/usage/usage-api.js +12 -5
- package/dist/usage/usage-api.js.map +1 -1
- package/dist/web-api.d.ts +5 -0
- package/dist/web-api.js +58 -0
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +2 -0
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-remote-access.d.ts +71 -3
- package/dist/web-remote-access.js +197 -6
- package/dist/web-remote-access.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/shared/signin-authenticator.js +0 -60
- package/dist/ui/signin-authenticator.html +0 -60
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
// S-120 (M-2753 story 8): Settings → Access & security → Overview. Three cards up front — who is signed in (admins and
|
|
2
|
+
// guests, each with Sign out), the ways in from outside (the public link, a fixed address, connections from outside,
|
|
3
|
+
// shared links; Close now where the page may), and two-step confirmation (THIS admin's own authenticator, #3503: shown and
|
|
4
|
+
// linked, never changed here) — then the other connections, each on its own page with its own disconnect or remove.
|
|
5
|
+
// Every action here is an existing route asked again by the server: a sign-out is POST /ui/devices/signout (#3553).
|
|
6
|
+
// The words are English and 繁體中文, as everything in src/ui (tests/i18n-ui-literals-2390.test.ts).
|
|
7
|
+
import { html, useEffect, useState } from "/assets/app-html.js";
|
|
8
|
+
import { t, register } from "/assets/app-i18n.js";
|
|
9
|
+
import { Dialog } from "/assets/ui-dialog.js";
|
|
10
|
+
import { Icon } from "/assets/ui-icons.js";
|
|
11
|
+
import { navigate } from "/assets/app-nav.js";
|
|
12
|
+
import { appStore, useStore } from "/assets/app-store.js";
|
|
13
|
+
import { sectionPath } from "/assets/app-route.js";
|
|
14
|
+
import { api } from "./settings-confirm.js";
|
|
15
|
+
import { agoWords } from "./settings-devices.js";
|
|
16
|
+
import { roleName } from "/assets/device-roles.js";
|
|
17
|
+
|
|
18
|
+
register("accessov", {
|
|
19
|
+
en: {
|
|
20
|
+
devicesTitle: "Signed-in devices", devicesCount: "{0} signed in", more: "{0} more in Devices & sign-in", manageDevices: "Devices & sign-in", manageGuests: "Guests",
|
|
21
|
+
legend: "✓ the verified owner: may add devices and sign others out. Not verified: everyday use only.",
|
|
22
|
+
blockedOwner: "Verify as the owner first to sign out other devices.", blockedOther: "Another admin's device: only that admin can sign it out.",
|
|
23
|
+
signOutTitle: "Sign out {0}?", signOutLead: "{0} is signed out at once and has to sign in again.", signedOut: "{0} was signed out.",
|
|
24
|
+
entryTitle: "Ways in from outside", publicLink: "Public link", publicLinkHint: "An address that opens this dashboard from anywhere; signing in is still required.",
|
|
25
|
+
linkOpen: "Open", linkQuick: "temporary address", linkNamed: "fixed address {0}", linkLeft: "{0} left", hm: "{0} h {1} min", h: "{0} h", m: "{0} min", linkNoExpiry: "no expiry", linkClosed: "Closed", linkNotAllowed: "Not allowed",
|
|
26
|
+
outside: "Connections from outside", outsideHint: "Signing in from outside with the 6-digit code (authenticator app).", allowed: "Allowed", off: "Off",
|
|
27
|
+
shares: "Shared links", sharesHint: "Read-only office views and pages; whoever has the link can view them without signing in.",
|
|
28
|
+
sharesCount: "{0} open", none: "None", closeNow: "Close the public link now", manageSharing: "Public & sharing",
|
|
29
|
+
closeTitle: "Close the public link now?", closeLead: "The link stops working at once. Devices signed in through it are signed out.", closeGo: "Close the link", closed: "The public link is closed.", closeFailed: "The link could not be closed. Try again.",
|
|
30
|
+
outsideOwned: "This is the outside connection. Turn off “Connections from outside” in Owner verification to close it.",
|
|
31
|
+
twoStepTitle: "Owner verification", twoStepMine: "Your own authenticator app. Every admin sets up their own.",
|
|
32
|
+
app: "Authenticator app", appSet: "Set up on {0}", appNone: "Not set up", askCode: "Ask for my 6-digit code to confirm changes",
|
|
33
|
+
on: "On", goOwner: "Owner verification settings", twoStepNone: "Without it, changes from other devices are confirmed with Apply now.",
|
|
34
|
+
otherTitle: "Other connections", otherLead: "Disconnect or remove each one on its own page.",
|
|
35
|
+
hub: "Hub", hubHint: "Your team's Hub and the agents shared there", windows: "Windows computers", windowsHint: "Windows computers connected to run agents",
|
|
36
|
+
accounts: "AI accounts", accountsHint: "The Claude, Codex and other accounts your agents use", hubOn: "Connected", paired: "{0} connected",
|
|
37
|
+
},
|
|
38
|
+
"zh-TW": {
|
|
39
|
+
devicesTitle: "已登入的裝置", devicesCount: "{0} 個登入", more: "另外 {0} 個,到「裝置與登入」查看", manageDevices: "裝置與登入", manageGuests: "訪客",
|
|
40
|
+
legend: "✓ 已驗證的擁有者:可新增裝置、登出其他裝置。未驗證:只能使用一般功能。",
|
|
41
|
+
blockedOwner: "要先驗證為擁有者,才能登出其他裝置。", blockedOther: "別的管理員的裝置,只有那位管理員本人能登出。",
|
|
42
|
+
signOutTitle: "登出 {0}?", signOutLead: "{0} 會立即登出,之後需要重新登入。", signedOut: "已登出 {0}。",
|
|
43
|
+
entryTitle: "從外面連線的方式", publicLink: "公開連結", publicLinkHint: "從任何地方開啟這個儀表板的網址;開啟後仍要登入。",
|
|
44
|
+
linkOpen: "開啟中", linkQuick: "臨時網址", linkNamed: "固定網址 {0}", linkLeft: "剩 {0}", hm: "{0} 小時 {1} 分", h: "{0} 小時", m: "{0} 分", linkNoExpiry: "不過期", linkClosed: "已關閉", linkNotAllowed: "不允許",
|
|
45
|
+
outside: "從外面連線", outsideHint: "從外面登入時,用 6 位數驗證碼(驗證器 App)。", allowed: "允許", off: "關閉",
|
|
46
|
+
shares: "分享連結", sharesHint: "唯讀的辦公室畫面或網頁;拿到連結的人不用登入就能看。",
|
|
47
|
+
sharesCount: "{0} 個開放中", none: "沒有", closeNow: "立即關閉公開連結", manageSharing: "公開與分享",
|
|
48
|
+
closeTitle: "立即關閉公開連結?", closeLead: "連結會馬上失效,透過它登入的裝置也會一併登出。", closeGo: "關閉連結", closed: "公開連結已關閉。", closeFailed: "沒能關閉連結,請再試一次。",
|
|
49
|
+
outsideOwned: "這是「從外面連線」用的連結。要關閉,請到擁有者驗證關掉「從外面連線」。",
|
|
50
|
+
twoStepTitle: "擁有者驗證", twoStepMine: "這是你自己的驗證器 App;每位管理員各自設定。",
|
|
51
|
+
app: "驗證器 App", appSet: "已於 {0} 設定", appNone: "尚未設定", askCode: "確認變更時要求我的 6 位數驗證碼",
|
|
52
|
+
on: "開啟", goOwner: "擁有者驗證設定", twoStepNone: "未設定時,其他裝置上的變更以「立即套用」確認。",
|
|
53
|
+
otherTitle: "其他連線", otherLead: "到各自的頁面中斷或移除。",
|
|
54
|
+
hub: "Hub", hubHint: "你的團隊 Hub,以及在那裡分享的 Agent", windows: "Windows 電腦", windowsHint: "連上這裡、用來執行 Agent 的 Windows 電腦",
|
|
55
|
+
accounts: "AI 帳號", accountsHint: "Agent 使用的 Claude、Codex 等帳號", hubOn: "已連線", paired: "已連上 {0} 台",
|
|
56
|
+
},
|
|
57
|
+
});
|
|
58
|
+
const to = (k, ...a) => t(`accessov.${k}`, ...a);
|
|
59
|
+
const SHOWN = 4;
|
|
60
|
+
const leftWords = (ms) => { const m = Math.max(1, Math.round(ms / 60_000)); return m >= 60 ? (m % 60 ? to("hm", Math.floor(m / 60), m % 60) : to("h", Math.floor(m / 60))) : to("m", m); };
|
|
61
|
+
const day = (ms) => { const d = new Date(ms); return `${d.getFullYear()}/${String(d.getMonth() + 1).padStart(2, "0")}/${String(d.getDate()).padStart(2, "0")}`; };
|
|
62
|
+
|
|
63
|
+
function Row({ label, value, tone, hint }) {
|
|
64
|
+
return html`<div class="s-ov-row"><dt>${label}</dt><dd class=${tone ? `s-ov-${tone}` : ""}>${value}</dd>${hint ? html`<small class="s-ov-hint">${hint}</small>` : null}</div>`;
|
|
65
|
+
}
|
|
66
|
+
function More({ label, onClick }) {
|
|
67
|
+
return html`<button type="button" class="s-ov-link" onClick=${onClick}><span>${label}</span><${Icon} name="chevron" size=${14} /></button>`;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function AccessOverview({ web = {}, hub, openTab, overPublicLink, active = true }) {
|
|
71
|
+
// Devices: GET /ui/devices only (#3553) — every tier, its role, and whether this session may sign it out.
|
|
72
|
+
const [devices, setDevices] = useState(null);
|
|
73
|
+
const [outside, setOutside] = useState(null);
|
|
74
|
+
const [shares, setShares] = useState(null), [machines, setMachines] = useState(null);
|
|
75
|
+
const [ask, setAsk] = useState(null), [askClose, setAskClose] = useState(false), [linkNote, setLinkNote] = useState("");
|
|
76
|
+
const { publicLink } = useStore(appStore);
|
|
77
|
+
const [busy, setBusy] = useState(false);
|
|
78
|
+
const [note, setNote] = useState("");
|
|
79
|
+
const load = async () => {
|
|
80
|
+
const [d, o] = await Promise.all([api("/ui/devices"), api("/ui/outside")]);
|
|
81
|
+
if (d.ok && d.body) setDevices(d.body.devices || []);
|
|
82
|
+
if (o.ok && o.body) setOutside(o.body);
|
|
83
|
+
// Existing reads only: the share lists (office + page) and the paired computers; one that is refused says nothing.
|
|
84
|
+
const [os, ps, rt] = await Promise.all([api("/ui/office-share"), api("/ui/page-share"), api("/ui/runtimes")]);
|
|
85
|
+
setShares([os, ps].reduce((n, r) => n + (r.ok && r.body && Array.isArray(r.body.shares) ? r.body.shares.length : 0), 0));
|
|
86
|
+
if (rt.ok && rt.body && rt.body.enabled) setMachines((rt.body.machines || []).length);
|
|
87
|
+
};
|
|
88
|
+
// Read again whenever the tab is shown: the tab panels stay mounted, so a device signed out on 裝置與登入 (or a link
|
|
89
|
+
// closed elsewhere) would otherwise still be listed here.
|
|
90
|
+
useEffect(() => { if (active) load(); }, [active]);
|
|
91
|
+
const rows = [...(devices || [])].sort((a, b) => (b.current ? 1 : 0) - (a.current ? 1 : 0));
|
|
92
|
+
const blockedWhy = (d) => to(d.signOutBlocked === "other_admin" ? "blockedOther" : "blockedOwner");
|
|
93
|
+
const signOut = async () => {
|
|
94
|
+
const d = ask; setBusy(true);
|
|
95
|
+
const r = await api("/ui/devices/signout", { method: "POST", body: JSON.stringify({ handle: d.handle }) });
|
|
96
|
+
setBusy(false); setAsk(null); setNote(r.ok ? to("signedOut", d.label) : (r.body && r.body.error) || `HTTP ${r.status}`);
|
|
97
|
+
load();
|
|
98
|
+
};
|
|
99
|
+
// The link's state: the shell's status frame (every fleet; a tab from before S-120 has none — then /ui/outside's).
|
|
100
|
+
const pub = web.public_link || {};
|
|
101
|
+
const framed = publicLink && publicLink.state !== "closed" ? { ...publicLink, quick: !pub.hostname } : null;
|
|
102
|
+
const link = framed || (outside && outside.link) || null;
|
|
103
|
+
// A web-only fleet's outside link is the owner's switch (#3008): closed there, not here (the route answers 409).
|
|
104
|
+
const outsideOwned = !!(link && outside && outside.webOnly && outside.outside);
|
|
105
|
+
const closeLink = async () => {
|
|
106
|
+
setBusy(true);
|
|
107
|
+
const r = await api("/ui/public-link/close", { method: "POST", body: "{}" });
|
|
108
|
+
setBusy(false); setAskClose(false);
|
|
109
|
+
setLinkNote(r.ok ? to("closed") : r.body && r.body.error === "outside_link" ? to("outsideOwned") : to("closeFailed"));
|
|
110
|
+
load();
|
|
111
|
+
};
|
|
112
|
+
const linkValue = link ? html`<span class="tag tag-ok">${to("linkOpen")}</span> ${link.quick ? to("linkQuick") : to("linkNamed", pub.hostname || "")} · ${link.noExpiry ? to("linkNoExpiry") : link.expiresAt ? to("linkLeft", leftWords(link.expiresAt - Date.now())) : ""}`
|
|
113
|
+
: pub.allow_public === false ? to("linkNotAllowed") : pub.hostname ? `${to("linkClosed")} · ${to("linkNamed", pub.hostname)}` : to("linkClosed");
|
|
114
|
+
return html`<div class="s-ov" id="accessOverview">
|
|
115
|
+
<div class="s-ov-grid">
|
|
116
|
+
<section class="card s-ov-card s-ov-devices" id="ovDevices"><h3 class="s-ov-title"><${Icon} name="user" size=${18} />${to("devicesTitle")}</h3>
|
|
117
|
+
<p class="note">${to("devicesCount", rows.length)}</p>
|
|
118
|
+
<ul class="s-ov-devlist s-ov-list">${rows.slice(0, SHOWN).map((d) => html`<li class=${`s-ov-dev${d.current ? " current" : ""}`} key=${d.handle} data-handle=${d.handle}>
|
|
119
|
+
<div class="s-ov-dev-main"><span class="s-ov-dev-name">${d.label}${d.current ? html` <span class="tag">${t("app.thisDevice")}</span>` : null}</span>
|
|
120
|
+
<span class="s-ov-dev-meta"><span data-role=${d.tier === "admin" ? (d.verified ? "owner" : "admin") : d.tier}>${roleName(d.tier, d.verified)}</span> · ${t("app.lastActive", agoWords(d.lastSeen))}</span>
|
|
121
|
+
${!d.current && !d.canSignOut ? html`<span class="s-ov-why">${blockedWhy(d)}</span>` : null}</div>
|
|
122
|
+
${d.current ? null : html`<button type="button" class=${`btn btn-sm${d.canSignOut ? " btn-danger" : ""}`} data-ov-signout=${d.handle} disabled=${!d.canSignOut || busy} onClick=${() => d.canSignOut && setAsk(d)}>${t("app.signOut")}</button>`}
|
|
123
|
+
</li>`)}</ul>
|
|
124
|
+
${rows.length > SHOWN ? html`<${More} label=${to("more", rows.length - SHOWN)} onClick=${() => openTab("login", "devicesCard")} />` : null}
|
|
125
|
+
<p class="note s-ov-legend">${to("legend")}</p>
|
|
126
|
+
${note ? html`<p class="note" role="status">${note}</p>` : null}
|
|
127
|
+
<footer><${More} label=${to("manageDevices")} onClick=${() => openTab("login", "devicesCard")} /><${More} label=${to("manageGuests")} onClick=${() => openTab("guests")} /></footer>
|
|
128
|
+
</section>
|
|
129
|
+
<section class="card s-ov-card" id="ovEntry"><h3 class="s-ov-title"><${Icon} name="globe" size=${18} />${to("entryTitle")}</h3>
|
|
130
|
+
<dl class="s-ov-facts">
|
|
131
|
+
<${Row} label=${to("publicLink")} hint=${to("publicLinkHint")} value=${linkValue} />
|
|
132
|
+
${outside && outside.webOnly ? html`<${Row} label=${to("outside")} hint=${to("outsideHint")} value=${to(outside.outside ? "allowed" : "off")} />` : null}
|
|
133
|
+
${shares !== null ? html`<${Row} label=${to("shares")} hint=${to("sharesHint")} value=${shares ? to("sharesCount", shares) : to("none")} tone=${shares ? "" : "muted"} />` : null}
|
|
134
|
+
</dl>
|
|
135
|
+
${link && !overPublicLink ? outsideOwned
|
|
136
|
+
? html`<p class="note" id="ovOutsideOwned">${to("outsideOwned")} <${More} label=${to("goOwner")} onClick=${() => openTab("login", "outsideCard")} /></p>`
|
|
137
|
+
: html`<div class="s-ov-actions"><button type="button" class="btn btn-sm btn-danger" id="ovCloseLink" disabled=${busy} onClick=${() => setAskClose(true)}>${to("closeNow")}</button></div>` : null}
|
|
138
|
+
${linkNote ? html`<p class="note" role="status" id="ovLinkNote">${linkNote}</p>` : null}
|
|
139
|
+
<footer><${More} label=${to("manageSharing")} onClick=${() => openTab("sharing")} /></footer>
|
|
140
|
+
</section>
|
|
141
|
+
<section class="card s-ov-card" id="ovTwoStep"><h3 class="s-ov-title"><${Icon} name="key" size=${18} />${to("twoStepTitle")}</h3>
|
|
142
|
+
<p class="note">${to("twoStepMine")}</p>
|
|
143
|
+
<dl class="s-ov-facts">
|
|
144
|
+
<${Row} label=${to("app")} value=${outside && outside.enrolled ? html`<span class="tag tag-ok">${to("appSet", day(outside.enrolledAt))}</span>` : html`<span class="tag">${to("appNone")}</span>`} />
|
|
145
|
+
<${Row} label=${to("askCode")} value=${to(outside && outside.strict ? "on" : "off")} tone=${outside && outside.strict ? "" : "muted"} />
|
|
146
|
+
</dl>
|
|
147
|
+
${outside && !outside.enrolled ? html`<p class="note">${to("twoStepNone")}</p>` : null}
|
|
148
|
+
<footer><${More} label=${to("goOwner")} onClick=${() => openTab("login", "outsideCard")} /></footer>
|
|
149
|
+
</section>
|
|
150
|
+
</div>
|
|
151
|
+
<section class="s-ov-other" id="ovOther"><h3>${to("otherTitle")}</h3><p class="note">${to("otherLead")}</p>
|
|
152
|
+
<div class="s-ov-tiles">
|
|
153
|
+
${[["plug", "hub", "hubHint", "hub", hub ? to("hubOn") : null], ["code", "windows", "windowsHint", "runtimes", machines ? to("paired", machines) : null], ["bot", "accounts", "accountsHint", "agents", null]].map(([icon, k, hint, sec, state]) => html`
|
|
154
|
+
<button type="button" class="s-ov-tile" data-ov-go=${sec} onClick=${() => navigate(sectionPath(sec))}><${Icon} name=${icon} size=${18} />
|
|
155
|
+
<span><strong>${to(k)}</strong><small>${to(hint)}</small>${state ? html`<small class="s-ov-state">${state}</small>` : null}</span><${Icon} name="chevron" size=${16} /></button>`)}
|
|
156
|
+
</div>
|
|
157
|
+
</section>
|
|
158
|
+
${askClose ? html`<${Dialog} title=${to("closeTitle")} onClose=${() => { if (!busy) setAskClose(false); }} busy=${busy} actions=${html`
|
|
159
|
+
<button type="button" class="btn" disabled=${busy} onClick=${() => setAskClose(false)}>${t("app.cancel")}</button>
|
|
160
|
+
<button type="button" class="btn btn-danger" id="ovCloseGo" disabled=${busy} onClick=${closeLink}>${to("closeGo")}</button>`}>
|
|
161
|
+
<p class="note">${to("closeLead")}</p></${Dialog}>` : null}
|
|
162
|
+
${ask ? html`<${Dialog} title=${to("signOutTitle", ask.label)} onClose=${() => { if (!busy) setAsk(null); }} busy=${busy} actions=${html`
|
|
163
|
+
<button type="button" class="btn" disabled=${busy} onClick=${() => setAsk(null)}>${t("app.cancel")}</button>
|
|
164
|
+
<button type="button" class="btn btn-danger" id="ovSignOutGo" disabled=${busy} onClick=${signOut}>${t("app.signOut")}</button>`}>
|
|
165
|
+
<p class="note">${to("signOutLead", ask.label)}</p></${Dialog}>` : null}
|
|
166
|
+
</div>`;
|
|
167
|
+
}
|
|
@@ -23,7 +23,7 @@ register("settings", {
|
|
|
23
23
|
},
|
|
24
24
|
"zh-TW": {
|
|
25
25
|
webLoginQr: "新裝置用其他裝置登入時顯示 QR Code",
|
|
26
|
-
webLoginQrHint: "顯示在新裝置登入頁、8
|
|
26
|
+
webLoginQrHint: "顯示在新裝置登入頁、8 字元裝置登入碼旁邊。裡面只有該頁面的網址和裝置登入碼,沒有任何憑證;核准仍需要已登入並驗證擁有者的裝置。預設關閉;有連接聊天平台的 fleet 不受影響。",
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -58,7 +58,7 @@ register("devices", {
|
|
|
58
58
|
signOutAllLeadChat: "This device, your other devices and every guest and read-only session are signed out. Other admins' devices stay signed in. You will have to sign in again.",
|
|
59
59
|
},
|
|
60
60
|
"zh-TW": {
|
|
61
|
-
title: "裝置與登入", lead: "用 8
|
|
61
|
+
title: "裝置與登入", lead: "用 8 字元裝置登入碼讓新裝置登入。在已登入且已驗證擁有者的裝置上,到這裡核准。",
|
|
62
62
|
add: "新增裝置", noCopy: "核准不會複製這台裝置的登入狀態,新裝置會取得自己的工作階段。",
|
|
63
63
|
ownerOnly: "只有已驗證擁有者的裝置才能新增裝置。請使用 AgEnD 電腦,或用驗證器 App 登入。",
|
|
64
64
|
dlgTitle: "新增裝置", dlgLead: "在新裝置上選「使用其他裝置登入」,再輸入它顯示的裝置登入碼。",
|
|
@@ -81,12 +81,12 @@ register("devices", {
|
|
|
81
81
|
signedOut: "已登出 {0}。", alreadyGone: "這台裝置已經登出了。",
|
|
82
82
|
notSaved: "暫時登出了,但變更沒能儲存:重新啟動後這個工作階段可能會回來。這個頁面無法修復工作階段的儲存問題。",
|
|
83
83
|
authorityOff: "網頁授權已關閉,所以沒有任何裝置是擁有者:不能新增裝置,也不能登出其他裝置。",
|
|
84
|
-
chatLead: "
|
|
85
|
-
signOutOtherAdmin: "
|
|
86
|
-
lostOther: "
|
|
84
|
+
chatLead: "登入這個儀表板的所有裝置。你可以登出自己的裝置,以及任何訪客或唯讀的登入;別的管理員的裝置只有那位管理員本人能登出。",
|
|
85
|
+
signOutOtherAdmin: "只有這台裝置所屬的管理員本人能登出它。",
|
|
86
|
+
lostOther: "那台裝置屬於別的管理員:只有他本人能登出。",
|
|
87
87
|
signOutAll: "全部登出", signOutAllTitle: "全部登出?",
|
|
88
88
|
signOutAllLeadWeb: "所有裝置都會登出,包含這一台,之後需要重新登入。",
|
|
89
|
-
signOutAllLeadChat: "
|
|
89
|
+
signOutAllLeadChat: "這台裝置、你的其他裝置,以及所有訪客和唯讀的登入都會登出;別的管理員的裝置不受影響。之後需要重新登入。",
|
|
90
90
|
},
|
|
91
91
|
});
|
|
92
92
|
const td = (k, ...v) => t(`devices.${k}`, ...v);
|
|
@@ -59,6 +59,7 @@ export const layoutText = (key, ...values) => t(`settingsLayout.${key}`, ...valu
|
|
|
59
59
|
|
|
60
60
|
register("settingsLayout", {
|
|
61
61
|
"en": {
|
|
62
|
+
"accessOverview": "Overview",
|
|
62
63
|
"accessLogin": "Sign-in & authority",
|
|
63
64
|
"accessGuests": "Guests",
|
|
64
65
|
"accessSharing": "Public & sharing",
|
|
@@ -75,6 +76,7 @@ register("settingsLayout", {
|
|
|
75
76
|
"effectiveSourceDefault": "Default"
|
|
76
77
|
},
|
|
77
78
|
"zh-TW": {
|
|
79
|
+
"accessOverview": "總覽",
|
|
78
80
|
"accessLogin": "登入與授權",
|
|
79
81
|
"accessGuests": "訪客",
|
|
80
82
|
"accessSharing": "公開與分享",
|
|
@@ -229,7 +231,7 @@ register("settingsLayout", {
|
|
|
229
231
|
"revEditorContext": "Fleet 設定檔・個別設定可使用對應表單調整",
|
|
230
232
|
"revUpdateCredential": "更新連接器憑證",
|
|
231
233
|
"revSetCredential": "設定連接器憑證",
|
|
232
|
-
"revAuthorityBrief": "僅限已登入的 Fleet
|
|
234
|
+
"revAuthorityBrief": "僅限已登入的 Fleet 管理員,並須在 Discord 或 Telegram 確認本人帳號授權;訪客不適用。發布、破壞性操作、花費、密鑰與轉交授權都需要它。",
|
|
233
235
|
"revAuthorityDetails": "授權規則說明",
|
|
234
236
|
"revAuthorityEnabled": "允許網頁授權",
|
|
235
237
|
"revAuthorityEnabledHint": "關閉會立即使現有授權失效;重新開啟不會恢復。",
|
|
@@ -686,7 +686,7 @@ register("settings", {
|
|
|
686
686
|
se_hint: "留空即使用預設值。預覽由 AgEnD 依 bot 實際 react 的方式解析。進度前綴不是反應,而是進度訊息開頭的 emoji。",
|
|
687
687
|
noticeTopic: "頻道", noticeOff: "關閉",
|
|
688
688
|
webNotifyLogin: "網頁登入通知",
|
|
689
|
-
webNotifyLoginHint: "
|
|
689
|
+
webNotifyLoginHint: "發在頻道。關閉只停用管理員登入通知;訪客與公開連結安全通知仍會發出。預設:頻道。",
|
|
690
690
|
title: "設定",
|
|
691
691
|
myAgents: "我的 Agent",
|
|
692
692
|
bots: "機器人",
|
|
@@ -1008,7 +1008,7 @@ register("settings", {
|
|
|
1008
1008
|
cardSizeLead: "卡片上的 小/中/大 可單獨設定。",
|
|
1009
1009
|
cardLimitsTitle: "身分卡上傳限制",
|
|
1010
1010
|
cardLimitsLead: "留空=預設值。調高上限需管理員確認。",
|
|
1011
|
-
cardLimitsUnavailable: "
|
|
1011
|
+
cardLimitsUnavailable: "只有已登入的管理員能修改。",
|
|
1012
1012
|
cardLimit_portrait_max_width: "肖像寬度(px)", cardLimit_portrait_max_height: "肖像高度(px)", cardLimit_portrait_max_kib: "肖像大小(KiB)",
|
|
1013
1013
|
cardLimit_banner_max_width: "橫幅寬度(px)", cardLimit_banner_max_height: "橫幅高度(px)", cardLimit_banner_max_kib: "橫幅大小(KiB)",
|
|
1014
1014
|
cardLimit_instance_quota_files: "每個 agent 的圖片數", cardLimit_instance_quota_mib: "每個 agent 的圖片空間(MiB)",
|
|
@@ -1097,13 +1097,13 @@ register("settings", {
|
|
|
1097
1097
|
appIconLow: "小於 512\u00a0px:會被放大,可能不夠清晰。",
|
|
1098
1098
|
appIconNotAnImage: "無法把這個檔案讀成圖片。",
|
|
1099
1099
|
appIconLoadFailed: "讀不到 App 圖示的設定。",
|
|
1100
|
-
appIconReadOnly: "
|
|
1100
|
+
appIconReadOnly: "只有管理員的 session 能更換。",
|
|
1101
1101
|
appIconWho: "能打開這個網址的人都看得到:請別用私人照片。",
|
|
1102
1102
|
appIconIos: "iPhone 主畫面要刪掉捷徑重新加入才會換。",
|
|
1103
1103
|
appIconError_app_icon_too_large: "圖片太大({0})。",
|
|
1104
1104
|
appIconError_app_icon_not_png: "主機只接受 PNG({0})。",
|
|
1105
1105
|
appIconError_app_icon_unreadable: "這張圖無法使用:{0}。",
|
|
1106
|
-
appIconError_app_icon_admin_only: "
|
|
1106
|
+
appIconError_app_icon_admin_only: "只有管理員的 session 能更換 App 圖示。",
|
|
1107
1107
|
appIconError_app_icon_needs_a_signed_in_person: "請先登入再更換 App 圖示。",
|
|
1108
1108
|
appIconError_app_icon_busy: "另一張圖示正在處理中,請稍後再試。",
|
|
1109
1109
|
appIconError_app_icon_superseded: "圖示剛被恢復成預設,請重新選擇圖片。",
|
|
@@ -1164,7 +1164,7 @@ register("settings", {
|
|
|
1164
1164
|
webLead: "網頁儀表板的行為。放寬存取的變更(延長 session、重新開啟或延長瀏覽器終端機、公開連結)需要 fleet admin 確認:在 Telegram 或 Discord 的 General,或在儀表板上卡片提供確認的地方;收緊的變更會立即套用。",
|
|
1165
1165
|
webPublicRefused: "無法透過公開連結變更網頁設定。請從儀表板本身的網址開啟後再變更。",
|
|
1166
1166
|
webSessionTitle: "登入 session",
|
|
1167
|
-
webSessionHint: "適用於從儀表板本身網址登入的 session(本機、區域網路、tailnet)。透過公開連結(臨時連結或你的固定網域)的 session 最長 8 小時、閒置 30
|
|
1167
|
+
webSessionHint: "適用於從儀表板本身網址登入的 session(本機、區域網路、tailnet)。透過公開連結(臨時連結或你的固定網域)的 session 最長 8 小時、閒置 30 分鐘就結束,也不會超過連結本身;管理員的 session 也不會超過這裡的設定(訪客依訪客設定)。縮短會讓已超過新限制的 session 結束;延長會套用到新的登入,以及既有 session 下次使用時的閒置時間。留空 = 預設值。",
|
|
1168
1168
|
sessionAbsolute: "Session 時長,小時(1–720)",
|
|
1169
1169
|
sessionIdle: "閒置多久後登出,小時(1–720)",
|
|
1170
1170
|
sessionRange: "必須是 1 到 720 之間的小時數",
|
|
@@ -1176,7 +1176,7 @@ register("settings", {
|
|
|
1176
1176
|
webTerminalTtlRange: "必須是 1 到 20 之間的整數",
|
|
1177
1177
|
webReadOnlyTitle: "在 fleet.yaml 設定",
|
|
1178
1178
|
guestsTitle: "訪客", guestsReview: "檢視訪客變更",
|
|
1179
|
-
guestsHint: "
|
|
1179
|
+
guestsHint: "不是管理員的人可以用訪客身分登入網頁:在他本來就能聊天的地方傳 /web,就會私下收到裝置登入碼。訪客只會看到在聊天中本來就能用的 agent,他的訊息僅供辨識。",
|
|
1180
1180
|
guestsEnabled: "訪客登入", guestsEnabledHint: "關閉:沒有人能以訪客登入,所有訪客 session 都會結束。開啟需 fleet admin 確認。",
|
|
1181
1181
|
guestsChat: "訪客可以聊天", guestsChatHint: "關閉:訪客可以讀他的 agent 的聊天,但不能送訊息、附加檔案、按回覆的按鈕或按取消。",
|
|
1182
1182
|
guestsOpenFor: "{0}({1})訪客可用的 agent", guestsOpenHint: "這個連線對所有人開放,沒有人員名單:它的訪客只能用你在這裡勾選的 agent(預設沒有)。新增 agent 需 fleet admin 確認。",
|
|
@@ -1208,7 +1208,7 @@ register("settings", {
|
|
|
1208
1208
|
codeBusy: "目前有太多訪客登入碼還沒被使用,請過幾分鐘再試", codeRevoked: "你已不再被授權", grantsWaiting: "等待 fleet 管理員在 General 同意。", grantsSaveFailed: "沒有儲存:{0}",
|
|
1209
1209
|
grantsPublicLinkNote: "如果對方不在這個網路上,請先開啟公開連結,再傳送裝置登入碼。",
|
|
1210
1210
|
vaTitle: "網頁授權", vaReview: "檢視網頁授權變更",
|
|
1211
|
-
vaHint: "已登入的 fleet
|
|
1211
|
+
vaHint: "已登入的 fleet 管理員從網頁送出的訊息,是否帶有他本人帳號的授權,記錄在每則訊息的送達收據中。用私下傳給該帳號的裝置登入碼、透過直接連線的 dashboard 登入的 session,要在 Discord 或 Telegram 上授權一次;訪客一律不行;公開連結只在下方對應的選項開啟時可以。一般的網頁請求,agent 本來就會照做;發布、破壞性操作、花費、密鑰,或把授權交給別人,則需要它。",
|
|
1212
1212
|
vaLoadFailed: "無法載入網頁授權。",
|
|
1213
1213
|
vaEnabled: "網頁訊息帶有授權", vaEnabledHint: "預設開啟:session 要等它的帳號在 Discord 或 Telegram 上確認後才帶有授權。關閉:網頁訊息都不帶授權,已給出的授權立即視為無;關閉前給出的授權不會恢復。",
|
|
1214
1214
|
vaStuckOff: "網頁授權目前是關閉的:它的狀態無法存到這台電腦上(請看 fleet 紀錄)。可以存入後會自動恢復。",
|
|
@@ -1275,7 +1275,7 @@ register("settings", {
|
|
|
1275
1275
|
applyError_unsupported_sensitive_effect: "它改到的設定無法在確認中安全顯示,所以什麼都沒有改",
|
|
1276
1276
|
applyError_confirmation_diff_too_large: "一次要確認的內容太多;請分幾次套用",
|
|
1277
1277
|
applyError_session_required: "你的登入已經結束;請重新登入再套用",
|
|
1278
|
-
applyError_admin_required: "只有 fleet
|
|
1278
|
+
applyError_admin_required: "只有 fleet 管理員能確認它",
|
|
1279
1279
|
applyError_settings_changed: "設定在這期間被改過了;請檢查後再套用一次",
|
|
1280
1280
|
applyError_request_no_longer_current: "設定在這期間被改過了;請檢查後再套用一次",
|
|
1281
1281
|
applyError_too_many_pending_changes: "等待確認的變更太多;請先確認或撤回一些",
|
|
@@ -797,7 +797,7 @@ register("pendingEnded", {
|
|
|
797
797
|
},
|
|
798
798
|
"zh-TW": {
|
|
799
799
|
why_withdrawn: "你已撤回這項變更,沒有任何設定被修改。",
|
|
800
|
-
why_rejected: "
|
|
800
|
+
why_rejected: "管理員拒絕了這項變更,沒有任何設定被修改。",
|
|
801
801
|
why_expired: "5 分鐘內沒有完成,請確認設定目前的內容。",
|
|
802
802
|
why_not_found: "AgEnD 已經沒有這項請求(已逾時或已清除),請確認設定目前的內容。",
|
|
803
803
|
why_settings_changed: "你送出之後設定又被修改了,所以沒有套用。請檢查設定後,到設定重新做一次這項變更。",
|
|
@@ -57,6 +57,8 @@ export function applyStatus(d) {
|
|
|
57
57
|
startup: d.startup?.phase === "starting" ? d.startup : null,
|
|
58
58
|
connections: typeof d.connections === "number" ? d.connections : null,
|
|
59
59
|
windowsCli: d.windows_cli === true,
|
|
60
|
+
// S-120: the public link's state as the status frame carries it ({ state, expiresAt?, noExpiry? }), for 存取與安全 → 總覽.
|
|
61
|
+
publicLink: d.publicLink && typeof d.publicLink.state === "string" ? d.publicLink : null,
|
|
60
62
|
// #1665: the host preferences' revision (app-prefs.js re-reads them when it moves).
|
|
61
63
|
prefsRev: typeof d.prefs_rev === "number" ? d.prefs_rev : null,
|
|
62
64
|
// #1629: the agents' themes' revision (app-themes.js re-reads them when it moves).
|
package/dist/ui/shared/app.css
CHANGED
|
@@ -1511,10 +1511,6 @@ body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-s
|
|
|
1511
1511
|
.u-stale-detail { color: var(--text-3); font-size: var(--fs-xs); }
|
|
1512
1512
|
.u-sub { color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
|
|
1513
1513
|
/* #3066 §1: a weekly quota's measured 100% under its bar, and its notes (the fleet-only limit always). */
|
|
1514
|
-
.u-cap { margin-top: 4px; font-size: var(--fs-xs); }
|
|
1515
|
-
.u-cap-line { color: var(--text-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
1516
|
-
.u-cap-wait .u-cap-line { color: var(--text-3); }
|
|
1517
|
-
.u-cap-note { color: var(--text-3); overflow-wrap: anywhere; }
|
|
1518
1514
|
.u-err { color: var(--warn); font-size: var(--fs-sm); }
|
|
1519
1515
|
.u-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
|
|
1520
1516
|
/* #1673: the usage rail beside the page on a wide screen (header-tools.js UsageRail; shown only at min-width 1200px). */
|
|
@@ -1553,6 +1549,8 @@ body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-s
|
|
|
1553
1549
|
.u-cm-tag { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1554
1550
|
/* #2240: an account of several pools (agy) names each pool's line: a wider label, ending in an ellipsis if it must. */
|
|
1555
1551
|
.u-crow.is-pooled .u-cm { grid-template-columns: minmax(0, 7.0em) minmax(0, 1fr) 2.9em 3.7em; column-gap: 7px; }
|
|
1552
|
+
/* M-2815: a per-model weekly on its own bar ("Fable"): a wider tag for every bar of that login, so they line up. */
|
|
1553
|
+
.u-crow.has-models .u-cm { grid-template-columns: minmax(0, 3.6em) minmax(0, 1fr) 2.9em 3.7em; }
|
|
1556
1554
|
.u-cm-bar { height: 6px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
|
|
1557
1555
|
.u-cm-fill { display: block; height: 100%; width: 0; min-width: 2px; border-radius: var(--r-full); background: var(--accent); }
|
|
1558
1556
|
.u-cm-fill.warn { background: var(--warn); } .u-cm-fill.crit { background: var(--danger); }
|
|
@@ -3636,14 +3634,14 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
3636
3634
|
/* Refs #3061 (P2b): the signed-in devices of Devices & sign-in. */
|
|
3637
3635
|
.p-settings .s-devices .s-dev-listhead { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin: 14px 0 6px; }
|
|
3638
3636
|
.p-settings .s-devices .s-dev-listhead h4 { margin: 0; font-size: var(--fs-sm); color: var(--text-2); font-weight: var(--fw-semibold); }
|
|
3639
|
-
.p-settings .s-dev-list { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
|
|
3640
|
-
.p-settings .s-dev-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
|
|
3641
|
-
.p-settings .s-dev-row + .s-dev-row { border-top: 1px solid var(--border); }
|
|
3642
|
-
.p-settings .s-dev-row.current { background: var(--surface-2); }
|
|
3643
|
-
.p-settings .s-dev-main { display: grid; gap: 2px; min-width: 0; }
|
|
3644
|
-
.p-settings .s-dev-name { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
|
|
3645
|
-
.p-settings .s-dev-meta { font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
|
|
3646
|
-
.p-settings .s-dev-row .btn { flex: none; }
|
|
3637
|
+
.p-settings .s-dev-list, .p-settings .s-ov-devlist { list-style: none; margin: 0 0 10px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; }
|
|
3638
|
+
.p-settings .s-dev-row, .p-settings .s-ov-dev { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
|
|
3639
|
+
.p-settings .s-dev-row + .s-dev-row, .p-settings .s-ov-dev + .s-ov-dev { border-top: 1px solid var(--border); }
|
|
3640
|
+
.p-settings .s-dev-row.current, .p-settings .s-ov-dev.current { background: var(--surface-2); }
|
|
3641
|
+
.p-settings .s-dev-main, .p-settings .s-ov-dev-main { display: grid; gap: 2px; min-width: 0; }
|
|
3642
|
+
.p-settings .s-dev-name, .p-settings .s-ov-dev-name { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
|
|
3643
|
+
.p-settings .s-dev-meta, .p-settings .s-ov-dev-meta { font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
|
|
3644
|
+
.p-settings .s-dev-row .btn, .p-settings .s-ov-dev .btn { flex: none; }
|
|
3647
3645
|
.p-settings .s-auth-state { display: inline-flex; align-items: center; justify-content: center; flex: none; padding: 3px 8px; border-radius: 6px; color: var(--text-3); background: var(--surface-2); font-size: 12px; font-weight: var(--fw-regular); line-height: 1.5; white-space: nowrap; }
|
|
3648
3646
|
.p-settings .s-auth-state.is-usable { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
|
|
3649
3647
|
.p-settings .s-auth-state:is(.is-not_signed_in, .is-too_old) { color: var(--warn); background: var(--warn-bg); }
|
|
@@ -4226,3 +4224,43 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
4226
4224
|
.s-hub-connection .field-row > .btn-primary { width: 100%; }
|
|
4227
4225
|
.s-hub-connection .hub-fp .btn { white-space: normal; }
|
|
4228
4226
|
}
|
|
4227
|
+
|
|
4228
|
+
/* S-120: Settings → Access & security → Overview */
|
|
4229
|
+
.p-settings .s-ov { display: flex; flex-direction: column; gap: var(--s-5); }
|
|
4230
|
+
.p-settings .s-ov-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s-4); align-items: stretch; } /* S-120: card bottoms (their footers) aligned */
|
|
4231
|
+
.p-settings .s-ov-devices { grid-row: span 2; }
|
|
4232
|
+
@media (max-width: 900px) { .p-settings .s-ov-grid { grid-template-columns: minmax(0, 1fr); } .p-settings .s-ov-devices { grid-row: auto; } }
|
|
4233
|
+
.p-settings .s-ov-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
|
|
4234
|
+
.p-settings .s-ov-title { display: flex; align-items: center; gap: 8px; margin: 0; }
|
|
4235
|
+
.p-settings .s-ov-title > svg { color: var(--accent); flex: none; }
|
|
4236
|
+
.p-settings .s-ov-card > .note { margin: 0; }
|
|
4237
|
+
.p-settings .s-ov-card > footer { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px 16px; padding-top: 6px; border-top: 1px solid var(--border); }
|
|
4238
|
+
.p-settings .s-ov-list { margin: 0; }
|
|
4239
|
+
.p-settings .s-ov-facts { margin: 0; display: grid; gap: 8px; }
|
|
4240
|
+
.p-settings .s-ov-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
|
|
4241
|
+
.p-settings .s-ov-row dd { flex: 0 1 auto; }
|
|
4242
|
+
.p-settings .s-ov-row > .s-ov-hint { flex: 1 0 100%; margin-top: 0; }
|
|
4243
|
+
.p-settings .s-ov-row dt { color: var(--text-2); font-size: var(--fs-sm); min-width: 0; }
|
|
4244
|
+
.p-settings .s-ov-hint { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.4; }
|
|
4245
|
+
.p-settings .s-ov-why { display: block; margin-top: 2px; color: var(--text-2); font-size: var(--fs-xs); }
|
|
4246
|
+
.p-settings .s-ov-legend { color: var(--text-3); font-size: var(--fs-xs); }
|
|
4247
|
+
.p-settings .s-ov-row dd { margin: 0; text-align: right; font-size: var(--fs-sm); overflow-wrap: anywhere; }
|
|
4248
|
+
.p-settings .s-ov-muted { color: var(--text-3); }
|
|
4249
|
+
.p-settings .tag.tag-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
|
|
4250
|
+
.p-settings .s-ov-actions { display: flex; justify-content: flex-end; }
|
|
4251
|
+
.p-settings .s-ov-link > svg, .p-settings .s-ov-tile > svg:last-child { transform: rotate(-90deg); }
|
|
4252
|
+
.p-settings .s-ov-tile > svg:last-child { color: var(--accent); flex: none; }
|
|
4253
|
+
.p-settings .s-ov-link { display: inline-flex; align-items: center; justify-content: center; gap: 2px; min-height: var(--tap, 32px); min-width: var(--tap, 32px); padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: var(--fs-sm); cursor: pointer; }
|
|
4254
|
+
.p-settings .s-ov-other h3 { margin: 0 0 2px; }
|
|
4255
|
+
.p-settings .s-ov-other > .note { margin: 0 0 10px; }
|
|
4256
|
+
.p-settings .s-ov-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); }
|
|
4257
|
+
.p-settings .s-ov-tile { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; text-align: left; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
|
|
4258
|
+
.p-settings .s-ov-tile > span { flex: 1; display: grid; gap: 2px; min-width: 0; }
|
|
4259
|
+
.p-settings .s-ov-tile small { color: var(--text-3); font-size: var(--fs-xs); }
|
|
4260
|
+
.p-settings .s-ov-tile small.s-ov-state { color: var(--text-2); }
|
|
4261
|
+
.p-settings .s-ov-tile:hover { border-color: var(--accent); }
|
|
4262
|
+
.p-settings .s-ov-tile > svg { margin-top: 2px; }
|
|
4263
|
+
@media (max-width: 899px), (pointer: coarse) { .p-settings .s-ov-dev .btn, .p-settings .s-ov-actions .btn { min-height: var(--tap); min-width: var(--tap); } }
|
|
4264
|
+
/* S-120: a sign-out this session may not do reads as unavailable, not as a faded red: the shared muted text on the shared
|
|
4265
|
+
inset surface at full opacity (its reason is the line under the device). */
|
|
4266
|
+
.p-settings .s-ov-dev .btn:disabled { opacity: 1; color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
|
|
@@ -122,13 +122,16 @@
|
|
|
122
122
|
var MAX_TABLE_COLUMNS = 20;
|
|
123
123
|
|
|
124
124
|
/** Leading whitespace as columns: a tab counts four. */
|
|
125
|
+
var LIST_ITEM = /^([ \t]*)([-*+]|\d{1,9}[.)])\s+(.*)$/;
|
|
125
126
|
function indentOf(ws) { var n = 0; for (var i = 0; i < ws.length; i++) n += ws[i] === "\t" ? 4 : 1; return n; }
|
|
126
127
|
|
|
127
128
|
/**
|
|
128
129
|
* A run of list items as nested lists. An item indented deeper than the one before opens a list inside that
|
|
129
130
|
* item; a shallower one closes lists back to its level; at the same level a change of kind (- vs 1.) starts a
|
|
130
131
|
* new list. Every tag is the renderer's own; item text goes through inline() like any other text.
|
|
132
|
+
* M-2811: a numbered list keeps its first number ("3." after a paragraph reads 3 — `start`, digits only).
|
|
131
133
|
*/
|
|
134
|
+
function openList(it) { return it.tag === "ol" && it.num > 1 ? '<ol start="' + it.num + '">' : "<" + it.tag + ">"; }
|
|
132
135
|
function renderList(items, store) {
|
|
133
136
|
var html = "";
|
|
134
137
|
var stack = []; // { indent, tag }
|
|
@@ -137,10 +140,10 @@
|
|
|
137
140
|
while (stack.length && it.indent < stack[stack.length - 1].indent) html += "</li></" + stack.pop().tag + ">";
|
|
138
141
|
var top = stack[stack.length - 1];
|
|
139
142
|
if (!top || (it.indent > top.indent && stack.length < MAX_LIST_DEPTH)) {
|
|
140
|
-
html +=
|
|
143
|
+
html += openList(it);
|
|
141
144
|
stack.push({ indent: it.indent, tag: it.tag });
|
|
142
145
|
} else if (top.tag !== it.tag) {
|
|
143
|
-
html += "</li></" + top.tag + "
|
|
146
|
+
html += "</li></" + top.tag + ">" + openList(it);
|
|
144
147
|
top.tag = it.tag;
|
|
145
148
|
} else {
|
|
146
149
|
html += "</li>";
|
|
@@ -211,7 +214,16 @@
|
|
|
211
214
|
for (var i = 0; i < lines.length; i++) {
|
|
212
215
|
var line = lines[i];
|
|
213
216
|
var m;
|
|
214
|
-
if (/^\s*$/.test(line)) {
|
|
217
|
+
if (/^\s*$/.test(line)) {
|
|
218
|
+
// M-2811: a blank line between list items (a "loose" list: "1. a\n\n2. b") keeps one list — its numbering runs
|
|
219
|
+
// on instead of starting at 1 again for every item.
|
|
220
|
+
if (list.length) {
|
|
221
|
+
var k = i + 1;
|
|
222
|
+
while (k < lines.length && /^\s*$/.test(lines[k])) k++;
|
|
223
|
+
if (k < lines.length && LIST_ITEM.test(lines[k])) { i = k - 1; continue; }
|
|
224
|
+
}
|
|
225
|
+
flushAll(); continue;
|
|
226
|
+
}
|
|
215
227
|
// A table: a header row with a pipe, then a separator row with the same number of columns.
|
|
216
228
|
if (line.indexOf("|") !== -1 && i + 1 < lines.length) {
|
|
217
229
|
var aligns = tableAligns(lines[i + 1]);
|
|
@@ -229,9 +241,9 @@
|
|
|
229
241
|
if ((m = /^(#{1,6})\s+(.*)$/.exec(line))) { flushAll(); var n = Math.min(m[1].length + 2, 6); out.push("<h" + n + ">" + inline(m[2], store) + "</h" + n + ">"); continue; }
|
|
230
242
|
if (/^\s*(?:-{3,}|\*{3,}|_{3,})\s*$/.test(line)) { flushAll(); out.push("<hr>"); continue; }
|
|
231
243
|
if ((m = /^>\s?(.*)$/.exec(line))) { flushPara(); flushList(); quote.push(m[1]); continue; }
|
|
232
|
-
if ((m =
|
|
244
|
+
if ((m = LIST_ITEM.exec(line))) {
|
|
233
245
|
flushPara(); flushQuote();
|
|
234
|
-
list.push({ indent: indentOf(m[1]), tag: /\d/.test(m[2]) ? "ol" : "ul", text: m[3] });
|
|
246
|
+
list.push({ indent: indentOf(m[1]), tag: /\d/.test(m[2]) ? "ol" : "ul", num: /\d/.test(m[2]) ? parseInt(m[2], 10) : 0, text: m[3] });
|
|
235
247
|
continue;
|
|
236
248
|
}
|
|
237
249
|
flushList(); flushQuote();
|
|
@@ -8,7 +8,7 @@ import { register, t } from "./app-i18n.js";
|
|
|
8
8
|
|
|
9
9
|
register("webauth", {
|
|
10
10
|
en: { role: "Role", roleOwner: "Owner ✓", roleAdminUnverified: "Admin · not verified", roleGuest: "Guest", roleRead: "Read-only" },
|
|
11
|
-
"zh-TW": { role: "角色", roleOwner: "擁有者 ✓", roleAdminUnverified: "
|
|
11
|
+
"zh-TW": { role: "角色", roleOwner: "擁有者 ✓", roleAdminUnverified: "管理員 · 未驗證", roleGuest: "訪客", roleRead: "唯讀" },
|
|
12
12
|
});
|
|
13
13
|
register("app", {
|
|
14
14
|
en: { manageDevices: "Manage devices" },
|