@songsid/agend 2.3.5-alpha.10 → 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 +17 -0
- package/dist/accounts-view.js +24 -8
- package/dist/accounts-view.js.map +1 -1
- package/dist/agent-cli-instructions.md +2 -2
- package/dist/auth-api.d.ts +48 -16
- package/dist/auth-api.js +83 -32
- package/dist/auth-api.js.map +1 -1
- package/dist/authority/settings-role.d.ts +56 -0
- package/dist/authority/settings-role.js +48 -0
- package/dist/authority/settings-role.js.map +1 -0
- package/dist/backend/claude-code.d.ts +2 -0
- package/dist/backend/claude-code.js +32 -6
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/cli-env-probe.js +6 -2
- package/dist/backend/cli-env-probe.js.map +1 -1
- package/dist/backend/codex.d.ts +5 -3
- package/dist/backend/codex.js +31 -13
- package/dist/backend/codex.js.map +1 -1
- package/dist/backend/credential-profile.d.ts +18 -0
- package/dist/backend/credential-profile.js +46 -0
- package/dist/backend/credential-profile.js.map +1 -1
- package/dist/backend/kiro.js +1 -1
- package/dist/backend/kiro.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 +17 -1
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +15 -0
- package/dist/backend-availability.js +37 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/bundled-tmux-guard.d.ts +4 -0
- package/dist/bundled-tmux-guard.js +7 -0
- package/dist/bundled-tmux-guard.js.map +1 -1
- package/dist/claude-auth-status.d.ts +20 -8
- package/dist/claude-auth-status.js +38 -22
- package/dist/claude-auth-status.js.map +1 -1
- package/dist/cli-audited.d.ts +60 -0
- package/dist/cli-audited.js +84 -0
- package/dist/cli-audited.js.map +1 -0
- package/dist/cli-capability.d.ts +36 -5
- package/dist/cli-capability.js +2 -2
- package/dist/cli-capability.js.map +1 -1
- package/dist/cli-caps-module.d.ts +5 -1
- package/dist/cli-caps-module.js +4 -2
- package/dist/cli-caps-module.js.map +1 -1
- package/dist/cli-registry-check.js +16 -2
- package/dist/cli-registry-check.js.map +1 -1
- package/dist/cli-registry.d.ts +56 -4
- package/dist/cli-registry.js +1 -1
- package/dist/cli-registry.js.map +1 -1
- package/dist/cli-spec-antigravity.d.ts +12 -1
- package/dist/cli-spec-antigravity.js +13 -1
- package/dist/cli-spec-antigravity.js.map +1 -1
- package/dist/cli-spec-claude-code.d.ts +9 -0
- package/dist/cli-spec-claude-code.js +4 -2
- package/dist/cli-spec-claude-code.js.map +1 -1
- package/dist/cli-spec-codex.d.ts +10 -1
- package/dist/cli-spec-codex.js +5 -3
- package/dist/cli-spec-codex.js.map +1 -1
- package/dist/cli-spec-grok.d.ts +5 -0
- package/dist/cli-spec-grok.js +6 -1
- package/dist/cli-spec-grok.js.map +1 -1
- package/dist/cli-spec-kiro-cli.d.ts +7 -1
- package/dist/cli-spec-kiro-cli.js +7 -3
- package/dist/cli-spec-kiro-cli.js.map +1 -1
- package/dist/cli-spec-muse.d.ts +2 -0
- package/dist/cli-spec-muse.js +3 -1
- package/dist/cli-spec-muse.js.map +1 -1
- package/dist/cli-spec-opencode.d.ts +11 -1
- package/dist/cli-spec-opencode.js +7 -2
- package/dist/cli-spec-opencode.js.map +1 -1
- package/dist/cli.js +28 -1
- package/dist/cli.js.map +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 +26 -0
- package/dist/daemon.js +131 -10
- 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-context.d.ts +5 -1
- package/dist/fleet-manager.d.ts +363 -71
- package/dist/fleet-manager.js +1374 -367
- package/dist/fleet-manager.js.map +1 -1
- package/dist/fleet-process-handlers.d.ts +1 -1
- package/dist/fleet-process-handlers.js +3 -2
- package/dist/fleet-process-handlers.js.map +1 -1
- package/dist/general-knowledge/skills/concepts/SKILL.md +21 -14
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +9 -8
- package/dist/general-knowledge/skills/cross-instance-messaging/SKILL.md +9 -1
- package/dist/general-knowledge/skills/kiro-engine-migration/SKILL.md +1 -1
- package/dist/general-knowledge/skills/web-dashboard/SKILL.md +27 -20
- package/dist/instance-lifecycle.js +33 -3
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/instructions.js +29 -6
- package/dist/instructions.js.map +1 -1
- package/dist/locale.js +125 -81
- package/dist/locale.js.map +1 -1
- package/dist/login-manager.d.ts +2 -2
- package/dist/login-manager.js +3 -2
- package/dist/login-manager.js.map +1 -1
- package/dist/native-model-catalog.d.ts +20 -0
- package/dist/native-model-catalog.js +107 -2
- package/dist/native-model-catalog.js.map +1 -1
- package/dist/public-web-gateway.js +1 -1
- package/dist/public-web-gateway.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-api.d.ts +1 -1
- package/dist/runtime-api.js +104 -12
- package/dist/runtime-api.js.map +1 -1
- package/dist/runtime-autostart.d.ts +61 -0
- package/dist/runtime-autostart.js +161 -0
- package/dist/runtime-autostart.js.map +1 -0
- package/dist/runtime-background.d.ts +200 -0
- package/dist/runtime-background.js +480 -0
- package/dist/runtime-background.js.map +1 -0
- package/dist/runtime-build-info.js +5 -5
- package/dist/runtime-build-info.js.map +1 -1
- package/dist/runtime-cli-background.d.ts +92 -0
- package/dist/runtime-cli-background.js +336 -0
- package/dist/runtime-cli-background.js.map +1 -0
- package/dist/runtime-cli-install.d.ts +148 -8
- package/dist/runtime-cli-install.js +253 -59
- package/dist/runtime-cli-install.js.map +1 -1
- package/dist/runtime-cli.d.ts +8 -1
- package/dist/runtime-cli.js +206 -44
- package/dist/runtime-cli.js.map +1 -1
- package/dist/runtime-client-store.d.ts +11 -0
- package/dist/runtime-client-store.js +20 -5
- package/dist/runtime-client-store.js.map +1 -1
- package/dist/runtime-client.d.ts +23 -1
- package/dist/runtime-client.js +92 -6
- package/dist/runtime-client.js.map +1 -1
- package/dist/runtime-connection.d.ts +1 -1
- package/dist/runtime-connection.js +1 -1
- package/dist/runtime-connection.js.map +1 -1
- package/dist/runtime-coordinator.d.ts +95 -1
- package/dist/runtime-coordinator.js +344 -10
- package/dist/runtime-coordinator.js.map +1 -1
- package/dist/runtime-enroll-notice.d.ts +4 -0
- package/dist/runtime-enroll-notice.js +21 -0
- package/dist/runtime-enroll-notice.js.map +1 -0
- package/dist/runtime-enrollment.d.ts +21 -0
- package/dist/runtime-enrollment.js +52 -0
- package/dist/runtime-enrollment.js.map +1 -0
- package/dist/runtime-pane-native.js +4 -4
- package/dist/runtime-pane-native.js.map +1 -1
- package/dist/runtime-protocol.d.ts +78 -1
- package/dist/runtime-protocol.js +95 -5
- package/dist/runtime-protocol.js.map +1 -1
- package/dist/runtime-remote-accounts.d.ts +12 -0
- package/dist/runtime-remote-accounts.js +56 -5
- package/dist/runtime-remote-accounts.js.map +1 -1
- package/dist/runtime-remote-setup.d.ts +4 -1
- package/dist/runtime-remote-setup.js +4 -1
- package/dist/runtime-remote-setup.js.map +1 -1
- package/dist/runtime-update-controller.d.ts +11 -0
- package/dist/runtime-update-controller.js +56 -4
- package/dist/runtime-update-controller.js.map +1 -1
- package/dist/settings-api.d.ts +13 -1
- package/dist/settings-api.js +44 -20
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.d.ts +5 -13
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-confirmation.d.ts +11 -13
- package/dist/settings-confirmation.js +2 -6
- package/dist/settings-confirmation.js.map +1 -1
- package/dist/settings-effect.d.ts +5 -0
- package/dist/settings-effect.js +76 -10
- package/dist/settings-effect.js.map +1 -1
- package/dist/settings-http-confirmation.d.ts +8 -1
- package/dist/settings-http-confirmation.js +39 -13
- package/dist/settings-http-confirmation.js.map +1 -1
- package/dist/settings-request-capability.d.ts +7 -0
- package/dist/settings-request-capability.js +3 -1
- package/dist/settings-request-capability.js.map +1 -1
- package/dist/setup-i18n.js +4 -4
- package/dist/setup-i18n.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/subagent-records.d.ts +45 -0
- package/dist/subagent-records.js +214 -0
- package/dist/subagent-records.js.map +1 -0
- package/dist/subagent-service.d.ts +27 -0
- package/dist/subagent-service.js +199 -0
- package/dist/subagent-service.js.map +1 -0
- package/dist/tmux-manager.d.ts +2 -2
- package/dist/tmux-manager.js +5 -3
- package/dist/tmux-manager.js.map +1 -1
- package/dist/ui/account-identity.js +7 -5
- package/dist/ui/accounts-keepalive.js +17 -17
- package/dist/ui/accounts-manage.js +34 -34
- package/dist/ui/accounts-view.js +68 -24
- package/dist/ui/agent-runtime-settings.js +1 -1
- package/dist/ui/backend-signin.js +67 -67
- package/dist/ui/chat-msg-actions.js +50 -4
- package/dist/ui/chat-quote.js +256 -0
- package/dist/ui/chat-store.js +9 -4
- package/dist/ui/cli-caps.js +7 -7
- package/dist/ui/credential-profile-select.js +4 -4
- package/dist/ui/general-location.js +1 -1
- package/dist/ui/host-install.js +290 -0
- package/dist/ui/hub-company-join-strings.js +3 -0
- package/dist/ui/hub-company-join.js +20 -2
- package/dist/ui/hub-owner-strings.js +5 -4
- package/dist/ui/hub-pairing-progress-strings.js +1 -1
- package/dist/ui/hub-quick-strings.js +4 -4
- package/dist/ui/hub-strings.js +6 -6
- package/dist/ui/machine-signin.js +4 -4
- package/dist/ui/model-picker.js +68 -0
- package/dist/ui/panel-chat.js +74 -13
- package/dist/ui/panel-fleet.js +8 -2
- package/dist/ui/panel-hub.js +8 -4
- package/dist/ui/panel-needs.js +2 -2
- package/dist/ui/panel-runtimes.js +232 -33
- package/dist/ui/panel-settings.js +7 -1
- package/dist/ui/panel-windows-cli.js +1 -1
- package/dist/ui/runtime-cli-install.js +99 -20
- package/dist/ui/runtime-commands.d.ts +2 -0
- package/dist/ui/runtime-commands.js +34 -1
- package/dist/ui/runtime-update-status.js +2 -2
- package/dist/ui/search-dialog.js +1 -0
- package/dist/ui/settings-access-overview.js +167 -0
- package/dist/ui/settings-access-strings.js +1 -1
- package/dist/ui/settings-catalog.js +19 -3
- package/dist/ui/settings-confirm.js +2 -2
- package/dist/ui/settings-devices.js +59 -25
- package/dist/ui/settings-dialogs.js +12 -13
- package/dist/ui/settings-guests.js +1 -1
- package/dist/ui/settings-hub-company-join.js +10 -7
- package/dist/ui/settings-hub-connection.js +121 -0
- package/dist/ui/settings-hub-membership.js +1 -1
- package/dist/ui/settings-hub-run.js +5 -6
- package/dist/ui/settings-hub-section.js +3 -6
- package/dist/ui/settings-hub.js +12 -7
- package/dist/ui/settings-layout.js +9 -7
- package/dist/ui/settings-outside.js +87 -19
- package/dist/ui/settings-registry.js +2 -1
- package/dist/ui/settings-revoke-strings.js +28 -0
- package/dist/ui/settings-strings.js +25 -25
- package/dist/ui/settings-web-authority.js +11 -4
- package/dist/ui/shared/accounts.css +11 -1
- package/dist/ui/shared/agend-auth.js +8 -1
- package/dist/ui/shared/app-i18n.js +10 -12
- package/dist/ui/shared/app-session.js +13 -16
- package/dist/ui/shared/app-shell.js +37 -37
- package/dist/ui/shared/app-store.js +2 -0
- package/dist/ui/shared/app.css +85 -14
- package/dist/ui/shared/chat-render.js +17 -5
- package/dist/ui/shared/chat-strings.js +4 -4
- package/dist/ui/shared/device-roles.js +27 -0
- package/dist/ui/shared/host-install.css +10 -0
- package/dist/ui/shared/hub-owner.css +6 -0
- package/dist/ui/shared/model-picker.css +21 -0
- package/dist/ui/shared/runtime-install.css +26 -1
- package/dist/ui/shared/setup-host-text.js +4 -4
- package/dist/ui/shared/signin.js +171 -64
- package/dist/ui/shared/subagent-row.css +15 -0
- package/dist/ui/shared/usage-dialog.js +28 -16
- package/dist/ui/shared/view-strings.js +7 -7
- package/dist/ui/shared/web-authorize.js +54 -4
- package/dist/ui/signin.html +19 -8
- package/dist/ui/structured-signin.js +30 -30
- package/dist/ui/subagent-row.js +72 -0
- package/dist/ui/web-terminal/terminal.js +9 -9
- package/dist/update-launch.js +4 -1
- package/dist/update-launch.js.map +1 -1
- package/dist/update-npm-env.d.ts +70 -0
- package/dist/update-npm-env.js +128 -0
- package/dist/update-npm-env.js.map +1 -0
- package/dist/usage/format-rich.js +1 -1
- package/dist/usage/format-rich.js.map +1 -1
- package/dist/usage/providers.js +2 -2
- package/dist/usage/providers.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 +38 -4
- package/dist/web-api.js +370 -18
- package/dist/web-api.js.map +1 -1
- package/dist/web-auth.js +1 -1
- package/dist/web-auth.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-channel-echo.js +3 -1
- package/dist/web-channel-echo.js.map +1 -1
- package/dist/web-commands.d.ts +9 -1
- package/dist/web-commands.js +7 -1
- package/dist/web-commands.js.map +1 -1
- package/dist/web-host-install.d.ts +127 -0
- package/dist/web-host-install.js +165 -0
- package/dist/web-host-install.js.map +1 -0
- package/dist/web-remote-access.d.ts +194 -11
- package/dist/web-remote-access.js +458 -34
- package/dist/web-remote-access.js.map +1 -1
- package/dist/web-session.d.ts +11 -3
- package/dist/web-session.js.map +1 -1
- package/dist/web-signin-device.d.ts +16 -0
- package/dist/web-signin-device.js +81 -0
- package/dist/web-signin-device.js.map +1 -0
- package/dist/web-update.js +3 -1
- package/dist/web-update.js.map +1 -1
- package/dist/windows-cli-api.js +2 -1
- package/dist/windows-cli-api.js.map +1 -1
- package/dist/windows-cli-worker.d.ts +14 -0
- package/dist/windows-cli-worker.js +145 -1
- package/dist/windows-cli-worker.js.map +1 -1
- package/dist/windows-cli.d.ts +4 -0
- package/dist/windows-cli.js +9 -1
- package/dist/windows-cli.js.map +1 -1
- package/launcher/agend-install.cjs +16 -3
- package/package.json +1 -1
- package/templates/runtime-install/install.ps1 +219 -12
|
@@ -90,16 +90,15 @@ register("app", {
|
|
|
90
90
|
signOutAll: "Sign out everywhere", devices: "Signed-in devices", expires: "Ends by {0} at the latest, or after {1} unused",
|
|
91
91
|
failed: "That did not work — try again.", close: "Close", more: "More actions", menu: "Menu",
|
|
92
92
|
pendingTitle: "Changes waiting for confirmation", pending_pending: "Waiting for confirmation", pending_applying: "Confirmed — applying…",
|
|
93
|
-
pendingWeb: "Confirmed by your account
|
|
93
|
+
pendingWeb: "Confirmed by your account as a signed-in admin.",
|
|
94
94
|
pending_applied: "Confirmed and applied", pending_rejected: "Not applied", pending_expired: "Expired",
|
|
95
95
|
pending_stale: "Not applied — settings changed meanwhile", pending_failed: "Confirmed, but applying it failed",
|
|
96
96
|
pendingLeft: "{0} left", withdraw: "Withdraw",
|
|
97
97
|
// #2868: where to confirm it, said plainly; the host's command folded away unless it is the only way.
|
|
98
98
|
pendingPosting: "Sending the confirm card to General…", pendingChatWhere: "To apply it, press Confirm on the card in General on {0}.",
|
|
99
99
|
pendingHostOnly: "No General can take the confirm card. Confirm it on the host: {0}", pendingAdvanced: "Advanced: confirm on the host",
|
|
100
|
-
pendingSelf: "
|
|
101
|
-
pendingApplyRefused: "This browser can't apply it here now
|
|
102
|
-
pendingAuthorize: "Authorize this browser to apply changes like this here next time, without General.",
|
|
100
|
+
pendingSelf: "You are signed in as an admin, so you can apply it here.", pendingApplyNow: "Apply now",
|
|
101
|
+
pendingApplyRefused: "This browser can't apply it here now. Another way to confirm it: the card in General (if this fleet has chat), or your authenticator code if you asked for one.",
|
|
103
102
|
opWriting: "Applying settings… {0}/{1}", opWaiting: "Settings: waiting for confirmation in chat", opApplying: "Applying settings…",
|
|
104
103
|
opDone: "Settings applied", opRestart: "Settings saved — AgEnD needs a restart to use them", opPartial: "Some settings were not applied",
|
|
105
104
|
opFailed: "Settings were not applied", openSettings: "Open Settings",
|
|
@@ -111,14 +110,14 @@ register("app", {
|
|
|
111
110
|
restartOnHostChat: "Send /restart in General to use them.",
|
|
112
111
|
restartRefused: "Restart refused: {0}",
|
|
113
112
|
pendingSent: "Sent for confirmation — a fleet admin confirms it in chat.",
|
|
114
|
-
pendingSelfSent: "Confirmed by your account
|
|
113
|
+
pendingSelfSent: "Confirmed by your account — applying.",
|
|
115
114
|
needsNav: "Needs you", needsTab: "Needs you", needsCount: "{0} waiting", noticesNav: "Notices", noticesCount: "{0} unread",
|
|
116
115
|
// #2293: global search — chats, cross-instance messages and tasks (not the sidebar's filter of agents).
|
|
117
116
|
search: "Search", searchTitle: "Search chats, messages between agents and tasks ({0})",
|
|
118
117
|
confirmTitle: "Please confirm", confirmOk: "Continue", cancel: "Cancel",
|
|
119
118
|
sidePanelLeave: "Leave {0} without saving? Your changes there will be lost.", sidePanelDiscard: "Discard changes",
|
|
120
119
|
// The server's own wording (src/locale.ts needs.reason.*), so the web says what Discord says.
|
|
121
|
-
needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "
|
|
120
|
+
needs_reason_kiro_choice: "Kiro needs your decision", needs_reason_hang: "Not responding", needs_reason_exited: "Exited", needs_reason_assist: "Waiting at its terminal", needs_reason_question: "Asking you a question", needs_reason_permission: "Permission needed", needs_reason_dangerous_command: "Dangerous command waiting", needs_reason_login: "Waiting to connect its AI account", needs_reason_dialog: "Waiting at a dialog", needs_reason_terminal_input: "May be waiting for input", needs_reason_auth_paused: "Paused: AI account not connected", needs_reason_backend_signin: "AI account needs connecting", needs_reason_config_invalid: "Configuration file needs attention", needs_reason_hub_proposal: "Hub action proposed: review locally", needs_reason_hub_execution_hold: "Hub work held: review locally", needs_reason_hub_unavailable: "Hub not running", needs_reason_config_fallback: "Running on stored configuration", config_history_edit: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. The next restart would use the stored valid copy from {4}. Correct the YAML error; the file has not been changed by AgEnD.", config_history_no_history: "{0}, line {1}, column {2}: {3}. AgEnD is still running on the previous settings. No stored valid copy is available, so the next restart cannot recover automatically. Correct the YAML error before restarting; the file has not been changed by AgEnD.", config_history_fallback: "{0}, line {1}, column {2}: {3}. AgEnD started using the stored valid copy from {4}. Correct the YAML error and reload the settings. The file on disk has not been changed by AgEnD.", needs_reason_general_windows_offline: "General’s Windows PC is offline", needs_reason_general_location_hold: "Run General on", needs_reason_native_pane_hold: "Windows agent needs attention", needs_reason_crashed: "Crashed", needs_reason_usage_limit: "Usage limit reached · reset time unknown", needs_reason_delivery_uncertain: "Could not confirm delivery", needs_reason_delivery_failed: "Delivery failed", needs_reason_missed_offline: "Missed while AgEnD was offline", needs_reason_task_review: "Waiting for your confirmation", needs_reason_task_blocked: "Blocked: asks you",
|
|
122
121
|
},
|
|
123
122
|
"zh-TW": {
|
|
124
123
|
brand: "AgEnD", fleet: "Fleet", fleetOverview: "Fleet 概覽", view: "檢視", settings: "設定", instances: "Agent", newInstance: "新增 Agent", newAgent: "新增 Agent",
|
|
@@ -141,15 +140,14 @@ register("app", {
|
|
|
141
140
|
signOutAll: "全部登出", devices: "已登入的裝置", expires: "最晚 {0} 結束;閒置 {1} 也會結束",
|
|
142
141
|
failed: "沒有成功,請再試一次。", close: "關閉", more: "更多動作", menu: "選單",
|
|
143
142
|
pendingTitle: "等待確認的變更", pending_pending: "等待確認", pending_applying: "已確認——套用中…",
|
|
144
|
-
pendingWeb: "
|
|
143
|
+
pendingWeb: "由你的帳號以已登入的管理員身分確認。",
|
|
145
144
|
pending_applied: "已確認並套用", pending_rejected: "未套用", pending_expired: "已逾時",
|
|
146
145
|
pending_stale: "未套用——設定在這期間已變動", pending_failed: "已確認,但套用失敗",
|
|
147
146
|
pendingLeft: "剩 {0}", withdraw: "撤回",
|
|
148
147
|
pendingPosting: "正在把確認卡送到 General…", pendingChatWhere: "要套用,請到 {0} 的 General,在確認卡上按「確認」。",
|
|
149
148
|
pendingHostOnly: "沒有可以接收確認卡的 General。請在主機上確認:{0}", pendingAdvanced: "進階:在主機上確認",
|
|
150
|
-
pendingSelf: "
|
|
151
|
-
pendingApplyRefused: "
|
|
152
|
-
pendingAuthorize: "授權這個瀏覽器,之後這類變更可以直接套用,不必到 General。",
|
|
149
|
+
pendingSelf: "你已用管理員身分登入,可以直接在這裡套用。", pendingApplyNow: "立即套用",
|
|
150
|
+
pendingApplyRefused: "這個瀏覽器現在無法直接套用。其他確認方式:General 的確認卡(有接聊天平台時),或你要求時用你的驗證碼。",
|
|
153
151
|
opWriting: "正在套用設定… {0}/{1}", opWaiting: "設定:等待在聊天中確認", opApplying: "正在套用設定…",
|
|
154
152
|
opDone: "設定已套用", opRestart: "設定已儲存——需要重新啟動 AgEnD 才會生效", opPartial: "部分設定沒有套用",
|
|
155
153
|
opFailed: "設定沒有套用", openSettings: "開啟設定",
|
|
@@ -160,11 +158,11 @@ register("app", {
|
|
|
160
158
|
restartOnHostChat: "請在 General 傳 /restart 讓它們生效。",
|
|
161
159
|
restartRefused: "重新啟動被拒絕:{0}",
|
|
162
160
|
pendingSent: "已送出確認——由 fleet 管理員在聊天中確認。",
|
|
163
|
-
pendingSelfSent: "
|
|
161
|
+
pendingSelfSent: "已由你的帳號確認——套用中。",
|
|
164
162
|
needsNav: "等你處理", needsTab: "待處理", needsCount: "{0} 件待處理", noticesNav: "通知", noticesCount: "{0} 則未讀",
|
|
165
163
|
search: "搜尋", searchTitle: "搜尋聊天、agent 之間的訊息與任務({0})",
|
|
166
164
|
confirmTitle: "請確認", confirmOk: "繼續", cancel: "取消",
|
|
167
165
|
sidePanelLeave: "不儲存就離開「{0}」?你在那裡的修改會遺失。", sidePanelDiscard: "捨棄修改",
|
|
168
|
-
needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "
|
|
166
|
+
needs_reason_kiro_choice: "Kiro 需要你決定", needs_reason_hang: "沒有回應", needs_reason_exited: "已結束", needs_reason_assist: "在終端機上等待", needs_reason_question: "正在問你問題", needs_reason_permission: "需要權限", needs_reason_dangerous_command: "危險指令待確認", needs_reason_login: "等待連接 AI 帳號", needs_reason_dialog: "停在對話框", needs_reason_terminal_input: "可能在等輸入", needs_reason_auth_paused: "已暫停:AI 帳號未連接", needs_reason_backend_signin: "需要連接 AI 帳號", needs_reason_config_invalid: "設定檔需要處理", needs_reason_hub_proposal: "Hub 提議操作:請在本機檢視", needs_reason_hub_execution_hold: "Hub 工作已暫停:請在本機檢視", needs_reason_hub_unavailable: "Hub 未在執行", needs_reason_config_fallback: "正在使用儲存的設定副本", config_history_edit: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。下次重新啟動會改用 {4} 儲存的有效副本。請修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_no_history: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 仍使用先前的設定執行。沒有可用的有效副本,下次重新啟動將無法自動恢復。請在重新啟動前修正 YAML 錯誤;AgEnD 未更動此檔案。", config_history_fallback: "{0} 第 {1} 行、第 {2} 欄:{3}。AgEnD 已使用 {4} 儲存的有效副本啟動。請修正 YAML 錯誤並重新載入設定。AgEnD 未更動磁碟上的檔案。", needs_reason_general_windows_offline: "General 所在的 Windows 電腦已離線", needs_reason_general_location_hold: "General 執行位置", needs_reason_native_pane_hold: "Windows Agent 需要處理", needs_reason_crashed: "已崩潰", needs_reason_usage_limit: "用量已達上限 · 恢復時間未知", needs_reason_delivery_uncertain: "無法確認是否送達", needs_reason_delivery_failed: "傳送失敗", needs_reason_missed_offline: "AgEnD 離線時錯過", needs_reason_task_review: "等你確認", needs_reason_task_blocked: "卡住,在問你",
|
|
169
167
|
},
|
|
170
168
|
});
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
// The Session menu (#1018; once in the retired shell.js): who is signed in on this device,
|
|
2
|
-
//
|
|
1
|
+
// The Session menu (#1018; once in the retired shell.js): who is signed in on this device, its role, and signing out.
|
|
2
|
+
// AGEND-138 (#3486): the other signed-in devices are not listed here any more — Settings → Devices has the full list (and
|
|
3
|
+
// "Sign out everywhere"), so an admin gets a "Manage devices" link to it. A guest or read-only session has no Settings, so
|
|
4
|
+
// its own "Sign out everywhere" (its account's devices) stays here.
|
|
3
5
|
// It reads /auth/session when the page starts and each time the menu is opened — a person's action, not a timer.
|
|
4
6
|
import { html, useEffect, useRef, useState } from "./app-html.js";
|
|
5
7
|
import { Icon } from "./ui-icons.js";
|
|
6
8
|
import { t, lang } from "./app-i18n.js";
|
|
7
|
-
import { AuthorizeChip } from "./web-authorize.js";
|
|
9
|
+
import { AuthorizeChip, useWebAuthorization } from "./web-authorize.js";
|
|
10
|
+
import { roleName } from "./device-roles.js"; // its own file: a retained older web-authorize.js has no roleName (PR #3553 review)
|
|
8
11
|
|
|
9
12
|
async function getJson(url) {
|
|
10
13
|
try {
|
|
@@ -14,23 +17,19 @@ async function getJson(url) {
|
|
|
14
17
|
}
|
|
15
18
|
const clock = (ms) => new Date(ms).toLocaleTimeString(lang() === "zh-TW" ? "zh-TW" : undefined, { hour: "2-digit", minute: "2-digit" });
|
|
16
19
|
const span = (ms) => { const m = Math.max(1, Math.round(ms / 60000)); return m >= 90 ? `${Math.round(m / 60)} h` : `${m} min`; };
|
|
17
|
-
const ago = (ms) => { const m = Math.round((Date.now() - ms) / 60000); return m < 1 ? t("app.justNow") : m < 90 ? t("app.minAgo", m) : t("app.hrAgo", Math.round(m / 60)); };
|
|
18
20
|
|
|
19
21
|
export function SessionMenu() {
|
|
20
22
|
const [me, setMe] = useState(undefined); // undefined: not read yet; null: signed out
|
|
21
|
-
const [
|
|
22
|
-
// #3061 (P2b): on a web-only fleet only the verified owner ends the OTHER devices (the server says so with the list and
|
|
23
|
-
// refuses anyone else regardless); a session that is not one still sees them and can sign itself out.
|
|
24
|
-
const [mayEndOthers, setMayEndOthers] = useState(true);
|
|
23
|
+
const [others, setOthers] = useState(0); // a non-admin session's other devices (its account's): all it can end here
|
|
25
24
|
const [open, setOpen] = useState(false);
|
|
26
25
|
const [error, setError] = useState(false);
|
|
26
|
+
const auth = useWebAuthorization(); // AGEND-138: the role line below (the chip shares this one read)
|
|
27
27
|
const btn = useRef(null), pop = useRef(null);
|
|
28
28
|
async function refresh() {
|
|
29
29
|
const m = await getJson("/auth/session");
|
|
30
30
|
setMe(m);
|
|
31
|
-
const s = m ? await getJson("/auth/sessions") : null;
|
|
32
|
-
|
|
33
|
-
setMayEndOthers(!(s && s.canEndOthers === false));
|
|
31
|
+
const s = m && m.tier !== "admin" ? await getJson("/auth/sessions") : null;
|
|
32
|
+
setOthers(s && Array.isArray(s.sessions) ? s.sessions.filter((x) => !x.current).length : 0);
|
|
34
33
|
}
|
|
35
34
|
useEffect(() => { refresh(); }, []);
|
|
36
35
|
useEffect(() => {
|
|
@@ -49,7 +48,6 @@ export function SessionMenu() {
|
|
|
49
48
|
}
|
|
50
49
|
const onKey = (e) => { if (e.key === "Escape") { e.preventDefault(); e.stopPropagation(); setOpen(false); btn.current && btn.current.focus(); } };
|
|
51
50
|
const label = me ? t("app.session") : t("app.signIn");
|
|
52
|
-
const rows = sessions || [];
|
|
53
51
|
return html`<div class="session">
|
|
54
52
|
<button ref=${btn} type="button" class="side-row" aria-haspopup="dialog" aria-expanded=${open ? "true" : "false"}
|
|
55
53
|
onClick=${() => { const next = !open; setOpen(next); if (next) refresh(); }}>
|
|
@@ -58,13 +56,12 @@ export function SessionMenu() {
|
|
|
58
56
|
${!me ? html`<h3>${t("app.signedOut")}</h3><a class="btn" href=${`/signin?next=${encodeURIComponent(location.pathname)}`}>${t("app.signIn")}</a>` : html`
|
|
59
57
|
<h3>${t("app.signedIn")} · ${me.label}</h3>
|
|
60
58
|
<p class="sub">${t("app.expires", clock(me.expiresAt), span(me.idleMs))}</p>
|
|
59
|
+
${me.tier === "guest" || me.tier === "read" || (me.tier === "admin" && auth.st) ? html`<p class="role" data-role=${me.tier === "admin" ? (auth.st.state === "verified" ? "owner" : "admin") : me.tier}><span class="sub">${t("webauth.role")}</span> <strong>${roleName(me.tier, !!auth.st && auth.st.state === "verified")}</strong></p>` : null}
|
|
61
60
|
<${AuthorizeChip} />
|
|
62
|
-
${rows.length > 1 ? html`<h3>${t("app.devices")}</h3><ul class="devices">${rows.map(s => html`<li key=${s.handle}>
|
|
63
|
-
<span class="grow"><span class="name">${s.label}${s.current ? ` · ${t("app.thisDevice")}` : ""}</span><span class="when">${t("app.lastActive", ago(s.lastSeen))}</span></span>
|
|
64
|
-
${s.current || !mayEndOthers ? null : html`<button type="button" class="btn btn-sm danger" onClick=${() => act("DELETE", `/auth/sessions/${encodeURIComponent(s.handle)}`, refresh)}>${t("app.signOut")}</button>`}</li>`)}</ul>` : null}
|
|
65
61
|
<div class="row">
|
|
66
62
|
<button type="button" class="btn" onClick=${() => act("POST", "/auth/logout", () => { location.href = "/signin"; })}><${Icon} name="user" size=${16} />${t("app.signOut")}</button>
|
|
67
|
-
${
|
|
63
|
+
${me.tier === "admin" ? html`<a class="btn" id="manageDevices" href="/settings/access">${t("app.manageDevices")}</a>`
|
|
64
|
+
: others > 0 ? html`<button type="button" class="btn danger" onClick=${() => act("DELETE", "/auth/sessions", () => { location.href = "/signin"; })}>${t("app.signOutAll")}</button>` : null}
|
|
68
65
|
</div>`}
|
|
69
66
|
${error ? html`<p class="err" role="alert">${t("app.failed")}</p>` : null}
|
|
70
67
|
</div>` : null}
|
|
@@ -18,7 +18,6 @@ import { ErrorState, Skeleton } from "./ui-states.js";
|
|
|
18
18
|
import { Dialog } from "./ui-dialog.js";
|
|
19
19
|
import { InstanceNav, RosterNav, namesStore, setNamesPrimary } from "./instance-nav.js";
|
|
20
20
|
import { usageRailStore } from "./header-tools.js";
|
|
21
|
-
import { useWebAuthorization } from "./web-authorize.js";
|
|
22
21
|
import { RightRail, sidePanelStore } from "./side-panel.js";
|
|
23
22
|
import { OwnerCssKeepBar } from "./owner-css.js";
|
|
24
23
|
import { UpdateLine } from "./app-update.js";
|
|
@@ -463,8 +462,8 @@ function Sidebar({ route, onNewInstance, viewOnly }) {
|
|
|
463
462
|
<nav data-trust="navigation" class="side-nav" aria-label=${t("app.menu")}>
|
|
464
463
|
${overview}
|
|
465
464
|
${navLink("needs", NEEDS_PATH, "inbox", t("app.needsNav"), needsCount)}
|
|
466
|
-
${/* #2910 D2: a web-only fleet (no chat connection) has Notices — what General would have said. */
|
|
467
|
-
app.connections === 0 && app.notices && app.notices.enabled ? navLink("notices", NOTICES_PATH, "bell", t("app.noticesNav"), app.notices.unread | 0, "app.noticesCount") : null}
|
|
465
|
+
${/* #2910 D2: a web-only fleet (no chat connection) has Notices — what General would have said. AGEND-122: a chat fleet too, while one is unread (a confirmation from another device that nothing else could carry). */
|
|
466
|
+
(app.connections === 0 || (app.notices && app.notices.unread > 0)) && app.notices && app.notices.enabled ? navLink("notices", NOTICES_PATH, "bell", t("app.noticesNav"), app.notices.unread | 0, "app.noticesCount") : null}
|
|
468
467
|
${searchOffered(canCreate) ? searchRow() : null}
|
|
469
468
|
${canCreate && onNewInstance ? html`<button type="button" class="side-row side-new" onClick=${onNewInstance}><${Icon} name="plus" /><span class="grow">${t("app.newAgent")}</span></button>` : null}
|
|
470
469
|
</nav>
|
|
@@ -640,6 +639,17 @@ const mmss = (ms) => { const s = Math.max(0, Math.ceil(ms / 1000)); return `${Ma
|
|
|
640
639
|
* corner, except in Settings itself, which shows the same cards in its column, right under the operation (`inline`),
|
|
641
640
|
* so they never cover it (alpha.2 sweep).
|
|
642
641
|
*/
|
|
642
|
+
// #3511: the immutable diff stays in the Fleet's locale; this known line is display-only in the page's locale.
|
|
643
|
+
// Own dictionary also works when app-i18n.js was cached before the Hub connection flow shipped.
|
|
644
|
+
register("pendingHub", {
|
|
645
|
+
en: { connect: "Connect this Fleet to Hub {0} using your company account. Agent sharing stays separate." },
|
|
646
|
+
"zh-TW": { connect: "以公司帳號將這個 Fleet 連接到 Hub {0}。分享 Agent 需另外選擇。" },
|
|
647
|
+
});
|
|
648
|
+
function pendingSummaryLine(line) {
|
|
649
|
+
if (typeof line !== "string") return line;
|
|
650
|
+
const known = /^(?:Connect this Fleet to Hub (.+) using your company account\. Agent sharing stays separate\.|以公司帳號將這個 Fleet 連接到 Hub (.+)。分享 Agent 需另外選擇。)$/.exec(line);
|
|
651
|
+
return known ? t("pendingHub.connect", known[1] ?? known[2]) : line;
|
|
652
|
+
}
|
|
643
653
|
export function PendingChanges({ inline = false } = {}) {
|
|
644
654
|
const { pendingChanges } = useStore(appStore);
|
|
645
655
|
const list = pendingChanges || [];
|
|
@@ -664,7 +674,7 @@ export function PendingChanges({ inline = false } = {}) {
|
|
|
664
674
|
${p.state === "pending" ? html`<span class="pending-left">${t("app.pendingLeft", mmss(p.deadline - NOW()))}</span>` : null}
|
|
665
675
|
${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>
|
|
666
676
|
${p.label ? html`<div class="pending-label">${p.label}</div>` : null}
|
|
667
|
-
${Array.isArray(p.summary) && p.summary.length ? html`<ul class="pending-summary">${p.summary.map((line, i) => html`<li key=${i}>${line}</li>`)}</ul>` : 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}
|
|
668
678
|
${p.state === "pending" ? html`<${PendingHow} p=${p} />` : null}
|
|
669
679
|
${(p.state === "applying" || p.state === "applied") && p.confirmation && p.confirmation.kind === "web" ? html`<p class="note">${t("app.pendingWeb")}</p>` : null}
|
|
670
680
|
${p.state !== "pending" && p.state !== "applying" && p.state !== "applied" ? html`<${PendingEnded} p=${p} />` : null}
|
|
@@ -698,9 +708,8 @@ function whereText(where) {
|
|
|
698
708
|
/**
|
|
699
709
|
* #2868: how a pending change is confirmed, in the order a person can act on it. First where: the General card (naming
|
|
700
710
|
* the platform it was posted on), or the host's command when no General could take it. Then, when this browser could
|
|
701
|
-
* confirm it itself (the server's read says so:
|
|
702
|
-
*
|
|
703
|
-
* "Advanced".
|
|
711
|
+
* confirm it itself (the server's read says so: AGEND-122's rule), "Apply now", or the admin's own authenticator code.
|
|
712
|
+
* The host's command otherwise sits folded under "Advanced" (never on a page that is not the AgEnD computer's own).
|
|
704
713
|
*/
|
|
705
714
|
// alpha.6 feedback #2c (the user's decision hmsg-77256f66): a change no General could take says WHY, in plain words, and what
|
|
706
715
|
// would let it through — never "type this command on the host". The host's command stays folded under Advanced, a last resort.
|
|
@@ -720,6 +729,7 @@ register("pendingHost", {
|
|
|
720
729
|
post_failed_do: "Check General's chat connection in Settings → Chat & connections, then make the change again.",
|
|
721
730
|
unknown: "No General could take the confirm card for this change.",
|
|
722
731
|
go: "Open",
|
|
732
|
+
details: "Change details",
|
|
723
733
|
codeLead: "Enter the 6-digit code from your authenticator app to confirm this change.",
|
|
724
734
|
codeLabel: "Authenticator code", codeGo: "Confirm",
|
|
725
735
|
codeWrong: "That code is not right. Use the current code in your authenticator app.",
|
|
@@ -730,10 +740,9 @@ register("pendingHost", {
|
|
|
730
740
|
// AGEND-118: the one next step this device can take, by state; the other ways are folded under "Other ways to confirm".
|
|
731
741
|
applyLead: "Press Apply now to confirm this change from this browser.", applyRefused: "This browser can't apply it here now. Use one of the other ways to confirm.",
|
|
732
742
|
cantHere: "This device can't confirm this change yet.",
|
|
733
|
-
setupLead: "
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
hostBrowser: "This change opens a link to this fleet, so only the browser on the computer running AgEnD can confirm it. Do it there.",
|
|
743
|
+
setupLead: "You asked for your authenticator code to confirm changes from other devices, but your authenticator app is gone. Set it up again on the computer running AgEnD (Settings → Access & security), or turn that switch off there.",
|
|
744
|
+
onHost: "A change that opens a public link can't be confirmed over a link. Confirm it from a direct connection, or in the browser on the computer running AgEnD.",
|
|
745
|
+
hostOnly: "Only the computer running AgEnD can confirm changes here: “Only this computer can authorize” is turned on. Confirm it in the browser on that computer.",
|
|
737
746
|
more: "Other ways to confirm",
|
|
738
747
|
moreHost: "On the computer running AgEnD, open AgEnD in its own browser and press Apply now on this card.",
|
|
739
748
|
},
|
|
@@ -752,19 +761,19 @@ register("pendingHost", {
|
|
|
752
761
|
post_failed_do: "請到「設定 → 聊天與連線」檢查 General 的連線,再重新做一次這項變更。",
|
|
753
762
|
unknown: "這項變更沒有 General 可以接收確認卡。",
|
|
754
763
|
go: "前往",
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
764
|
+
details: "變更明細",
|
|
765
|
+
codeLead: "輸入驗證器 App 的 6 位數驗證碼,就能確認這項變更。",
|
|
766
|
+
codeLabel: "6 位數驗證碼(驗證器 App)", codeGo: "確認",
|
|
767
|
+
codeWrong: "驗證碼不正確,請使用驗證器 App 目前顯示的 6 位數驗證碼。",
|
|
758
768
|
codePaused: "錯誤次數太多,請 {0} 分鐘後再試。",
|
|
759
|
-
codeNotHere: "
|
|
760
|
-
codeUnavailable: "
|
|
769
|
+
codeNotHere: "這個頁面已無法用驗證碼確認這項變更。",
|
|
770
|
+
codeUnavailable: "無法檢查驗證碼,請再試一次。",
|
|
761
771
|
codeChanged: "這項變更已不是這裡顯示的內容,請重新整理頁面再確認一次。",
|
|
762
772
|
applyLead: "按「立即套用」,就能在這個瀏覽器確認這項變更。", applyRefused: "這個瀏覽器現在無法直接套用,請改用其他確認方式。",
|
|
763
773
|
cantHere: "你目前在這台裝置還無法直接確認這項變更。",
|
|
764
|
-
setupLead: "
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
hostBrowser: "這項變更會開放一條連到這個 fleet 的連結,只有執行 AgEnD 的那台電腦上的瀏覽器能確認。請到那裡操作。",
|
|
774
|
+
setupLead: "你開啟了「從其他裝置確認變更時要我的驗證碼」,但你的驗證器 App 已經不見了。請到執行 AgEnD 的那台電腦,在「設定 → 存取與安全」重新設定,或在那裡關閉這個開關。",
|
|
775
|
+
onHost: "會開放公開連結的變更無法透過連結確認。請改用直接連線,或在執行 AgEnD 的那台電腦的瀏覽器中確認。",
|
|
776
|
+
hostOnly: "目前只有執行 AgEnD 的那台電腦能確認變更(已開啟「只有這台電腦可以授權」)。請到那台電腦的瀏覽器確認。",
|
|
768
777
|
more: "其他確認方式",
|
|
769
778
|
moreHost: "到執行 AgEnD 的那台電腦,用它自己的瀏覽器開啟 AgEnD,在這張卡上按「立即套用」。",
|
|
770
779
|
},
|
|
@@ -788,7 +797,7 @@ register("pendingEnded", {
|
|
|
788
797
|
},
|
|
789
798
|
"zh-TW": {
|
|
790
799
|
why_withdrawn: "你已撤回這項變更,沒有任何設定被修改。",
|
|
791
|
-
why_rejected: "
|
|
800
|
+
why_rejected: "管理員拒絕了這項變更,沒有任何設定被修改。",
|
|
792
801
|
why_expired: "5 分鐘內沒有完成,請確認設定目前的內容。",
|
|
793
802
|
why_not_found: "AgEnD 已經沒有這項請求(已逾時或已清除),請確認設定目前的內容。",
|
|
794
803
|
why_settings_changed: "你送出之後設定又被修改了,所以沒有套用。請檢查設定後,到設定重新做一次這項變更。",
|
|
@@ -836,45 +845,36 @@ function PendingCode({ p }) {
|
|
|
836
845
|
* tells the person to run it (style guide rule 9), and has no Copy for it.
|
|
837
846
|
*/
|
|
838
847
|
function PendingHow({ p }) {
|
|
839
|
-
const a = useWebAuthorization();
|
|
840
848
|
const [refused, setRefused] = useState(false);
|
|
841
849
|
const c = p.confirmation || {}, cmd = `agend settings confirm ${p.id}`;
|
|
842
850
|
const cli = c.kind === "host_cli";
|
|
843
851
|
const why = cli && PENDING_HOST_REASONS.includes(c.reason) ? c.reason : null;
|
|
844
852
|
const go = why && Object.hasOwn(PENDING_HOST_GO, why) ? PENDING_HOST_GO[why] : null;
|
|
845
853
|
const apply = async () => { setRefused(false); const r = await p.applyNow(); if (!r || !r.ok) setRefused(true); };
|
|
846
|
-
|
|
854
|
+
// AGEND-122: a page that is not the AgEnD computer's own browser never shows the host command.
|
|
855
|
+
const advanced = p.remote ? null : html`<details class="pending-host"><summary>${t("app.pendingAdvanced")}</summary><code>${cmd}</code></details>`;
|
|
847
856
|
const goLink = go ? html` <a class="btn btn-sm" href=${settingsPath(go)}>${t("pendingHost.go")}</a>` : null;
|
|
848
857
|
const whyDo = (why || cli) ? html`<p class="note pending-why">${t(`pendingHost.${why || "unknown"}`)}${why ? html` ${t(`pendingHost.${why}_do`)}${goLink}` : null}</p>` : null;
|
|
849
|
-
// The change is waiting for a General's card (or it is still being sent): that card is the step.
|
|
850
|
-
|
|
851
|
-
const mode = p.applyNow ? "apply" : p.confirmWithCode ? "code" : p.totpNotSetUp ? "setup" : p.onHost ? "link" : p.hostBrowser ? "hostBrowser" : "none";
|
|
858
|
+
// The change is waiting for a General's card (or it is still being sent): that card is the step.
|
|
859
|
+
const mode = p.applyNow ? "apply" : p.confirmWithCode ? "code" : p.totpNotSetUp ? "setup" : p.onHost ? "link" : p.hostOnly ? "hostOnly" : "none";
|
|
852
860
|
if (!cli && (mode === "none" || mode === "apply")) {
|
|
853
|
-
const route = !p.applyNow && a.st;
|
|
854
|
-
const canAsk = route && a.st.state === "none" && (a.st.reason === "not_authorized" || a.st.reason === "authorization_expired");
|
|
855
|
-
const asking = route && a.st.state === "pending";
|
|
856
861
|
const lead = c.kind === "posting" ? t("app.pendingPosting") : t("app.pendingChatWhere", whereText(c.where));
|
|
857
862
|
return html`<p class="note">${lead}</p>
|
|
858
863
|
${p.applyNow ? html`<div class="pending-self"><span class="note">${t("app.pendingSelf")}</span>
|
|
859
864
|
<button type="button" class="btn btn-sm btn-primary" onClick=${apply}>${t("app.pendingApplyNow")}</button></div>` : null}
|
|
860
865
|
${refused && !p.applyNow ? html`<p class="note" role="status">${t("app.pendingApplyRefused")}</p>` : null}
|
|
861
|
-
${canAsk ? html`<div class="pending-self"><span class="note">${t("app.pendingAuthorize")}</span>
|
|
862
|
-
<button type="button" class="btn btn-sm" onClick=${a.ask}>${t("webauth.authorize")}</button></div>` : null}
|
|
863
|
-
${asking ? html`<p class="note">${t("webauth.waiting", mmss(a.left))}</p>` : null}
|
|
864
|
-
${a.notice && (canAsk || asking) ? html`<p class="note" role="status">${a.notice}</p>` : null}
|
|
865
866
|
${advanced}`;
|
|
866
867
|
}
|
|
867
868
|
const next = mode === "apply" ? html`<div class="pending-self"><span class="note">${t("pendingHost.applyLead")}</span>
|
|
868
869
|
<button type="button" class="btn btn-sm btn-primary" onClick=${apply}>${t("app.pendingApplyNow")}</button></div>`
|
|
869
870
|
: mode === "code" ? html`<${PendingCode} p=${p} />`
|
|
870
871
|
: mode === "setup" ? html`<p class="note pending-cant">${t("pendingHost.cantHere")}</p>
|
|
871
|
-
<
|
|
872
|
-
<a class="btn btn-sm btn-primary" href=${settingsPath("access")}>${t("pendingHost.setupGo")}</a></div>`
|
|
872
|
+
<p class="note pending-code-setup">${t("pendingHost.setupLead")}</p>`
|
|
873
873
|
: mode === "link" ? html`<p class="note pending-on-host">${t("pendingHost.onHost")}</p>`
|
|
874
|
-
: mode === "
|
|
874
|
+
: mode === "hostOnly" ? html`<p class="note pending-host-only">${t("pendingHost.hostOnly")}</p>`
|
|
875
875
|
: html`${refused ? html`<p class="note" role="status">${t("pendingHost.applyRefused")}</p>` : null}${whyDo}`;
|
|
876
876
|
// What is not the step: shown folded only where there is something to say besides the command.
|
|
877
|
-
const others = mode === "setup" || mode === "link"
|
|
877
|
+
const others = mode === "setup" || mode === "link";
|
|
878
878
|
return html`${next}
|
|
879
879
|
${others ? html`<details class="pending-host pending-others"><summary>${t("pendingHost.more")}</summary><div class="pending-more">
|
|
880
880
|
${whyDo}
|
|
@@ -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
|
@@ -249,7 +249,7 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
249
249
|
.session { position: relative; }
|
|
250
250
|
.pop {
|
|
251
251
|
position: absolute; left: 0; right: 0; bottom: calc(100% + var(--s-1)); z-index: 30; display: flex; flex-direction: column; gap: var(--s-2);
|
|
252
|
-
padding: var(--s-3); border-radius: var(--r-md); background: var(--
|
|
252
|
+
padding: var(--s-3); border-radius: var(--r-md); background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-2); font-size: var(--fs-sm);
|
|
253
253
|
}
|
|
254
254
|
.pop h3 { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
|
|
255
255
|
.pop .sub, .pop .when { color: var(--text-3); font-size: var(--fs-xs); }
|
|
@@ -257,6 +257,10 @@ html:has(.shell), html:has(.shell) body { overflow: hidden; }
|
|
|
257
257
|
.pop .devices .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
|
|
258
258
|
.pop .row { display: flex; gap: var(--s-2); flex-wrap: wrap; }
|
|
259
259
|
.pop .err { color: var(--danger); }
|
|
260
|
+
.pop .role { margin: 0; display: flex; gap: var(--s-2); align-items: baseline; flex-wrap: wrap; }
|
|
261
|
+
.pop .webauth-rebind-form { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-1); }
|
|
262
|
+
.pop .webauth-rebind-form .note, .pop .webauth-rebind-form .err { margin: 0; }
|
|
263
|
+
.pop .webauth-rebind-field { flex: 1; min-width: 0; } /* the shared .field input (token-sized), not a one-off box */
|
|
260
264
|
|
|
261
265
|
.dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-3); display: inline-block; }
|
|
262
266
|
.dot.ok { background: var(--ok); }
|
|
@@ -961,6 +965,14 @@ img.amb-p { object-fit: contain; }
|
|
|
961
965
|
.msg-quote .quote-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
962
966
|
.msg-menu { position: fixed; z-index: 60; min-width: 180px; padding: var(--s-1); border-radius: var(--r-md); background: var(--surface);
|
|
963
967
|
box-shadow: var(--shadow-2); display: flex; flex-direction: column; }
|
|
968
|
+
/* M-2789: the 「引用」 pill on a selected passage (chat-quote.js) — the message menu's look, one item, its pointer at the
|
|
969
|
+
passage's end; readable on white and dark alike (the shared border and shadow tokens). A phone's is a 44-px tap. */
|
|
970
|
+
.msg-menu.quote-pop { min-width: 0; padding: 2px; border: 1px solid var(--border-strong); overflow: visible; }
|
|
971
|
+
.quote-pop .quote-pick { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; white-space: nowrap; }
|
|
972
|
+
.quote-pop.is-phone .quote-pick { min-height: var(--tap); padding: 10px 14px; }
|
|
973
|
+
.quote-pop .quote-tip { position: absolute; width: 10px; height: 10px; background: var(--surface); transform: rotate(45deg); pointer-events: none; }
|
|
974
|
+
.quote-pop .quote-tip.down { bottom: -6px; border-right: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
|
|
975
|
+
.quote-pop .quote-tip.up { top: -6px; border-left: 1px solid var(--border-strong); border-top: 1px solid var(--border-strong); }
|
|
964
976
|
.msg[data-key] { transition: transform var(--t-fast); }
|
|
965
977
|
.msg.swipe-ready { box-shadow: 3px 0 0 var(--accent); border-radius: var(--r-sm); } /* let go now: a reply */
|
|
966
978
|
@media (max-width: 899px) {
|
|
@@ -1279,6 +1291,13 @@ img.amb-p { object-fit: contain; }
|
|
|
1279
1291
|
.row-item .btn, .s-row .btn, .n-actions .btn { min-height: var(--tap); }
|
|
1280
1292
|
.s-row .icon-btn { min-width: var(--tap); min-height: var(--tap); }
|
|
1281
1293
|
.p-settings .s-company-join :is(.field input, .btn) { min-height: var(--tap); }
|
|
1294
|
+
/* AGEND-122: Owner verification's own buttons, dialog fields and switches are phone tap targets (style guide rule 7); the Devices
|
|
1295
|
+
card's primary action beside it matches (one primary button height on the page). */
|
|
1296
|
+
.p-settings .s-outside :is(.save-row .btn, .field input, label.check), .p-settings .s-devices .save-row .btn, .p-settings .s-web-authority .save-row .btn { min-height: var(--tap); }
|
|
1297
|
+
/* PR #3553 review: the session menu's own controls (Sign out, Manage devices, Re-bind, its code box and Bind) are phone tap targets
|
|
1298
|
+
too — the shared --tap token, one height for every button of a kind; the Web authority card's Revoke matches the Devices card's
|
|
1299
|
+
buttons beside it (one danger-button height on the page). */
|
|
1300
|
+
.pop :is(.btn, .field input) { min-height: var(--tap); }
|
|
1282
1301
|
.s-update .s-update-row .btn { min-height: var(--tap); } /* M-2738: the Version and update card's buttons */
|
|
1283
1302
|
.kv { flex-direction: column; align-items: flex-start; gap: 2px; }
|
|
1284
1303
|
}
|
|
@@ -1492,10 +1511,6 @@ body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-s
|
|
|
1492
1511
|
.u-stale-detail { color: var(--text-3); font-size: var(--fs-xs); }
|
|
1493
1512
|
.u-sub { color: var(--text-3); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
|
|
1494
1513
|
/* #3066 §1: a weekly quota's measured 100% under its bar, and its notes (the fleet-only limit always). */
|
|
1495
|
-
.u-cap { margin-top: 4px; font-size: var(--fs-xs); }
|
|
1496
|
-
.u-cap-line { color: var(--text-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
|
|
1497
|
-
.u-cap-wait .u-cap-line { color: var(--text-3); }
|
|
1498
|
-
.u-cap-note { color: var(--text-3); overflow-wrap: anywhere; }
|
|
1499
1514
|
.u-err { color: var(--warn); font-size: var(--fs-sm); }
|
|
1500
1515
|
.u-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); }
|
|
1501
1516
|
/* #1673: the usage rail beside the page on a wide screen (header-tools.js UsageRail; shown only at min-width 1200px). */
|
|
@@ -1534,6 +1549,8 @@ body.side-resizing, body.side-resizing * { cursor: col-resize !important; user-s
|
|
|
1534
1549
|
.u-cm-tag { font-size: var(--fs-xs); color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
1535
1550
|
/* #2240: an account of several pools (agy) names each pool's line: a wider label, ending in an ellipsis if it must. */
|
|
1536
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; }
|
|
1537
1554
|
.u-cm-bar { height: 6px; border-radius: var(--r-full); background: var(--surface-2); overflow: hidden; }
|
|
1538
1555
|
.u-cm-fill { display: block; height: 100%; width: 0; min-width: 2px; border-radius: var(--r-full); background: var(--accent); }
|
|
1539
1556
|
.u-cm-fill.warn { background: var(--warn); } .u-cm-fill.crit { background: var(--danger); }
|
|
@@ -1763,7 +1780,7 @@ textarea.s-yaml { white-space: pre; overflow-x: auto; }
|
|
|
1763
1780
|
.pending-actions { display: flex; justify-content: flex-end; }
|
|
1764
1781
|
.pending-self { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2); }
|
|
1765
1782
|
.pending-self > .note { flex: 1 1 16rem; min-width: 0; }
|
|
1766
|
-
.pending-host summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-xs); }
|
|
1783
|
+
.pending-host summary, .pending-details summary { cursor: pointer; color: var(--text-2); font-size: var(--fs-xs); }
|
|
1767
1784
|
/* AGEND-118: the other ways to confirm, folded under one summary. */
|
|
1768
1785
|
.pending-more { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-2); }
|
|
1769
1786
|
.pending-host code { display: block; margin-top: var(--s-1); font-size: var(--fs-xs); overflow-wrap: anywhere; user-select: all; }
|
|
@@ -3617,14 +3634,14 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
3617
3634
|
/* Refs #3061 (P2b): the signed-in devices of Devices & sign-in. */
|
|
3618
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; }
|
|
3619
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); }
|
|
3620
|
-
.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; }
|
|
3621
|
-
.p-settings .s-dev-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; }
|
|
3622
|
-
.p-settings .s-dev-row + .s-dev-row { border-top: 1px solid var(--border); }
|
|
3623
|
-
.p-settings .s-dev-row.current { background: var(--surface-2); }
|
|
3624
|
-
.p-settings .s-dev-main { display: grid; gap: 2px; min-width: 0; }
|
|
3625
|
-
.p-settings .s-dev-name { font-weight: var(--fw-semibold); overflow-wrap: anywhere; }
|
|
3626
|
-
.p-settings .s-dev-meta { font-size: var(--fs-xs); color: var(--text-3); overflow-wrap: anywhere; }
|
|
3627
|
-
.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; }
|
|
3628
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; }
|
|
3629
3646
|
.p-settings .s-auth-state.is-usable { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
|
|
3630
3647
|
.p-settings .s-auth-state:is(.is-not_signed_in, .is-too_old) { color: var(--warn); background: var(--warn-bg); }
|
|
@@ -4193,3 +4210,57 @@ html.oo-immersive .p-fleet > .panel-body { z-index: 50; }
|
|
|
4193
4210
|
.s-hub-section .hub-retention input { min-width: 0; max-width: 100%; min-height: var(--tap); font-size: var(--fs-md); }
|
|
4194
4211
|
.s-hub-section .hub-retention button { align-self: flex-start; max-width: 100%; min-height: var(--tap); white-space: normal; }
|
|
4195
4212
|
}
|
|
4213
|
+
|
|
4214
|
+
/* S-119: the existing company, manual and sharing controls share one Settings card. */
|
|
4215
|
+
.s-hub-connection { display: flex; flex-direction: column; gap: var(--s-4); min-width: 0; }
|
|
4216
|
+
.s-hub-connection > .s-group-head { padding: 0; flex-wrap: wrap; cursor: default; text-transform: none; letter-spacing: normal; }
|
|
4217
|
+
.s-hub-connection > .s-group-head h3 { margin: 0; font-size: var(--fs-lg); }
|
|
4218
|
+
.s-hub-connection .hub-connection-summary .field { min-width: 0; overflow-wrap: anywhere; }
|
|
4219
|
+
.s-hub-connection .s-ui-disclosure > summary { cursor: pointer; }
|
|
4220
|
+
@media (max-width: 899px), (pointer: coarse) {
|
|
4221
|
+
.s-hub-connection :is(.btn, input:not([type="checkbox"]), .check, .hub-exposure-main, summary) { min-height: var(--tap); }
|
|
4222
|
+
.s-hub-connection .btn { min-width: var(--tap); }
|
|
4223
|
+
.s-hub-connection .field-row { flex-wrap: wrap; }
|
|
4224
|
+
.s-hub-connection .field-row > .btn-primary { width: 100%; }
|
|
4225
|
+
.s-hub-connection .hub-fp .btn { white-space: normal; }
|
|
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();
|