@songsid/agend 2.3.5-alpha.11 → 2.3.5-alpha.13
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/THIRD_PARTY_NOTICES.md +4 -0
- 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/agent-workspace.d.ts +1 -2
- package/dist/agent-workspace.js +8 -29
- package/dist/agent-workspace.js.map +1 -1
- package/dist/auth-api.js +15 -29
- 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/codex.d.ts +7 -14
- package/dist/backend/codex.js +25 -29
- package/dist/backend/codex.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/grok-mcp.d.ts +5 -0
- package/dist/backend/grok-mcp.js +221 -0
- package/dist/backend/grok-mcp.js.map +1 -0
- package/dist/backend/grok.d.ts +0 -10
- package/dist/backend/grok.js +5 -82
- package/dist/backend/grok.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 +18 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/cli.js +18 -0
- package/dist/cli.js.map +1 -1
- package/dist/codex-pane-ownership.d.ts +13 -0
- package/dist/codex-pane-ownership.js +192 -0
- package/dist/codex-pane-ownership.js.map +1 -0
- 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 +25 -0
- package/dist/daemon.js +203 -16
- 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 +40 -9
- package/dist/fleet-manager.js +198 -47
- 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/hub/client.d.ts +1 -1
- package/dist/hub/client.js +11 -0
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -2
- package/dist/hub/compose/member.js +11 -3
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +4 -2
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/pairing-api.d.ts +2 -2
- package/dist/hub/member/pairing-api.js +2 -2
- package/dist/hub/member/pairing-api.js.map +1 -1
- package/dist/hub/server.js +8 -0
- package/dist/hub/server.js.map +1 -1
- package/dist/hub-pairing-summary.d.ts +3 -1
- package/dist/hub-pairing-summary.js +6 -3
- package/dist/hub-pairing-summary.js.map +1 -1
- package/dist/instance-lifecycle.js +29 -1
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +13 -9
- package/dist/locale.js.map +1 -1
- 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/runtime-client-store.js +5 -0
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-pane-private.d.ts +2 -0
- package/dist/runtime-pane-private.js +25 -0
- package/dist/runtime-pane-private.js.map +1 -1
- package/dist/runtime-pane-private.ps1 +74 -7
- package/dist/selection-card.d.ts +4 -3
- package/dist/selection-card.js +2 -1
- package/dist/selection-card.js.map +1 -1
- package/dist/settings-api.js +5 -17
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.d.ts +2 -0
- package/dist/settings-change.js +74 -31
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +23 -0
- package/dist/settings-confirmation.js +13 -2
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +4 -0
- package/dist/settings-effect.js +14 -14
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +3 -1
- package/dist/settings-http-confirmation.js +12 -7
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-summary.d.ts +24 -0
- package/dist/settings-summary.js +42 -0
- package/dist/settings-summary.js.map +1 -0
- 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/transcript-delta-reader.d.ts +9 -1
- package/dist/transcript-delta-reader.js +37 -8
- package/dist/transcript-delta-reader.js.map +1 -1
- package/dist/ui/accounts-view.js +9 -7
- package/dist/ui/agent-details-settings.js +253 -0
- package/dist/ui/agent-instructions-field.js +69 -0
- package/dist/ui/agent-page-strings.js +148 -0
- package/dist/ui/chat-quote.js +12 -17
- package/dist/ui/hub-client.js +1 -1
- package/dist/ui/hub-company-join-strings.js +1 -1
- package/dist/ui/hub-company-join.js +7 -0
- package/dist/ui/hub-strings.js +10 -6
- package/dist/ui/native-instance-settings.js +47 -14
- package/dist/ui/panel-chat.js +2 -1
- package/dist/ui/panel-details.js +38 -14
- package/dist/ui/panel-fleet.js +9 -3
- package/dist/ui/panel-settings.js +17 -8
- package/dist/ui/settings-access-overview.js +188 -0
- package/dist/ui/settings-access-strings.js +1 -1
- package/dist/ui/settings-confirm.js +5 -5
- package/dist/ui/settings-devices.js +5 -5
- package/dist/ui/settings-dialogs.js +208 -100
- package/dist/ui/settings-hub-company-join.js +69 -14
- package/dist/ui/settings-hub.js +13 -5
- package/dist/ui/settings-layout.js +1 -1
- package/dist/ui/settings-model.js +15 -0
- package/dist/ui/settings-strings.js +8 -8
- package/dist/ui/shared/access-overview.css +48 -0
- package/dist/ui/shared/app-i18n.js +2 -2
- package/dist/ui/shared/app-shell.js +145 -4
- package/dist/ui/shared/app-store.js +2 -0
- package/dist/ui/shared/app.css +69 -7
- package/dist/ui/shared/chat-render.js +17 -5
- package/dist/ui/shared/device-roles.js +1 -1
- package/dist/ui/shared/instance-nav.js +5 -1
- package/dist/ui/shared/signin.js +130 -43
- package/dist/ui/shared/usage-dialog.js +27 -15
- package/dist/ui/shared/view-strings.js +2 -0
- package/dist/ui/shared/web-authorize.js +2 -2
- package/dist/ui/signin.html +19 -8
- package/dist/update-dispatch.d.ts +50 -0
- package/dist/update-dispatch.js +58 -2
- package/dist/update-dispatch.js.map +1 -1
- 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/dist/web-session.d.ts +4 -2
- package/dist/web-session.js +5 -2
- package/dist/web-session.js.map +1 -1
- package/dist/workspace-file-policy.d.ts +2 -0
- package/dist/workspace-file-policy.js +31 -0
- package/dist/workspace-file-policy.js.map +1 -0
- package/dist/workspace-follow.js +2 -1
- package/dist/workspace-follow.js.map +1 -1
- package/package.json +2 -2
- package/templates/runtime-assets/runtime-pane-private.ps1 +74 -7
- package/dist/ui/shared/signin-authenticator.js +0 -60
- package/dist/ui/signin-authenticator.html +0 -60
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
/** Fleet-only company handoff; all fields live in the actual Settings section and use its shared confirmation card. */
|
|
2
2
|
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
3
|
import { register, t } from "/assets/app-i18n.js";
|
|
4
|
+
import { appStore, useStore } from "/assets/app-store.js";
|
|
4
5
|
import { Skeleton, ErrorState } from "/assets/ui-states.js";
|
|
5
|
-
import { api, confirmedWrite } from "./settings-confirm.js";
|
|
6
|
+
import { api, confirmedWrite, confirmWithCode } from "./settings-confirm.js";
|
|
6
7
|
import { hj, joinError, joinResponseCode } from "./hub-company-join-strings.js";
|
|
7
8
|
// Own words: a new panel must also work with a cached older company-join dictionary.
|
|
8
9
|
register("companyJoinWait", {
|
|
9
10
|
"en": {
|
|
10
|
-
startHint: "
|
|
11
|
+
startHint: "Paste the Hub link first.", nameHint: "Enter a Fleet name to continue.",
|
|
12
|
+
getLink: "On the Hub Administration page, choose Copy colleague connection link and paste it here, or enter the Hub’s https address.",
|
|
13
|
+
connecting: "Opening Hub sign-in…", codeNeeded: "Your authenticator code is required.", target: "Hub: {0}",
|
|
14
|
+
codeLead: "You enabled authenticator codes for remote changes. Enter your own 6-digit code here to continue to Hub sign-in.",
|
|
15
|
+
codeLabel: "Your 6-digit authenticator code", codeGo: "Continue", codeWrong: "That code was not accepted. Try a current code.",
|
|
16
|
+
codeBusy: "Too many attempts. Wait and try again.", codeUnavailable: "This request cannot be verified now. Check the same connection again.",
|
|
17
|
+
codeInOriginal: "Enter your authenticator code here if requested. This tab continues automatically.",
|
|
11
18
|
checking: "Checking this connection’s status. Review any local confirmation before continuing.",
|
|
12
19
|
pending: "Local confirmation is required. Hub sign-in has not started.",
|
|
13
20
|
pendingNext: "Choose Review local confirmation and complete the next step shown on that card. This connection then continues here.",
|
|
@@ -17,7 +24,13 @@ register("companyJoinWait", {
|
|
|
17
24
|
leaveWait: "Returning to Settings does not withdraw a submitted confirmation. Use Withdraw on its confirmation card to cancel it.",
|
|
18
25
|
},
|
|
19
26
|
"zh-TW": {
|
|
20
|
-
startHint: "
|
|
27
|
+
startHint: "請先貼上 Hub 連結。", nameHint: "請填入 Fleet 名稱以繼續。",
|
|
28
|
+
getLink: "請在 Hub 管理頁按「複製同仁連線連結」並貼到這裡,或輸入 Hub 的 https 網址。",
|
|
29
|
+
connecting: "正在開啟 Hub 登入頁面…", codeNeeded: "請輸入你的驗證碼以繼續。", target: "Hub:{0}",
|
|
30
|
+
codeLead: "你已啟用遠端變更的驗證碼保護。請在這裡輸入你自己的 6 位數驗證碼,繼續前往 Hub 登入。",
|
|
31
|
+
codeLabel: "你的 6 位數驗證碼", codeGo: "繼續", codeWrong: "驗證碼未通過,請輸入目前的驗證碼。",
|
|
32
|
+
codeBusy: "嘗試次數過多,請稍候再試。", codeUnavailable: "目前無法驗證這次請求,請再次檢查同一個連接。",
|
|
33
|
+
codeInOriginal: "若你的帳號要求驗證碼,請在這裡輸入。這個分頁會自動繼續。",
|
|
21
34
|
checking: "正在確認這次連接的狀態;請先檢視待完成的本機確認。",
|
|
22
35
|
pending: "需要先完成本機確認,Hub 登入尚未開始。",
|
|
23
36
|
pendingNext: "請按「開啟本機確認」,完成確認卡顯示的下一步,這次連接就會繼續。",
|
|
@@ -27,13 +40,16 @@ register("companyJoinWait", {
|
|
|
27
40
|
leaveWait: "返回設定不會撤回已送出的確認;若要取消,請在該確認卡按「撤回」。",
|
|
28
41
|
},
|
|
29
42
|
});
|
|
30
|
-
const jw = key => t(`companyJoinWait.${key}
|
|
43
|
+
const jw = (key, ...args) => t(`companyJoinWait.${key}`, ...args);
|
|
31
44
|
const root = "/api/hub/member/company-join";
|
|
32
45
|
const LOCAL_WAIT_MS = 5 * 60_000; // matches the Settings confirmation ceiling; never renew on a status read
|
|
33
46
|
export const companyJoinEmbedV1 = true;
|
|
34
47
|
export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded = false } = {}) {
|
|
35
|
-
const notified = useRef(null);
|
|
48
|
+
const notified = useRef(null), submittedTarget = useRef(""), submittedHandoff = useRef(null);
|
|
49
|
+
const { hubJoinChanges = [] } = useStore(appStore);
|
|
36
50
|
const waiting = (() => { try { return new URLSearchParams(location.search).get("joinWait"); } catch { return null; } })();
|
|
51
|
+
const consentWait = (() => { try { return new URLSearchParams(location.search).get("joinConsent") === "1"; } catch { return false; } })();
|
|
52
|
+
const [code, setCode] = useState(""), [codeBusy, setCodeBusy] = useState(false), [codeError, setCodeError] = useState(null);
|
|
37
53
|
const [view, setView] = useState(undefined), [error, setError] = useState(null), [busy, setBusy] = useState(false), [pending, setPending] = useState(null), [identityChanged, setIdentityChanged] = useState(false);
|
|
38
54
|
const [bound, setBound] = useState(false), [timedOut, setTimedOut] = useState(false), [notice, setNotice] = useState(null);
|
|
39
55
|
const waitDeadline = useRef(Date.now() + LOCAL_WAIT_MS), reading = useRef(null);
|
|
@@ -83,12 +99,26 @@ export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded =
|
|
|
83
99
|
const onPending = (id, change) => {
|
|
84
100
|
setTimedOut(false);
|
|
85
101
|
const remaining = Number(change?.remaining_ms);
|
|
86
|
-
setPending({ id, deadline: Date.now() + Math.min(LOCAL_WAIT_MS, Number.isFinite(remaining) ? Math.max(0, remaining) : LOCAL_WAIT_MS) });
|
|
102
|
+
setPending({ id, target: submittedTarget.current, inline: change?.presentation === "hub-join", state: change?.state, totp: change?.totp, deadline: Date.now() + Math.min(LOCAL_WAIT_MS, Number.isFinite(remaining) ? Math.max(0, remaining) : LOCAL_WAIT_MS) });
|
|
87
103
|
};
|
|
104
|
+
// PanelSettings attaches this cookie session’s claims on reload. Only the exact handoff, or a sole
|
|
105
|
+
// active claim when no handoff is selected, can be adopted. No new Start or deadline is created.
|
|
106
|
+
useEffect(() => {
|
|
107
|
+
const handoff = waiting || submittedHandoff.current;
|
|
108
|
+
const matching = hubJoinChanges.filter(v => handoff ? v.hubJoin?.handoffId === handoff : v.id === pending?.id);
|
|
109
|
+
const active = hubJoinChanges.filter(v => v.state === "pending" || v.state === "applying");
|
|
110
|
+
const claim = matching[0] || (!handoff && !pending && active.length === 1 ? active[0] : null);
|
|
111
|
+
if (!claim) return;
|
|
112
|
+
if (claim.state === "applied") { if (claim.outcome?.result?.operation) setView(claim.outcome.result.operation); setPending(null); return; }
|
|
113
|
+
if (claim.state !== "pending" && claim.state !== "applying") { setPending(null); setError(jw("localExpired")); return; }
|
|
114
|
+
setPending(old => ({ id: claim.id, inline: true, state: claim.state, totp: claim.totp,
|
|
115
|
+
target: claim.hubJoin?.target || old?.target || submittedTarget.current,
|
|
116
|
+
deadline: old?.id === claim.id ? old.deadline : Date.now() + Math.min(LOCAL_WAIT_MS, Math.max(0, Number(claim.remaining_ms) || 0)) }));
|
|
117
|
+
}, [hubJoinChanges, pending?.id, waiting]);
|
|
88
118
|
const reviewConfirmation = () => {
|
|
89
119
|
const cards = [...document.querySelectorAll(".pending-card[data-pending]")];
|
|
90
120
|
const card = pending ? cards.find(el => el.getAttribute("data-pending") === pending.id) : document.querySelector(".pending-stack");
|
|
91
|
-
if (!card) { location.assign("/
|
|
121
|
+
if (!card) { location.assign("/settings/hub"); return; }
|
|
92
122
|
card.scrollIntoView?.({ block: "center" });
|
|
93
123
|
const control = pending && card.querySelector("button, input, a");
|
|
94
124
|
if (control) control.focus(); else { card.tabIndex = -1; card.focus(); }
|
|
@@ -96,10 +126,12 @@ export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded =
|
|
|
96
126
|
useEffect(() => { if ((!embedded || bound) && view?.state === "saved" && view.link === "online" && notified.current !== view.operationId) { notified.current = view.operationId; onSaved?.(); } }, [view, onSaved, embedded, bound]);
|
|
97
127
|
const start = async e => {
|
|
98
128
|
e.preventDefault(); if (busy) return;
|
|
99
|
-
const gen = ++token.current; setBusy(true); setError(null); setNotice(null); setPending(null); setIdentityChanged(false);
|
|
100
|
-
const handoffId = crypto.randomUUID();
|
|
129
|
+
const gen = ++token.current; setBusy(true); setError(null); setNotice(null); setPending(null); setIdentityChanged(false); setCode(""); setCodeError(null);
|
|
130
|
+
const handoffId = crypto.randomUUID(); submittedHandoff.current = handoffId;
|
|
101
131
|
// Open the Fleet-owned waiting page during the user gesture, with no opener or cross-origin messaging.
|
|
102
|
-
|
|
132
|
+
let target = ""; try { target = new URL(form.address).origin; } catch {}
|
|
133
|
+
submittedTarget.current = target;
|
|
134
|
+
globalThis.open("/settings/hub?joinWait=" + encodeURIComponent(handoffId) + "&joinConsent=1#target=" + encodeURIComponent(target), "_blank", "noopener");
|
|
103
135
|
try {
|
|
104
136
|
const result = await confirmedWrite(root + "/start", { body: { ...form, handoffId }, label: hj("title"), onPending: (id, change) => { if (live.current && gen === token.current) onPending(id, change); } });
|
|
105
137
|
if (!live.current || gen !== token.current) return;
|
|
@@ -131,8 +163,20 @@ export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded =
|
|
|
131
163
|
} catch { if (live.current && gen === token.current) setError(hj("unknown")); }
|
|
132
164
|
finally { if (live.current && gen === token.current) setBusy(false); }
|
|
133
165
|
};
|
|
166
|
+
const submitCode = async e => {
|
|
167
|
+
e.preventDefault(); if (codeBusy || !pending?.inline || pending.totp !== "ready" || !/^\d{6}$/.test(code)) return;
|
|
168
|
+
const gen = token.current, id = pending.id; setCodeBusy(true); setCodeError(null);
|
|
169
|
+
try { const r = await confirmWithCode(id, code);
|
|
170
|
+
if (!live.current || gen !== token.current || pending.id !== id) return;
|
|
171
|
+
setCode(""); if (r.ok) setPending(p => p?.id === id ? { ...p, state: "applying" } : p);
|
|
172
|
+
else setCodeError(jw(r.error === "wrong" ? "codeWrong" : r.error === "paused" ? "codeBusy" : "codeUnavailable"));
|
|
173
|
+
} catch { if (live.current && gen === token.current) setCodeError(jw("codeUnavailable")); }
|
|
174
|
+
finally { if (live.current && gen === token.current) setCodeBusy(false); }
|
|
175
|
+
};
|
|
176
|
+
const target = (() => { try { return pending?.target || (view && (!waiting || view.handoffId === waiting) ? view.hubOrigin : "") || (waiting ? new URLSearchParams(location.hash.slice(1)).get("target") || "" : new URL(form.address).origin); } catch { return ""; } })();
|
|
177
|
+
const inlineWait = consentWait || pending?.inline;
|
|
134
178
|
const retired = embedded && !bound && view?.state === "saved" && view.outcomeKnown;
|
|
135
|
-
const canStart = !waiting && (retired || view === null || view && ["ended", "cancelled"].includes(view.state) && !view.issued && view.outcomeKnown);
|
|
179
|
+
const canStart = !pending?.inline && !waiting && (retired || view === null || view && ["ended", "cancelled"].includes(view.state) && !view.issued && view.outcomeKnown);
|
|
136
180
|
// The existing connection card owns ready status, sharing and disconnect. Do not duplicate it after handoff.
|
|
137
181
|
if (!waiting && bound && view === null || !retired && view?.state === "saved" && (memberEnabled || view.link === "online") && onSaved) return null;
|
|
138
182
|
const Frame = embedded ? "div" : "section";
|
|
@@ -140,7 +184,18 @@ export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded =
|
|
|
140
184
|
${view === undefined && !waiting && !timedOut && !error ? html`<${Skeleton} variant="form" lines=${4} label=${hj("loading")} />` : null}
|
|
141
185
|
${error ? html`<${ErrorState} message=${error} onRetry=${read} />` : null}
|
|
142
186
|
${notice ? html`<p role="status" class="note">${notice}</p>` : null}
|
|
143
|
-
${pending || unmatched ? html`<div role="status" class="company-local-wait">
|
|
187
|
+
${(pending || unmatched) && inlineWait ? html`<div role="status" class="company-local-wait">
|
|
188
|
+
<p class="note">${jw(timedOut ? "localExpired" : pending?.state === "pending" ? pending.totp === "ready" ? "codeNeeded" : "codeUnavailable" : "connecting")}</p>
|
|
189
|
+
${target ? html`<p class="note">${jw("target", target)}</p>` : null}
|
|
190
|
+
${pending?.state === "pending" && pending.totp === "ready" ? html`<form class="form hub-join-code" onSubmit=${submitCode}>
|
|
191
|
+
<p class="note">${jw("codeLead")}</p><label class="field"><span>${jw("codeLabel")}</span><input value=${code} inputmode="numeric" autocomplete="one-time-code" maxlength="6" disabled=${codeBusy} onInput=${e => setCode(e.target.value)} /></label>
|
|
192
|
+
<div class="field-row"><button type="submit" class="btn btn-primary" disabled=${codeBusy || !/^\d{6}$/.test(code)}>${jw("codeGo")}</button></div>
|
|
193
|
+
${codeError ? html`<p class="note" role="alert">${codeError}</p>` : null}
|
|
194
|
+
</form>` : pending?.state === "pending" ? html`<p class="note">${jw("codeUnavailable")}</p>` : null}
|
|
195
|
+
${waiting ? html`<p class="note">${jw("codeInOriginal")}</p>` : null}
|
|
196
|
+
${timedOut ? html`<button type="button" class="btn" onClick=${read}>${hj("retry")}</button>` : null}
|
|
197
|
+
</div>` : null}
|
|
198
|
+
${(pending || unmatched) && !inlineWait ? html`<div role="status" class="company-local-wait">
|
|
144
199
|
<p class="note">${jw(timedOut ? "localExpired" : !pending && (view === undefined || error) ? "checking" : "pending")}</p>
|
|
145
200
|
<p class="note">${jw("pendingNext")}</p>
|
|
146
201
|
<div class="field-row"><button type="button" class="btn btn-sm btn-primary" onClick=${reviewConfirmation}>${jw("reviewConfirmation")}</button>
|
|
@@ -149,9 +204,9 @@ export function CompanyJoinSettings({ onSaved, memberEnabled = false, embedded =
|
|
|
149
204
|
${waiting ? html`<p class="note">${jw("leaveWait")}</p>` : null}
|
|
150
205
|
</div>` : null}
|
|
151
206
|
${canStart ? html`<form class="form" onSubmit=${start}>
|
|
152
|
-
<label class="field" for="hubCompanyAddress"><span>${hj("address")}</span><input id="hubCompanyAddress" type="text" value=${form.address} autocomplete="off" spellcheck=${false} onInput=${e => setForm(f => ({ ...f, address: e.target.value }))} /><small class="note">${
|
|
207
|
+
<label class="field" for="hubCompanyAddress"><span>${hj("address")}</span><input id="hubCompanyAddress" type="text" value=${form.address} autocomplete="off" spellcheck=${false} onInput=${e => setForm(f => ({ ...f, address: e.target.value }))} /><small class="note">${jw("getLink")}</small></label>
|
|
153
208
|
<label class="field" for="hubCompanyFleetName"><span>${hj("fleetName")}</span><input id="hubCompanyFleetName" value=${form.label} maxlength="120" onInput=${e => setForm(f => ({ ...f, label: e.target.value }))} /></label>
|
|
154
|
-
<p class="note">${hj("firstUse")}</p>${!form.address.trim() || !form.label.trim() ? html`<p class="note" id="hubCompanyStartHint">${jw("startHint")}</p>` : null}<div class="field-row"><button class="btn btn-primary" type="submit" aria-describedby=${!form.address.trim() || !form.label.trim() ? "hubCompanyStartHint" : undefined} disabled=${busy || !form.address.trim() || !form.label.trim()}>${hj("start")}</button></div>
|
|
209
|
+
<p class="note">${hj("firstUse")}</p>${!form.address.trim() || !form.label.trim() ? html`<p class="note" id="hubCompanyStartHint">${jw(!form.address.trim() ? "startHint" : "nameHint")}</p>` : null}<div class="field-row"><button class="btn btn-primary" type="submit" aria-describedby=${!form.address.trim() || !form.label.trim() ? "hubCompanyStartHint" : undefined} disabled=${busy || !form.address.trim() || !form.label.trim()}>${hj("start")}</button></div>
|
|
155
210
|
${identityChanged ? html`<p class="note">${hj("repairLead")}</p><button class="btn btn-sm" type="button" disabled=${busy || !form.address.trim()} onClick=${repair}>${hj("repair")}</button>` : null}
|
|
156
211
|
</form>` : null}
|
|
157
212
|
${view && !retired && (!waiting || view.handoffId === waiting) ? html`<div role="status"><strong>${hj(view.state === "saved" ? view.link === "online" ? "saved" : "joining" : view.state === "awaiting-sign-in" ? "awaiting" : view.state === "cancelled" ? "cancelled" : view.state === "held" || view.state === "ended" ? "held" : "joining")}</strong>
|
package/dist/ui/settings-hub.js
CHANGED
|
@@ -17,7 +17,7 @@ import { hq } from "./hub-quick-strings.js";
|
|
|
17
17
|
import { hp } from "./hub-pairing-progress-strings.js";
|
|
18
18
|
|
|
19
19
|
const CONNECT_ERRORS = { address: "errAddress", code: "errCode", busy: "errBusy", unreachable: "errUnreachable", refused: "errRefused" };
|
|
20
|
-
const HOLDS = new Set(["unknown_outcome", "expired", "unsaved", "refused", "revoked", "disconnected"]);
|
|
20
|
+
const HOLDS = new Set(["unknown_outcome", "expired", "unsaved", "refused", "revoked", "disconnected", "rejected"]);
|
|
21
21
|
const PUBLISH_ERRORS = { conflict: "errConflict", unsaved: "errUnsaved", not_paired: "errNotPaired", not_enforceable: "agentNotShareable",
|
|
22
22
|
unknown_view: "agentNotShareable", limit: "errLimit", unavailable: "notAvailable" };
|
|
23
23
|
// The switcher may have cached hub-strings before this action existed. Its original Allow word is still available.
|
|
@@ -29,7 +29,8 @@ function waitingForPairing(msg, p) {
|
|
|
29
29
|
if (!pending) return true;
|
|
30
30
|
if (pending.action === "connect") return p?.state === "unpaired";
|
|
31
31
|
if (pending.action === "confirm") return p?.state === "pending" && p.localConfirmed === false && p.fingerprint?.digest === pending.fingerprint;
|
|
32
|
-
return pending.action === "disconnect" && p?.state === "paired"
|
|
32
|
+
return pending.action === "disconnect" && (p?.state === "paired" || p?.state === "held" && p.hold !== "disconnected")
|
|
33
|
+
&& p.binding === pending.binding && (p.hub?.hubId || p.hubId) === pending.hubId;
|
|
33
34
|
}
|
|
34
35
|
|
|
35
36
|
/** A fingerprint: its first 128 bits in groups people compare, the whole digest on request. */
|
|
@@ -55,7 +56,7 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {} } = {}
|
|
|
55
56
|
const live = useRef(true);
|
|
56
57
|
const generation = useRef(0), activePending = useRef(null);
|
|
57
58
|
const pendingMessage = (action, shown, result, token) => {
|
|
58
|
-
const pending = { action, fingerprint: shown?.fingerprint?.digest, binding: shown?.binding, hubId: shown?.hub?.hubId };
|
|
59
|
+
const pending = { action, fingerprint: shown?.fingerprint?.digest, binding: shown?.binding, hubId: shown?.hub?.hubId || shown?.hubId };
|
|
59
60
|
activePending.current = pending;
|
|
60
61
|
setMsg({ error: false, text: hw("waitingConfirm"), pending });
|
|
61
62
|
if (!result.settled?.then) return; // An older client still clears its hint when the projection advances.
|
|
@@ -165,6 +166,11 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {} } = {}
|
|
|
165
166
|
<button type="button" class="btn btn-danger" disabled=${busy} onClick=${() => disconnect(name)}>${hw("disconnect")}</button>
|
|
166
167
|
</div>
|
|
167
168
|
</div>`;
|
|
169
|
+
// An older Hub may close without an authentication status. Recovery is offered conditionally, never inferred.
|
|
170
|
+
if (p.link === "offline") body = html`${body}<div class="hub-reconnect-help" role="note">
|
|
171
|
+
<p class="note">${hw("offlineRecovery") === "hub.offlineRecovery" ? hw("offline") : hw("offlineRecovery")}</p>
|
|
172
|
+
<button type="button" class="btn hub-repair" disabled=${busy} onClick=${() => disconnect(name)}>${hw("repair")}</button>
|
|
173
|
+
</div>`;
|
|
168
174
|
} else if (p.state === "key_changed") {
|
|
169
175
|
const name = p.hub.name || p.hub.memberOrigin;
|
|
170
176
|
body = html`<div class="hub-state hub-key-changed" role="alert">
|
|
@@ -183,9 +189,11 @@ export function HubConnectCard({ embedded = false, onPairing, labels = {} } = {}
|
|
|
183
189
|
} else if (p.state === "held") {
|
|
184
190
|
body = html`<div class="hub-state hub-held" role="alert">
|
|
185
191
|
<h4><${Icon} name="pause" size=${16} /> ${hw("heldTitle")}</h4>
|
|
186
|
-
<p>${hw(HOLDS.has(p.hold) ? `hold_${p.hold}` : "hold_other")}</p>
|
|
192
|
+
<p>${p.hold === "rejected" && hw("hold_rejected") === "hub.hold_rejected" ? hw("hold_refused") : hw(HOLDS.has(p.hold) ? `hold_${p.hold}` : "hold_other")}</p>
|
|
187
193
|
${p.memberOrigin ? html`<p class="hub-origin"><code>${p.memberOrigin}</code></p>` : null}
|
|
188
|
-
<div class="field-row"
|
|
194
|
+
<div class="field-row">${p.binding && ["rejected", "revoked"].includes(p.hold)
|
|
195
|
+
? html`<button type="button" class="btn hub-repair" disabled=${busy} onClick=${() => disconnect(p.memberOrigin)}>${hw("repair")}</button>`
|
|
196
|
+
: html`<button type="button" class="btn" disabled=${busy} onClick=${cancel}>${hw(p.hold === "disconnected" ? "startOver" : "holdClear")}</button>`}</div>
|
|
189
197
|
</div>`;
|
|
190
198
|
}
|
|
191
199
|
const Frame = embedded ? "div" : "section";
|
|
@@ -229,7 +229,7 @@ register("settingsLayout", {
|
|
|
229
229
|
"revEditorContext": "Fleet 設定檔・個別設定可使用對應表單調整",
|
|
230
230
|
"revUpdateCredential": "更新連接器憑證",
|
|
231
231
|
"revSetCredential": "設定連接器憑證",
|
|
232
|
-
"revAuthorityBrief": "僅限已登入的 Fleet
|
|
232
|
+
"revAuthorityBrief": "僅限已登入的 Fleet 管理員,並須在 Discord 或 Telegram 確認本人帳號授權;訪客不適用。發布、破壞性操作、花費、密鑰與轉交授權都需要它。",
|
|
233
233
|
"revAuthorityDetails": "授權規則說明",
|
|
234
234
|
"revAuthorityEnabled": "允許網頁授權",
|
|
235
235
|
"revAuthorityEnabledHint": "關閉會立即使現有授權失效;重新開啟不會恢復。",
|
|
@@ -181,6 +181,10 @@ export function codexSpeedOf(inst) {
|
|
|
181
181
|
const v = inst && inst.backend_options && inst.backend_options.codex && inst.backend_options.codex.speed;
|
|
182
182
|
return v === "fast" || v === "standard" ? v : "";
|
|
183
183
|
}
|
|
184
|
+
/** what is in effect for the three keys the page adds (types.ts: unset = 1 / the default's, else true / the default's, else false). */
|
|
185
|
+
export const boardCardsOf = (inst) => (Number.isInteger(inst && inst.board_cards_at_once) && inst.board_cards_at_once >= 1 ? inst.board_cards_at_once : 1);
|
|
186
|
+
export const resumeWorkOf = (inst, defaults) => (typeof (inst && inst.resume_interrupted_work) === "boolean" ? inst.resume_interrupted_work : (defaults && typeof defaults.resume_interrupted_work === "boolean" ? defaults.resume_interrupted_work : true));
|
|
187
|
+
export const proxyReplyOf = (inst, defaults) => (typeof (inst && inst.mcp_proxy_reply) === "boolean" ? inst.mcp_proxy_reply : (defaults && typeof defaults.mcp_proxy_reply === "boolean" ? defaults.mcp_proxy_reply : false));
|
|
184
188
|
export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmojisBaseline) {
|
|
185
189
|
const hang = inst.hang_detector || {};
|
|
186
190
|
const next = {
|
|
@@ -203,6 +207,11 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
203
207
|
dashboard: dashboardPatchValue(form.dashboard),
|
|
204
208
|
office_access: separateChoice(form.dashboard.office),
|
|
205
209
|
office_pack_access: separateChoice(form.dashboard.office_packs),
|
|
210
|
+
// the three keys the page never showed. Written only when changed from what is in effect (the server
|
|
211
|
+
// accepts a value, not null, so a field left alone is never put into fleet.yaml).
|
|
212
|
+
board_cards_at_once: form.board_cards_at_once === undefined ? boardCardsOf(inst) : Number(form.board_cards_at_once),
|
|
213
|
+
resume_interrupted_work: form.resume_interrupted_work === undefined ? resumeWorkOf(inst, defaults) : form.resume_interrupted_work,
|
|
214
|
+
mcp_proxy_reply: form.mcp_proxy_reply === undefined ? proxyReplyOf(inst, defaults) : form.mcp_proxy_reply,
|
|
206
215
|
};
|
|
207
216
|
return Object.assign(changedFields(next, {
|
|
208
217
|
backend: inst.backend || defaults.backend || "claude-code",
|
|
@@ -228,6 +237,9 @@ export function agentPatch(form, inst, defaults, visibilityBaseline, statusEmoji
|
|
|
228
237
|
dashboard: dashboardPatchValue(dashboardForm(inst)),
|
|
229
238
|
office_access: separateChoice(dashboardForm(inst).office),
|
|
230
239
|
office_pack_access: separateChoice(dashboardForm(inst).office_packs),
|
|
240
|
+
board_cards_at_once: boardCardsOf(inst),
|
|
241
|
+
resume_interrupted_work: resumeWorkOf(inst, defaults),
|
|
242
|
+
mcp_proxy_reply: proxyReplyOf(inst, defaults),
|
|
231
243
|
}), codexSpeedPatch(form, inst));
|
|
232
244
|
}
|
|
233
245
|
/**
|
|
@@ -268,6 +280,9 @@ export function agentForm(inst, defaults, name = "") {
|
|
|
268
280
|
status_emojis: inst.status_emojis || null,
|
|
269
281
|
dashboard: dashboardForm(inst),
|
|
270
282
|
codex_speed: codexSpeedOf(inst),
|
|
283
|
+
board_cards_at_once: String(boardCardsOf(inst)),
|
|
284
|
+
resume_interrupted_work: resumeWorkOf(inst, defaults),
|
|
285
|
+
mcp_proxy_reply: proxyReplyOf(inst, defaults),
|
|
271
286
|
inherit: {
|
|
272
287
|
auto_pause_after: inherit("auto_pause_after"), hang: !hasOwn(hang, "timeout_minutes"), agent_mode: inherit("agent_mode"),
|
|
273
288
|
tool_set: inherit("tool_set"), tool_progress: inherit("tool_progress"), cross_instance_visibility: inherit("cross_instance_visibility"),
|
|
@@ -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: "等待確認的變更太多;請先確認或撤回一些",
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* S-120: Settings → Access & security → Overview — its own stylesheet (M-2855), linked by settings-access-overview.js:
|
|
2
|
+
a tab opened before this page existed holds an older app.css with none of these rules. */
|
|
3
|
+
.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; }
|
|
4
|
+
.p-settings .s-ov-dev { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
|
|
5
|
+
.p-settings .s-ov-dev + .s-ov-dev { border-top: 1px solid var(--border); }
|
|
6
|
+
.p-settings .s-ov-dev.current { background: var(--surface-2); }
|
|
7
|
+
.p-settings .s-ov-dev-main { display: grid; gap: 2px; min-width: 0; }
|
|
8
|
+
.p-settings .s-ov-dev-name { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
|
|
9
|
+
.p-settings .s-ov-dev-meta { font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
|
|
10
|
+
.p-settings .s-ov-dev .btn { flex: none; }
|
|
11
|
+
.p-settings .s-ov { display: flex; flex-direction: column; gap: var(--s-5); }
|
|
12
|
+
.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 */
|
|
13
|
+
.p-settings .s-ov-devices { grid-row: span 2; }
|
|
14
|
+
@media (max-width: 900px) { .p-settings .s-ov-grid { grid-template-columns: minmax(0, 1fr); } .p-settings .s-ov-devices { grid-row: auto; } }
|
|
15
|
+
.p-settings .s-ov-card { margin: 0; display: flex; flex-direction: column; gap: 10px; }
|
|
16
|
+
.p-settings .s-ov-title { display: flex; align-items: center; gap: 8px; margin: 0; }
|
|
17
|
+
.p-settings .s-ov-title > svg { color: var(--accent); flex: none; }
|
|
18
|
+
.p-settings .s-ov-card > .note { margin: 0; }
|
|
19
|
+
.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); }
|
|
20
|
+
.p-settings .s-ov-list { margin: 0; }
|
|
21
|
+
.p-settings .s-ov-facts { margin: 0; display: grid; gap: 8px; }
|
|
22
|
+
.p-settings .s-ov-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
|
|
23
|
+
.p-settings .s-ov-row dd { flex: 0 1 auto; }
|
|
24
|
+
.p-settings .s-ov-row > .s-ov-hint { flex: 1 0 100%; margin-top: 0; }
|
|
25
|
+
.p-settings .s-ov-row dt { color: var(--text-2); font-size: var(--fs-sm); min-width: 0; }
|
|
26
|
+
.p-settings .s-ov-hint { display: block; margin-top: 2px; color: var(--text-3); font-size: var(--fs-xs); line-height: 1.4; }
|
|
27
|
+
.p-settings .s-ov-why { display: block; margin-top: 2px; color: var(--text-2); font-size: var(--fs-xs); }
|
|
28
|
+
.p-settings .s-ov-legend { color: var(--text-3); font-size: var(--fs-xs); }
|
|
29
|
+
.p-settings .s-ov-row dd { margin: 0; text-align: right; font-size: var(--fs-sm); overflow-wrap: anywhere; }
|
|
30
|
+
.p-settings .s-ov-muted { color: var(--text-3); }
|
|
31
|
+
.p-settings .tag.tag-ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
|
|
32
|
+
.p-settings .s-ov-actions { display: flex; justify-content: flex-end; }
|
|
33
|
+
.p-settings .s-ov-link > svg, .p-settings .s-ov-tile > svg:last-child { transform: rotate(-90deg); }
|
|
34
|
+
.p-settings .s-ov-tile > svg:last-child { color: var(--accent); flex: none; }
|
|
35
|
+
.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; }
|
|
36
|
+
.p-settings .s-ov-other h3 { margin: 0 0 2px; }
|
|
37
|
+
.p-settings .s-ov-other > .note { margin: 0 0 10px; }
|
|
38
|
+
.p-settings .s-ov-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-3); }
|
|
39
|
+
.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; }
|
|
40
|
+
.p-settings .s-ov-tile > span { flex: 1; display: grid; gap: 2px; min-width: 0; }
|
|
41
|
+
.p-settings .s-ov-tile small { color: var(--text-3); font-size: var(--fs-xs); }
|
|
42
|
+
.p-settings .s-ov-tile small.s-ov-state { color: var(--text-2); }
|
|
43
|
+
.p-settings .s-ov-tile:hover { border-color: var(--accent); }
|
|
44
|
+
.p-settings .s-ov-tile > svg { margin-top: 2px; }
|
|
45
|
+
@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); } }
|
|
46
|
+
/* 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
|
|
47
|
+
inset surface at full opacity (its reason is the line under the device). */
|
|
48
|
+
.p-settings .s-ov-dev .btn:disabled { opacity: 1; color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
|
|
@@ -76,7 +76,7 @@ register("app", {
|
|
|
76
76
|
names: "Names", namesNickname: "Nickname first", namesInstance: "Real name first",
|
|
77
77
|
theme: "Theme", themeSystem: "System", themeLight: "Light", themeDark: "Dark", language: "Language",
|
|
78
78
|
previews: "Allow HTML previews", tour: "Tour", tourTitle: "Show the web chat tour again",
|
|
79
|
-
needsYou: "needs you", approxNote: "Read from the terminal, so approximate", chat: "Chat", details: "
|
|
79
|
+
needsYou: "needs you", approxNote: "Read from the terminal, so approximate", chat: "Chat", details: "Settings", log: "Log", instanceViews: "Views of {0}",
|
|
80
80
|
textSize: "Text size: {0}", textSize_s: "S", textSize_m: "M", textSize_l: "L", textSize_fit: "Fit", usage: "Usage", usageHide: "Hide usage",
|
|
81
81
|
ownerCssKeep: "Keep this custom CSS?", ownerCssKeepLeft: "Reverts in {0} s", ownerCssKeepYes: "Keep", ownerCssKeepNo: "Revert",
|
|
82
82
|
statusQueued: "queued", statusStarting: "starting", fleetStarting: "Fleet starting {0}/{1}…", statusRunning: "running", statusStopped: "stopped", statusPaused: "paused", statusCrashed: "crashed", statusWorking: "working", statusStuck: "looks stuck", statusIdle: "idle",
|
|
@@ -126,7 +126,7 @@ register("app", {
|
|
|
126
126
|
names: "名稱", namesNickname: "暱稱優先", namesInstance: "實際名稱優先",
|
|
127
127
|
theme: "主題", themeSystem: "跟隨系統", themeLight: "淺色", themeDark: "深色", language: "語言",
|
|
128
128
|
previews: "允許預覽 HTML", tour: "導覽", tourTitle: "再看一次網頁聊天導覽",
|
|
129
|
-
needsYou: "等你回應", approxNote: "從終端畫面判讀,僅供參考", chat: "聊天", details: "
|
|
129
|
+
needsYou: "等你回應", approxNote: "從終端畫面判讀,僅供參考", chat: "聊天", details: "設定", log: "紀錄", instanceViews: "{0} 的檢視",
|
|
130
130
|
textSize: "字級:{0}", textSize_s: "小", textSize_m: "中", textSize_l: "大", textSize_fit: "填滿", usage: "用量", usageHide: "隱藏用量",
|
|
131
131
|
ownerCssKeep: "保留這份自訂 CSS?", ownerCssKeepLeft: "{0} 秒後還原", ownerCssKeepYes: "保留", ownerCssKeepNo: "還原",
|
|
132
132
|
statusQueued: "等待啟動", statusStarting: "啟動中", fleetStarting: "Fleet 啟動中 {0}/{1}…", statusRunning: "執行中", statusStopped: "已停止", statusPaused: "已暫停", statusCrashed: "已當掉", statusWorking: "工作中", statusStuck: "似乎卡住", statusIdle: "閒置",
|
|
@@ -645,11 +645,152 @@ register("pendingHub", {
|
|
|
645
645
|
en: { connect: "Connect this Fleet to Hub {0} using your company account. Agent sharing stays separate." },
|
|
646
646
|
"zh-TW": { connect: "以公司帳號將這個 Fleet 連接到 Hub {0}。分享 Agent 需另外選擇。" },
|
|
647
647
|
});
|
|
648
|
-
|
|
649
|
-
|
|
648
|
+
// Optional presentation only. Own namespace works with a retained app-i18n.js; no new import is required.
|
|
649
|
+
register("pendingSummary", {
|
|
650
|
+
en: {
|
|
651
|
+
"host_cli.install_confirm": "Install {0} on the AgEnD host",
|
|
652
|
+
"host_cli.update": "Update {0} on the AgEnD computer to {1}, the release AgEnD has audited (the registry's update command, run unattended). Only this CLI changes; nothing the page sent is run.",
|
|
653
|
+
"host_cli.update_latest": "Update {0} on the AgEnD computer to the LATEST release (not audited by AgEnD): the registry's update command for this CLI, run unattended; the CLI's own updater cannot choose a release. Only this CLI changes; nothing the page sent is run.",
|
|
654
|
+
"runtime_cli.install": "Install {0} {1} on the paired Windows computer {2}: the version AgEnD pins, checked on that computer (its pinned hashes, the registry's signatures, the publisher's signature). Only this CLI is installed; nothing the page sent is run. That computer's owner's own switch still has to allow it.",
|
|
655
|
+
"runtime_cli.update_latest": "If {0} is already on the paired Windows computer {1}, this updates it to the vendor's LATEST release (not audited by AgEnD): the Runtime downloads the release the vendor's own manifest names and checks its checksum and the publisher's signature on that computer before switching to it.",
|
|
656
|
+
"hub.browserCertificate.replace": "Replace the Hub browser certificate. The member transport identity stays the same.",
|
|
657
|
+
"hub.browserCertificate.fingerprint": "SHA-256 fingerprint: {0}",
|
|
658
|
+
"hub.browserCertificate.expires": "Expires: {0}",
|
|
659
|
+
"hub.browserCertificate.selfSigned": "This certificate is self-signed. Browsers will warn unless you trust it separately.",
|
|
660
|
+
"hub.retention.content": "Hub question and answer content: keep {0} days",
|
|
661
|
+
"hub.retention.events": "Hub event records: keep {0} days",
|
|
662
|
+
"hub.retention.purge": "Shorter periods can permanently remove older records at the next daily cleanup.",
|
|
663
|
+
"hub.run.start": "Start this fleet's Hub. People can sign in to it again and chats with shared agents resume.",
|
|
664
|
+
"hub.run.stop": "Stop this fleet's Hub and pause chats with shared agents. Valid sign-ins can resume when it runs again. Nothing is deleted.",
|
|
665
|
+
"hub.preview.on": "Serve HTML previews on this Hub at port {0}.",
|
|
666
|
+
"hub.preview.off": "Stop serving HTML previews on this Hub.",
|
|
667
|
+
"hub.membership.enable": "Enable this fleet's Hub membership. Pairing and sharing an agent are separate choices.",
|
|
668
|
+
"hub.membership.disable": "Disable this fleet's Hub membership. New Hub work and answer disclosure stop; existing agent conversations remain.",
|
|
669
|
+
"hub.companyJoin.confirm": "Connect this Fleet to Hub {0} using your company account. Agent sharing stays separate.",
|
|
670
|
+
"hub.companyJoin.repair": "Replace the saved identity of Hub {0} using the new company link. This does not connect a Fleet.",
|
|
671
|
+
"general_location.confirm_host": "Run General on this host again? The Windows process must stop first. Its conversation is kept. General resumes this host’s saved conversation, or starts one if this host has none.",
|
|
672
|
+
"general_location.confirm_windows": "Run General on {0}? Its current process must stop first. The chat stays here. The host conversation is kept; Windows uses its own conversation. Pending or uncertain input will not be sent to the other conversation.",
|
|
673
|
+
"general_location.history": "Host and Windows conversations stay separate. Switching does not copy or merge their history.",
|
|
674
|
+
"hub.exposure.summary.share": "Share \"{0}\" with the Hub",
|
|
675
|
+
"hub.exposure.summary.context": "Hub questions go to this agent's own conversation, with its folder and Settings tools",
|
|
676
|
+
"hub.exposure.summary.revision": "Revision: {0}",
|
|
677
|
+
"hub.pairing.summary.connect": "Connect this fleet to the Hub at {0}",
|
|
678
|
+
"hub.pairing.summary.approval": "It asks the Hub's owner and administrator to approve it",
|
|
679
|
+
"hub.pairing.summary.confirm": "Confirm the pairing fingerprint for {0}",
|
|
680
|
+
"hub.pairing.summary.disconnect": "Disconnect this fleet from the Hub at {0} ({1}, pairing {2})",
|
|
681
|
+
"hub.pairing.summary.withdraw": "Every agent shared there is withdrawn; the Hub's administrator revokes the fleet there",
|
|
682
|
+
"settings_confirm.summary.default": "default", "settings_confirm.summary.absent": "absent", "settings_confirm.summary.fingerprint": "fingerprint",
|
|
683
|
+
"settings_confirm.summary.text_chars": "{0} characters", "settings_confirm.summary.text_none": "not set",
|
|
684
|
+
"settings_confirm.summary.in_effect": "{0} (in effect)", "settings_confirm.summary.inherit": " — {0} agent(s) inherit it: {1}", "settings_confirm.summary.more": " +{0} more",
|
|
685
|
+
"settings_confirm.summary.deleted": "deleted", "settings_confirm.summary.add": "add", "settings_confirm.summary.remove": "remove", "settings_confirm.summary.order": "order",
|
|
686
|
+
"settings_confirm.summary.removed": "field removed (inherit/omitted policy)", "settings_confirm.summary.connections": "ordered connections / primary",
|
|
687
|
+
"settings_confirm.summary.connection": "connection", "settings_confirm.summary.confirmed": "confirmed operation",
|
|
688
|
+
"settings_confirm.summary.role.classicAdmin": "Classic admin (C)", "settings_confirm.summary.role.fleetAdmin": "fleet admin (F)",
|
|
689
|
+
"settings_confirm.summary.role.user": "user", "settings_confirm.summary.role.group": "group", "settings_confirm.summary.role.guild": "guild",
|
|
690
|
+
},
|
|
691
|
+
"zh-TW": {
|
|
692
|
+
"host_cli.install_confirm": "在 AgEnD 主機上安裝 {0}",
|
|
693
|
+
"host_cli.update": "在 AgEnD 這台電腦上把 {0} 更新到 {1}(AgEnD 稽核過的版本),使用登錄表裡的更新指令(無人值守執行)。只會更新這個 CLI;頁面送來的內容不會被執行。",
|
|
694
|
+
"host_cli.update_latest": "在 AgEnD 這台電腦上把 {0} 更新到「最新版」(未經 AgEnD 稽核):使用登錄表裡這個 CLI 的更新指令(無人值守執行);這個 CLI 自己的更新器無法指定版本。只會更新這個 CLI;頁面送來的內容不會被執行。",
|
|
695
|
+
"runtime_cli.install": "在已配對的 Windows 電腦 {2} 上安裝 {0} {1}:AgEnD 固定的版本,並在那台電腦上檢查(固定的雜湊、registry 簽章、發行者簽章)。只會安裝這個 CLI;頁面送來的內容不會被執行。仍需要那台電腦主人自己的開關允許。",
|
|
696
|
+
"runtime_cli.update_latest": "如果已配對的 Windows 電腦 {1} 上已經有 {0},這會把它更新到廠商的「最新版」(未經 AgEnD 稽核):Runtime 會下載廠商自己的 manifest 指定的版本,並在那台電腦上檢查它的雜湊與發行者簽章,才會切換過去。",
|
|
697
|
+
"hub.browserCertificate.replace": "更換 Hub 瀏覽器憑證;成員傳輸身分保持不變。",
|
|
698
|
+
"hub.browserCertificate.fingerprint": "SHA-256 指紋:{0}",
|
|
699
|
+
"hub.browserCertificate.expires": "到期時間:{0}",
|
|
700
|
+
"hub.browserCertificate.selfSigned": "這是自簽憑證。除非另外設定信任,否則瀏覽器會顯示警告。",
|
|
701
|
+
"hub.retention.content": "Hub 提問與回答內容:保留 {0} 天",
|
|
702
|
+
"hub.retention.events": "Hub 事件紀錄:保留 {0} 天",
|
|
703
|
+
"hub.retention.purge": "縮短保留天數後,下次每日清理可能永久刪除較早的紀錄。",
|
|
704
|
+
"hub.run.start": "啟動這個 Fleet 的 Hub。大家可以再次登入,與分享的 Agent 的對話會恢復。",
|
|
705
|
+
"hub.run.stop": "停止這個 Fleet 的 Hub,暫停與分享的 Agent 的對話。再次執行後,仍有效的登入狀態可以恢復。不會刪除任何資料。",
|
|
706
|
+
"hub.preview.on": "在這個 Hub 的連接埠 {0} 提供 HTML 預覽。",
|
|
707
|
+
"hub.preview.off": "停止在這個 Hub 提供 HTML 預覽。",
|
|
708
|
+
"hub.membership.enable": "啟用這個 Fleet 的 Hub 成員功能。配對與分享 Agent 需另外選擇。",
|
|
709
|
+
"hub.membership.disable": "停用這個 Fleet 的 Hub 成員功能。停止新的 Hub 工作與回答傳送;既有 Agent 對話會保留。",
|
|
710
|
+
"hub.companyJoin.confirm": "以公司帳號將這個 Fleet 連接到 Hub {0}。分享 Agent 需另外選擇。",
|
|
711
|
+
"hub.companyJoin.repair": "使用新的公司連結,更換 Hub {0} 已儲存的身分。這項操作不會連接 Fleet。",
|
|
712
|
+
"general_location.confirm_host": "要讓 General 回到這台主機執行嗎?必須先停止 Windows 程序,其對話會保留。General 會繼續這台主機儲存的對話;若主機沒有既有對話,才開啟新對話。",
|
|
713
|
+
"general_location.confirm_windows": "要讓 General 在 {0} 執行嗎?必須先停止目前的程序。聊天位置不變。主機上的對話會保留,Windows 使用自己的對話。待處理或結果不明的輸入不會送到另一段對話。",
|
|
714
|
+
"general_location.history": "主機與 Windows 各自保留對話,切換時不會複製或合併對話紀錄。",
|
|
715
|
+
"hub.exposure.summary.share": "將「{0}」分享給 Hub",
|
|
716
|
+
"hub.exposure.summary.context": "Hub 提問會送到這個 Agent 自己的對話,使用其資料夾與設定的工具",
|
|
717
|
+
"hub.exposure.summary.revision": "修訂版本:{0}",
|
|
718
|
+
"hub.pairing.summary.connect": "將這個 Fleet 連接到 {0} 的 Hub",
|
|
719
|
+
"hub.pairing.summary.approval": "需要 Hub 的擁有者與管理員核准",
|
|
720
|
+
"hub.pairing.summary.confirm": "確認 {0} 的配對指紋",
|
|
721
|
+
"hub.pairing.summary.disconnect": "中斷這個 Fleet 與 {0} 的 Hub 連接({1},配對 {2})",
|
|
722
|
+
"hub.pairing.summary.withdraw": "撤下所有分享到該 Hub 的 Agent;由 Hub 管理員在該處撤銷這個 Fleet",
|
|
723
|
+
"settings_confirm.summary.default": "預設", "settings_confirm.summary.absent": "未設定", "settings_confirm.summary.fingerprint": "指紋",
|
|
724
|
+
"settings_confirm.summary.text_chars": "{0} 字", "settings_confirm.summary.text_none": "未設定",
|
|
725
|
+
"settings_confirm.summary.in_effect": "{0}(實際生效)", "settings_confirm.summary.inherit": " — {0} 個 agent 繼承此設定:{1}", "settings_confirm.summary.more": " 等另外 {0} 個",
|
|
726
|
+
"settings_confirm.summary.deleted": "已刪除", "settings_confirm.summary.add": "新增", "settings_confirm.summary.remove": "移除", "settings_confirm.summary.order": "順序",
|
|
727
|
+
"settings_confirm.summary.removed": "已移除欄位(繼承/未指定的政策)", "settings_confirm.summary.connections": "連接順序/主要連接",
|
|
728
|
+
"settings_confirm.summary.connection": "連接", "settings_confirm.summary.confirmed": "需確認的操作",
|
|
729
|
+
"settings_confirm.summary.role.classicAdmin": "Classic 管理員(C)", "settings_confirm.summary.role.fleetAdmin": "Fleet 管理員(F)",
|
|
730
|
+
"settings_confirm.summary.role.user": "使用者", "settings_confirm.summary.role.group": "群組", "settings_confirm.summary.role.guild": "伺服器",
|
|
731
|
+
},
|
|
732
|
+
});
|
|
733
|
+
const pendingSummaryArguments = Object.fromEntries([
|
|
734
|
+
["host_cli.install_confirm", "s"],
|
|
735
|
+
["host_cli.update", "ss"],
|
|
736
|
+
["host_cli.update_latest", "s"],
|
|
737
|
+
["runtime_cli.install", "sss"],
|
|
738
|
+
["runtime_cli.update_latest", "ss"],
|
|
739
|
+
["hub.browserCertificate.replace", ""],
|
|
740
|
+
["hub.browserCertificate.fingerprint", "s"],
|
|
741
|
+
["hub.browserCertificate.expires", "s"],
|
|
742
|
+
["hub.browserCertificate.selfSigned", ""],
|
|
743
|
+
["hub.retention.content", "n"],
|
|
744
|
+
["hub.retention.events", "n"],
|
|
745
|
+
["hub.retention.purge", ""],
|
|
746
|
+
["hub.run.start", ""],
|
|
747
|
+
["hub.run.stop", ""],
|
|
748
|
+
["hub.preview.on", "s"],
|
|
749
|
+
["hub.preview.off", ""],
|
|
750
|
+
["hub.membership.enable", ""],
|
|
751
|
+
["hub.membership.disable", ""],
|
|
752
|
+
["hub.companyJoin.confirm", "s"],
|
|
753
|
+
["hub.companyJoin.repair", "s"],
|
|
754
|
+
["general_location.confirm_host", ""],
|
|
755
|
+
["general_location.confirm_windows", "s"],
|
|
756
|
+
["general_location.history", ""],
|
|
757
|
+
["hub.exposure.summary.share", "s"],
|
|
758
|
+
["hub.exposure.summary.context", ""],
|
|
759
|
+
["hub.exposure.summary.revision", "n"],
|
|
760
|
+
["hub.pairing.summary.connect", "s"],
|
|
761
|
+
["hub.pairing.summary.approval", ""],
|
|
762
|
+
["hub.pairing.summary.confirm", "s"],
|
|
763
|
+
["hub.pairing.summary.disconnect", "sss"],
|
|
764
|
+
["hub.pairing.summary.withdraw", ""],
|
|
765
|
+
...["default", "absent", "fingerprint", "deleted", "add", "remove", "order", "removed", "connections", "connection", "confirmed", "role.classicAdmin", "role.fleetAdmin", "role.user", "role.group", "role.guild", "text_none"].map(key => [`settings_confirm.summary.${key}`, ""]),
|
|
766
|
+
["settings_confirm.summary.text_chars", "n"],
|
|
767
|
+
["settings_confirm.summary.in_effect", "s"], ["settings_confirm.summary.inherit", "ns"], ["settings_confirm.summary.more", "n"],
|
|
768
|
+
]);
|
|
769
|
+
function legacyPendingSummaryLine(line) {
|
|
650
770
|
const known = /^(?:Connect this Fleet to Hub (.+) using your company account\. Agent sharing stays separate\.|以公司帳號將這個 Fleet 連接到 Hub (.+)。分享 Agent 需另外選擇。)$/.exec(line);
|
|
651
771
|
return known ? t("pendingHub.connect", known[1] ?? known[2]) : line;
|
|
652
772
|
}
|
|
773
|
+
function pendingSummaryLine(line, descriptor) {
|
|
774
|
+
if (typeof line !== "string") return line;
|
|
775
|
+
if (descriptor != null) {
|
|
776
|
+
if (descriptor.v !== 1 || descriptor.fallback !== line || !Array.isArray(descriptor.parts) || !descriptor.parts.length || descriptor.parts.length > 64) return legacyPendingSummaryLine(line);
|
|
777
|
+
let units = 0;
|
|
778
|
+
const rendered = [];
|
|
779
|
+
for (const part of descriptor.parts) {
|
|
780
|
+
if (typeof part === "string") { units += part.length; rendered.push(part); }
|
|
781
|
+
else {
|
|
782
|
+
if (!part || typeof part.key !== "string" || !Object.prototype.hasOwnProperty.call(pendingSummaryArguments, part.key) || !Array.isArray(part.args)) return legacyPendingSummaryLine(line);
|
|
783
|
+
const shape = pendingSummaryArguments[part.key];
|
|
784
|
+
if (part.args.length !== shape.length || !part.args.every((arg, i) => shape[i] === "s" ? typeof arg === "string" : typeof arg === "number" && Number.isFinite(arg))) return legacyPendingSummaryLine(line);
|
|
785
|
+
units += part.args.reduce((sum, arg) => sum + String(arg).length, 0);
|
|
786
|
+
rendered.push(t(`pendingSummary.${part.key}`, ...part.args));
|
|
787
|
+
}
|
|
788
|
+
if (units > 8192) return legacyPendingSummaryLine(line);
|
|
789
|
+
}
|
|
790
|
+
return rendered.join("");
|
|
791
|
+
}
|
|
792
|
+
return legacyPendingSummaryLine(line);
|
|
793
|
+
}
|
|
653
794
|
export function PendingChanges({ inline = false } = {}) {
|
|
654
795
|
const { pendingChanges } = useStore(appStore);
|
|
655
796
|
const list = pendingChanges || [];
|
|
@@ -674,7 +815,7 @@ export function PendingChanges({ inline = false } = {}) {
|
|
|
674
815
|
${p.state === "pending" ? html`<span class="pending-left">${t("app.pendingLeft", mmss(p.deadline - NOW()))}</span>` : null}
|
|
675
816
|
${p.dismiss ? html`<button type="button" class="icon-btn" aria-label=${t("app.close")} title=${t("app.close")} onClick=${p.dismiss}><${Icon} name="close" size=${14} /></button>` : null}</div>
|
|
676
817
|
${p.label ? html`<div class="pending-label">${p.label}</div>` : null}
|
|
677
|
-
${Array.isArray(p.summary) && p.summary.length ? html`<details class="pending-details"><summary>${t("pendingHost.details")}</summary><ul class="pending-summary">${p.summary.map((line, i) => html`<li key=${i}>${String(pendingSummaryLine(line)).replace(/\\([\\`*_~[\]()<>|])/g, "$1")}</li>`)}</ul></details>` : null}
|
|
818
|
+
${Array.isArray(p.summary) && p.summary.length ? html`<details class="pending-details"><summary>${t("pendingHost.details")}</summary><ul class="pending-summary">${p.summary.map((line, i) => html`<li key=${i}>${String(pendingSummaryLine(line, Array.isArray(p.summary_i18n) && p.summary_i18n.length === p.summary.length ? p.summary_i18n[i] : null)).replace(/\\([\\`*_~[\]()<>|])/g, "$1")}</li>`)}</ul></details>` : null}
|
|
678
819
|
${p.state === "pending" ? html`<${PendingHow} p=${p} />` : null}
|
|
679
820
|
${(p.state === "applying" || p.state === "applied") && p.confirmation && p.confirmation.kind === "web" ? html`<p class="note">${t("app.pendingWeb")}</p>` : null}
|
|
680
821
|
${p.state !== "pending" && p.state !== "applying" && p.state !== "applied" ? html`<${PendingEnded} p=${p} />` : null}
|
|
@@ -797,7 +938,7 @@ register("pendingEnded", {
|
|
|
797
938
|
},
|
|
798
939
|
"zh-TW": {
|
|
799
940
|
why_withdrawn: "你已撤回這項變更,沒有任何設定被修改。",
|
|
800
|
-
why_rejected: "
|
|
941
|
+
why_rejected: "管理員拒絕了這項變更,沒有任何設定被修改。",
|
|
801
942
|
why_expired: "5 分鐘內沒有完成,請確認設定目前的內容。",
|
|
802
943
|
why_not_found: "AgEnD 已經沒有這項請求(已逾時或已清除),請確認設定目前的內容。",
|
|
803
944
|
why_settings_changed: "你送出之後設定又被修改了,所以沒有套用。請檢查設定後,到設定重新做一次這項變更。",
|