@songsid/agend 2.4.0-alpha.1 → 2.4.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh-TW.md +1 -1
- package/dist/agent-whats-new.js +2 -0
- package/dist/agent-whats-new.js.map +1 -1
- package/dist/auth-api.js +3 -1
- package/dist/auth-api.js.map +1 -1
- package/dist/backend/claude-code.js +4 -0
- package/dist/backend/claude-code.js.map +1 -1
- package/dist/backend/types.d.ts +6 -0
- package/dist/backend/types.js.map +1 -1
- package/dist/backend-availability.d.ts +1 -1
- package/dist/backend-availability.js +28 -1
- package/dist/backend-availability.js.map +1 -1
- package/dist/browser-backend-signins.d.ts +7 -1
- package/dist/browser-backend-signins.js +8 -4
- package/dist/browser-backend-signins.js.map +1 -1
- package/dist/build-provenance.json +1 -1
- package/dist/channel/mcp-tools.js +1 -1
- package/dist/channel/mcp-tools.js.map +1 -1
- package/dist/config-validator.js +47 -7
- package/dist/config-validator.js.map +1 -1
- package/dist/daemon.d.ts +3 -0
- package/dist/daemon.js +4 -0
- package/dist/daemon.js.map +1 -1
- package/dist/fleet-manager.d.ts +33 -4
- package/dist/fleet-manager.js +143 -61
- package/dist/fleet-manager.js.map +1 -1
- package/dist/general-knowledge/skills/credential-profiles/SKILL.md +19 -0
- package/dist/hub/audit/index.js +12 -5
- package/dist/hub/audit/index.js.map +1 -1
- package/dist/hub/catalog.d.ts +6 -0
- package/dist/hub/catalog.js +14 -4
- package/dist/hub/catalog.js.map +1 -1
- package/dist/hub/client.js +2 -0
- package/dist/hub/client.js.map +1 -1
- package/dist/hub/compose/member.d.ts +2 -0
- package/dist/hub/compose/member.js +11 -2
- package/dist/hub/compose/member.js.map +1 -1
- package/dist/hub/compose/server.js +2 -1
- package/dist/hub/compose/server.js.map +1 -1
- package/dist/hub/enrolment-code.d.ts +126 -0
- package/dist/hub/enrolment-code.js +266 -0
- package/dist/hub/enrolment-code.js.map +1 -0
- package/dist/hub/group-policy/admin-impact.js +4 -2
- package/dist/hub/group-policy/admin-impact.js.map +1 -1
- package/dist/hub/group-policy/admin-inventory.js +6 -6
- package/dist/hub/group-policy/admin-inventory.js.map +1 -1
- package/dist/hub/group-policy/authorization.d.ts +16 -2
- package/dist/hub/group-policy/authorization.js +69 -5
- package/dist/hub/group-policy/authorization.js.map +1 -1
- package/dist/hub/group-policy/impact-inventory.js +3 -3
- package/dist/hub/group-policy/impact-inventory.js.map +1 -1
- package/dist/hub/group-policy/resources.d.ts +40 -1
- package/dist/hub/group-policy/resources.js +51 -13
- package/dist/hub/group-policy/resources.js.map +1 -1
- package/dist/hub/group-policy/store.d.ts +6 -0
- package/dist/hub/group-policy/store.js +49 -4
- package/dist/hub/group-policy/store.js.map +1 -1
- package/dist/hub/http/compose.js +30 -6
- package/dist/hub/http/compose.js.map +1 -1
- package/dist/hub/init/text.js +2 -2
- package/dist/hub/init/text.js.map +1 -1
- package/dist/hub/init/web.d.ts +7 -0
- package/dist/hub/init/web.js +6 -1
- package/dist/hub/init/web.js.map +1 -1
- package/dist/hub/join/local.d.ts +27 -0
- package/dist/hub/join/local.js +70 -5
- package/dist/hub/join/local.js.map +1 -1
- package/dist/hub/join/receipt.d.ts +1 -0
- package/dist/hub/join/receipt.js +1 -1
- package/dist/hub/join/receipt.js.map +1 -1
- package/dist/hub/join/service.d.ts +92 -6
- package/dist/hub/join/service.js +199 -28
- package/dist/hub/join/service.js.map +1 -1
- package/dist/hub/join/store.d.ts +2 -1
- package/dist/hub/join/store.js +7 -7
- package/dist/hub/join/store.js.map +1 -1
- package/dist/hub/member/exposure-api.d.ts +2 -0
- package/dist/hub/member/exposure-api.js +3 -2
- package/dist/hub/member/exposure-api.js.map +1 -1
- package/dist/hub/member/exposures.d.ts +4 -0
- package/dist/hub/member/exposures.js +12 -2
- package/dist/hub/member/exposures.js.map +1 -1
- package/dist/hub/member/pairing-notices.js +8 -6
- package/dist/hub/member/pairing-notices.js.map +1 -1
- package/dist/hub/pairing-notices.d.ts +5 -2
- package/dist/hub/pairing-notices.js +38 -13
- package/dist/hub/pairing-notices.js.map +1 -1
- package/dist/hub/pairing.d.ts +7 -2
- package/dist/hub/protocol.d.ts +47 -0
- package/dist/hub/protocol.js +3 -1
- package/dist/hub/protocol.js.map +1 -1
- package/dist/hub/server.js +15 -1
- package/dist/hub/server.js.map +1 -1
- package/dist/hub/types.d.ts +12 -4
- package/dist/hub-pairing-summary.js +1 -1
- package/dist/hub-pairing-summary.js.map +1 -1
- package/dist/instance-config-impact.js +4 -0
- package/dist/instance-config-impact.js.map +1 -1
- package/dist/instance-lifecycle.js +4 -0
- package/dist/instance-lifecycle.js.map +1 -1
- package/dist/locale.js +6 -2
- package/dist/locale.js.map +1 -1
- package/dist/log-service.d.ts +62 -6
- package/dist/log-service.js +135 -28
- package/dist/log-service.js.map +1 -1
- package/dist/log-steps-agy-grok.d.ts +74 -0
- package/dist/log-steps-agy-grok.js +440 -0
- package/dist/log-steps-agy-grok.js.map +1 -0
- package/dist/log-steps.d.ts +62 -3
- package/dist/log-steps.js +188 -22
- package/dist/log-steps.js.map +1 -1
- package/dist/log-transcript-paths.d.ts +29 -0
- package/dist/log-transcript-paths.js +109 -0
- package/dist/log-transcript-paths.js.map +1 -0
- package/dist/login-controller.d.ts +17 -3
- package/dist/login-controller.js +57 -5
- package/dist/login-controller.js.map +1 -1
- package/dist/login-window-lock.d.ts +20 -8
- package/dist/login-window-lock.js +35 -16
- package/dist/login-window-lock.js.map +1 -1
- package/dist/outbound-handlers.d.ts +14 -0
- package/dist/outbound-handlers.js +49 -1
- package/dist/outbound-handlers.js.map +1 -1
- package/dist/profile-signins.d.ts +2 -0
- package/dist/profile-signins.js +1 -1
- package/dist/profile-signins.js.map +1 -1
- package/dist/settings-api.d.ts +34 -0
- package/dist/settings-api.js +184 -6
- package/dist/settings-api.js.map +1 -1
- package/dist/settings-change.js +38 -1
- package/dist/settings-change.js.map +1 -1
- package/dist/settings-effect.js +14 -0
- package/dist/settings-effect.js.map +1 -1
- package/dist/tool-progress.d.ts +7 -0
- package/dist/tool-progress.js +21 -9
- package/dist/tool-progress.js.map +1 -1
- package/dist/types.d.ts +13 -0
- package/dist/ui/accounts-view.js +14 -4
- package/dist/ui/agent-details-settings.js +2 -2
- package/dist/ui/agent-page-strings.js +2 -2
- package/dist/ui/backend-signin.js +47 -14
- package/dist/ui/chat-activity-groups.js +225 -0
- package/dist/ui/chat-activity.js +355 -0
- package/dist/ui/chat-popout-header.js +35 -0
- package/dist/ui/chat-popout-transport.js +80 -0
- package/dist/ui/chat-popout.js +63 -0
- package/dist/ui/chat-quote.js +3 -1
- package/dist/ui/chat-store.js +45 -4
- package/dist/ui/chat-workspace-gestures.js +177 -0
- package/dist/ui/chat-workspace-navigation.js +34 -10
- package/dist/ui/chat-workspace.js +96 -32
- package/dist/ui/host-install.js +2 -2
- package/dist/ui/hub-agent-copy.js +7 -7
- package/dist/ui/hub-chat-strings.js +3 -3
- package/dist/ui/hub-client.js +77 -17
- package/dist/ui/hub-company-join-strings.js +12 -10
- package/dist/ui/hub-company-join.js +52 -39
- package/dist/ui/hub-confirm-place.js +44 -0
- package/dist/ui/hub-directory-editor-strings.js +3 -3
- package/dist/ui/hub-directory-notice-strings.js +1 -1
- package/dist/ui/hub-enrolment-code-strings.js +44 -0
- package/dist/ui/hub-enrolment-code.js +159 -0
- package/dist/ui/hub-group-search.js +82 -0
- package/dist/ui/hub-group-strings.js +8 -8
- package/dist/ui/hub-join-approval.js +31 -0
- package/dist/ui/hub-join-code-input.js +66 -0
- package/dist/ui/hub-join-queue.js +62 -0
- package/dist/ui/hub-join-steps.js +231 -0
- package/dist/ui/hub-joincode-flow-strings.js +22 -0
- package/dist/ui/hub-owner-strings.js +9 -9
- package/dist/ui/hub-pairing-progress-strings.js +1 -1
- package/dist/ui/hub-quick-pairing.js +8 -4
- package/dist/ui/hub-quick-strings.js +11 -11
- package/dist/ui/hub-share-refused.js +17 -0
- package/dist/ui/hub-strings.js +61 -61
- package/dist/ui/hub-this-hub.js +2 -2
- package/dist/ui/hub-welcome.js +26 -5
- package/dist/ui/image-annotate.js +283 -0
- package/dist/ui/image-lightbox.js +26 -6
- package/dist/ui/log-row.js +327 -0
- package/dist/ui/panel-chat.js +151 -12
- package/dist/ui/panel-details.js +14 -6
- package/dist/ui/panel-hub.js +42 -13
- package/dist/ui/panel-log.js +9 -154
- package/dist/ui/panel-settings.js +48 -11
- package/dist/ui/search-dialog.js +1 -0
- package/dist/ui/settings-access-overview.js +1 -1
- package/dist/ui/settings-hub-browser-certificate.js +3 -3
- package/dist/ui/settings-hub-company-join.js +41 -30
- package/dist/ui/settings-hub-connection.js +8 -5
- package/dist/ui/settings-hub-membership.js +3 -3
- package/dist/ui/settings-hub-section.js +1 -1
- package/dist/ui/settings-hub-setup-strings.js +6 -6
- package/dist/ui/settings-hub-setup.js +44 -6
- package/dist/ui/settings-hub.js +35 -10
- package/dist/ui/settings-layout.js +6 -4
- package/dist/ui/settings-public-session-strings.js +37 -0
- package/dist/ui/settings-registry.js +4 -0
- package/dist/ui/settings-strings.js +2 -2
- package/dist/ui/shared/app-shell.js +16 -10
- package/dist/ui/shared/app.css +195 -30
- package/dist/ui/shared/app.js +8 -1
- package/dist/ui/shared/chat-render.js +11 -2
- package/dist/ui/shared/chat-thread.js +20 -3
- package/dist/ui/shared/chat-work-bar.css +7 -0
- package/dist/ui/shared/chat-workspace-model.js +39 -9
- package/dist/ui/shared/hub-owner.css +8 -0
- package/dist/ui/shared/identity-color.js +9 -3
- package/dist/ui/shared/image-annotate.css +45 -0
- package/dist/ui/shared/instance-nav.js +59 -22
- package/dist/ui/shared/pane-geometry.js +29 -0
- package/dist/ui/shared/signin.js +2 -2
- package/dist/ui/shared/tokens.css +14 -0
- package/dist/ui/shared/ui-menu.js +22 -7
- package/dist/ui/signin.html +1 -1
- package/dist/ui/structured-signin.js +11 -4
- package/dist/web-api.d.ts +1 -0
- package/dist/web-api.js +34 -4
- package/dist/web-api.js.map +1 -1
- package/dist/web-backend-login.d.ts +9 -3
- package/dist/web-backend-login.js +7 -4
- package/dist/web-backend-login.js.map +1 -1
- package/dist/web-chat-history.d.ts +11 -0
- package/dist/web-chat-history.js +9 -1
- package/dist/web-chat-history.js.map +1 -1
- package/dist/web-guest-access.js +2 -2
- package/dist/web-guest-access.js.map +1 -1
- package/dist/web-session.d.ts +31 -3
- package/dist/web-session.js +25 -4
- package/dist/web-session.js.map +1 -1
- package/dist/web-settings-patch.d.ts +8 -2
- package/dist/web-settings-patch.js +22 -10
- package/dist/web-settings-patch.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { register, t } from "/assets/app-i18n.js";
|
|
2
|
+
import { he } from "./hub-enrolment-code-strings.js";
|
|
2
3
|
export const companyAdminStringsV1 = true;
|
|
3
4
|
register("companyJoin", {
|
|
4
5
|
en: {
|
|
5
6
|
title: "Connect to a Hub", lead: "Use your company account. A successful connection enables membership; no Agents are shared.",
|
|
6
7
|
address: "Hub address or company link", addressHint: "Use the company link from your Hub administrator, or the Hub's web address.",
|
|
7
|
-
fleetName: "Fleet name", defaultFleet: "My Fleet", start: "Sign in with company account", pending: "Waiting for
|
|
8
|
+
fleetName: "Fleet name", defaultFleet: "My Fleet", start: "Sign in with company account", pending: "Waiting for your confirmation…", loading: "Reading connection status…",
|
|
8
9
|
joining: "Connecting your Fleet…", awaiting: "Finish signing in on the Hub page.", saved: "Fleet connected", offline: "Connection saved. Waiting for the Hub link…",
|
|
9
10
|
stop: "Cancel connection", resume: "Recover this connection", retry: "Check again", held: "Connection needs attention", cancelled: "Connection cancelled",
|
|
10
11
|
unknown: "The result could not be verified. Check this same connection before starting another one.",
|
|
@@ -17,16 +18,16 @@ register("companyJoin", {
|
|
|
17
18
|
changed: "The Hub's identity is different. Connection stopped. Ask your Hub administrator for the new company link.",
|
|
18
19
|
separateHosts: "The Hub and this Fleet need different web hostnames to keep their sign-ins separate. Ask your administrator for a different address; changing only the port is not enough.",
|
|
19
20
|
repair: "Replace saved Hub identity", repairLead: "Paste a new company link you trust first. Replacing the saved identity needs a separate local authorization and does not connect a Fleet.",
|
|
20
|
-
incompatible: "This Hub does not offer company sign-in joining. Use
|
|
21
|
+
incompatible: "This Hub does not offer company sign-in joining. Use a pairing code under Other ways, or ask its administrator to enable company joining.",
|
|
21
22
|
unsaved: "The connection could not be saved completely. Recover this same connection; do not create another one.",
|
|
22
23
|
inspect: "Open Hub", issued: "A Fleet was created on the Hub. Its saved result is retained for inspection or revoke.",
|
|
23
24
|
signInConnect: "Sign in and connect Fleet", connectAs: "Connect as {0}", request: "Connect {0}", origin: "Fleet address", return: "Return to Fleet Settings",
|
|
24
25
|
approved: "Company sign-in accepted. Your Fleet is completing the connection…", done: "Your Fleet has connected. Return to its Settings to share Agents when you choose.",
|
|
25
26
|
fleetDone: "Your Fleet is connected. You can now choose which Agents to share below.",
|
|
26
|
-
inviteTitle: "
|
|
27
|
+
inviteTitle: "Individual invitations", inviteLead: "For an eligible person without group permission. Issuing this invitation is your approval; it is bound to that person and this Hub.", inviteLogin: "Company sign-in name", inviteCreate: "Create invitation", inviteCopy: "Copy invitation",
|
|
27
28
|
manualApproved: "Approved by your Hub administrator.", adminTitle: "Company sign-in joining", adminLead: "People allowed by Group permissions can connect their own Fleets. No approval is needed for each Fleet.",
|
|
28
29
|
enabled: "Allow company-account Fleet connections", companyLink: "Company link", copy: "Copy company link", copied: "Copied", copyFailed: "Copy failed. Select and copy the link.",
|
|
29
|
-
accessTitle: "Allowed groups and people", accessLead: "Choose allowed AD groups, or
|
|
30
|
+
accessTitle: "Allowed groups and people", accessLead: "Choose allowed AD groups, or send an eligible person an individual invitation to connect a Fleet.", groupOpen: "Manage group permissions", colleagueCopy: "Copy link with key fingerprint", colleagueHint: "This link carries the Hub address and its pinned identity. Colleagues paste it into their Fleet’s Settings → Hub.", linkDetails: "Connection link contents", offHint: "Turn on company-account Fleet connections before copying a connection link or creating an invitation.", inviteScope: "This invitation approves one Fleet connection. It does not grant permission to chat with or share Agents.",
|
|
30
31
|
firstUse: "On first use, this Fleet saves the Hub's identity. Use a company link you received from your administrator.",
|
|
31
32
|
linkLead: "Open your Fleet's Settings → Hub and paste this company link. If you know its web address, open those Settings below. This page does not connect a Fleet or ask for your company password.",
|
|
32
33
|
fleetAddress: "Fleet web address", openFleet: "Open Fleet Settings", invalidLink: "This company link is incomplete. Ask your Hub administrator for a new link.",
|
|
@@ -35,8 +36,8 @@ register("companyJoin", {
|
|
|
35
36
|
"zh-TW": {
|
|
36
37
|
title: "連接 Hub", lead: "使用公司帳號登入,連接成功後會啟用成員功能,不會分享任何 Agent。",
|
|
37
38
|
address: "Hub 位址或公司連結", addressHint: "貼上 Hub 管理員提供的公司連結,或輸入 Hub 網址。",
|
|
38
|
-
fleetName: "Fleet 名稱", defaultFleet: "我的 Fleet", start: "以公司帳號登入", pending: "
|
|
39
|
-
joining: "正在連接 Fleet…", awaiting: "請在 Hub 頁面完成公司帳號登入。", saved: "Fleet 已連接", offline: "
|
|
39
|
+
fleetName: "Fleet 名稱", defaultFleet: "我的 Fleet", start: "以公司帳號登入", pending: "等待你的確認…", loading: "正在讀取連接狀態…",
|
|
40
|
+
joining: "正在連接 Fleet…", awaiting: "請在 Hub 頁面完成公司帳號登入。", saved: "Fleet 已連接", offline: "連接資料已儲存,正在等待與 Hub 的網路連線…",
|
|
40
41
|
stop: "取消連接", resume: "恢復這次連接", retry: "再次檢查", held: "連接需要處理", cancelled: "已取消連接",
|
|
41
42
|
unknown: "目前無法確認結果。請先檢查這次連接,不要另開一次連接。",
|
|
42
43
|
expired: "這次連接請求已過期。若 Hub 已建立 Fleet,請先到 Hub 檢查或撤銷該 Fleet,再重新連接。",
|
|
@@ -48,16 +49,16 @@ register("companyJoin", {
|
|
|
48
49
|
changed: "Hub 的身分與先前不同,已停止連接。請向 Hub 管理員取得新的公司連結。",
|
|
49
50
|
separateHosts: "Hub 與這個 Fleet 必須使用不同的網頁主機名稱,才能分開登入。請向管理員取得不同的位址;只更換連接埠仍不安全。",
|
|
50
51
|
repair: "更換已儲存的 Hub 身分", repairLead: "請先貼上你信任的新公司連結。更換已儲存的身分需另行取得本機授權,不會連接 Fleet。",
|
|
51
|
-
incompatible: "這個 Hub
|
|
52
|
-
unsaved: "
|
|
52
|
+
incompatible: "這個 Hub 尚未提供公司帳號連接。請改用「其他方式」裡的配對碼,或洽管理員啟用公司帳號連接。",
|
|
53
|
+
unsaved: "連接資料尚未完整儲存。請恢復這次連接,不要另開一次連接。",
|
|
53
54
|
inspect: "開啟 Hub", issued: "Hub 已建立 Fleet,會保留這次結果供你檢查或撤銷。",
|
|
54
55
|
signInConnect: "登入並連接 Fleet", connectAs: "以 {0} 的身分連接", request: "連接 {0}", origin: "Fleet 位址", return: "返回 Fleet 設定",
|
|
55
56
|
approved: "公司帳號已確認,Fleet 正在完成連接…", done: "Fleet 已連接。返回 Fleet 設定後,可自行選擇要分享的 Agent。",
|
|
56
57
|
fleetDone: "Fleet 已連接,你可以在下方選擇要分享的 Agent。",
|
|
57
|
-
inviteTitle: "
|
|
58
|
+
inviteTitle: "個別邀請", inviteLead: "提供給尚無群組權限的合格人員。發出邀請即代表你的核准,邀請只限該人員與這個 Hub 使用。", inviteLogin: "公司登入名稱", inviteCreate: "建立邀請", inviteCopy: "複製邀請",
|
|
58
59
|
manualApproved: "由 Hub 管理員核准。", adminTitle: "公司帳號連接", adminLead: "群組權限允許的人員可連接自己的 Fleet,不需逐一核准。",
|
|
59
60
|
enabled: "允許以公司帳號連接 Fleet", companyLink: "公司連結", copy: "複製公司連結", copied: "已複製", copyFailed: "複製失敗,請選取並複製連結。",
|
|
60
|
-
accessTitle: "允許的群組與人員", accessLead: "設定允許的 AD
|
|
61
|
+
accessTitle: "允許的群組與人員", accessLead: "設定允許的 AD 群組,或為合格人員發出連接 Fleet 的個別邀請。", groupOpen: "管理群組權限", colleagueCopy: "複製含金鑰指紋的連結", colleagueHint: "連結包含 Hub 位址與固定的身分指紋;請同仁貼到自己 Fleet 的「設定 → Hub」。", linkDetails: "連接連結內容", offHint: "請先開啟公司帳號連接,才能複製連結或建立邀請。", inviteScope: "邀請只核准一次 Fleet 連接,不會授予 Agent 對話或分享權限。",
|
|
61
62
|
firstUse: "首次連接時,這個 Fleet 會記住 Hub 的身分。請使用管理員提供的公司連結。",
|
|
62
63
|
linkLead: "請開啟你的 Fleet「設定 → Hub」,貼上這個公司連結。若知道 Fleet 網頁位址,也可在下方開啟設定。這個頁面不會連接 Fleet,也不會要求公司密碼。",
|
|
63
64
|
fleetAddress: "Fleet 網頁位址", openFleet: "開啟 Fleet 設定", invalidLink: "這個公司連結不完整,請向 Hub 管理員取得新連結。",
|
|
@@ -71,6 +72,7 @@ export function joinResponseCode(result) {
|
|
|
71
72
|
return match ? match[1] : result?.body?.error;
|
|
72
73
|
}
|
|
73
74
|
export function joinError(code) {
|
|
75
|
+
if (code === "code-ended") return he("codeEnded");
|
|
74
76
|
return hj(code === "separate-hostnames" ? "separateHosts" : code === "identity-changed" ? "changed" : code === "denied" ? "denied" : code === "limit-reached" ? "limit"
|
|
75
77
|
: code === "authority" || code === "revoked" ? "authority" : code === "confirmation-required" ? "confirmationRequired" : code === "expired" ? "expired" : code === "incompatible" ? "incompatible"
|
|
76
78
|
: code === "backpressure" ? "busy" : code === "cancelled" ? "cancelled" : code === "unsaved" ? "unsaved" : "unknown");
|
|
@@ -4,7 +4,11 @@ import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
|
4
4
|
import { Skeleton, ErrorState } from "/assets/ui-states.js";
|
|
5
5
|
import { hubClient } from "./hub-client.js";
|
|
6
6
|
import { hj, joinError } from "./hub-company-join-strings.js";
|
|
7
|
+
import { useJoinApproval } from "./hub-join-approval.js";
|
|
8
|
+
import { queueMessage } from "./hub-joincode-flow-strings.js";
|
|
9
|
+
import { he } from "./hub-enrolment-code-strings.js";
|
|
7
10
|
import * as entryWords from "./hub-company-join-strings.js";
|
|
11
|
+
import { HubJoinCard } from "./hub-join-steps.js";
|
|
8
12
|
// M-2921 (spec 1.1): the Hub tab's own words for closing itself and for E13 (its own namespace: a cached older
|
|
9
13
|
// company-join dictionary must not leave a key showing).
|
|
10
14
|
register("hubJoinOne", {
|
|
@@ -13,7 +17,12 @@ register("hubJoinOne", {
|
|
|
13
17
|
"zh-TW": { closing: "已連接。可以關閉這個分頁。", offerPending: "你有另一個用配對碼的連接還沒完成。請先在 Hub 完成或停止它。" },
|
|
14
18
|
});
|
|
15
19
|
const hj1 = key => t(`hubJoinOne.${key}`);
|
|
16
|
-
const approveError =
|
|
20
|
+
const approveError = result => {
|
|
21
|
+
const code = typeof result === "string" ? result : result?.code;
|
|
22
|
+
if (code === "denied" && result?.reason === "code-scope") return he("scopeDenied");
|
|
23
|
+
if (code === "denied" && result?.reason === "code-ended") return he("codeEnded");
|
|
24
|
+
return code === "offer-pending" ? hj1("offerPending") : joinError(code);
|
|
25
|
+
};
|
|
17
26
|
export function joinRequest() {
|
|
18
27
|
try { const id = new URLSearchParams(location.search).get("join"); return /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/.test(id || "") ? id : null; }
|
|
19
28
|
catch { return null; }
|
|
@@ -43,43 +52,47 @@ export function CompanyJoinInfoPage() {
|
|
|
43
52
|
${error ? html`<p class="err" role="alert">${error}</p>` : null}
|
|
44
53
|
</section></div></div>`;
|
|
45
54
|
}
|
|
46
|
-
async function call(path, method = "GET", body, csrf) {
|
|
55
|
+
async function call(path, method = "GET", body, csrf, signal) {
|
|
47
56
|
try {
|
|
48
57
|
const res = await fetch(path, { method, credentials: "same-origin", cache: "no-store", headers: { Accept: "application/json",
|
|
49
|
-
...(body ? { "Content-Type": "application/json" } : {}), ...(csrf ? { "X-AgEnD-Hub-CSRF": csrf } : {}) }, ...(body ? { body: JSON.stringify(body) } : {}) });
|
|
58
|
+
...(body ? { "Content-Type": "application/json" } : {}), ...(csrf ? { "X-AgEnD-Hub-CSRF": csrf } : {}) }, ...(body ? { body: JSON.stringify(body) } : {}), ...(signal ? { signal } : {}) });
|
|
50
59
|
const json = await res.json(); return { ...json, ok: res.ok };
|
|
51
60
|
} catch { return { ok: false, code: "unavailable" }; }
|
|
52
61
|
}
|
|
53
|
-
export const approveCompanyJoin = (requestId, csrf) => call("/hub/v1/join/approve", "POST", { requestId }, csrf);
|
|
62
|
+
export const approveCompanyJoin = (requestId, csrf, signal) => call("/hub/v1/join/approve", "POST", { requestId }, csrf, signal);
|
|
54
63
|
export function useCompanyJoinContext() {
|
|
55
|
-
const requestId = joinRequest(), [
|
|
64
|
+
const requestId = joinRequest(), [saved, set] = useState({ requestId, view: requestId ? undefined : null }), [attempt, retry] = useState(0);
|
|
56
65
|
useEffect(() => {
|
|
57
|
-
if (!requestId) { set(null); return; }
|
|
66
|
+
if (!requestId) { set({ requestId, view: null }); return; }
|
|
58
67
|
let current = true, timer;
|
|
59
68
|
const read = async () => {
|
|
60
69
|
const r = await call("/hub/v1/join/browser?request=" + encodeURIComponent(requestId));
|
|
61
|
-
if (!current) return; set(r);
|
|
70
|
+
if (!current || joinRequest() !== requestId) return; set({ requestId, view: r });
|
|
62
71
|
if (r.ok && Date.now() < r.outerDeadline && (["pending", "identity-approved", "issued"].includes(r.state) || r.state === "acknowledged" && !r.connected)) timer = setTimeout(read, 1500);
|
|
63
72
|
};
|
|
64
73
|
read(); return () => { current = false; clearTimeout(timer); };
|
|
65
74
|
}, [requestId, attempt]);
|
|
66
|
-
return { requestId, view, retry: () => retry(n => n + 1) };
|
|
75
|
+
return { requestId, view: saved.requestId === requestId ? saved.view : undefined, retry: () => retry(n => n + 1) };
|
|
67
76
|
}
|
|
68
77
|
export function CompanyJoinLead({ context }) {
|
|
69
78
|
return html`<p class="hub-signin-lead">${context?.label ? hj("request", context.label) : hj("lead")}</p>
|
|
70
79
|
${context?.fleetOrigin ? html`<p class="note">${hj("origin")}: <span class="hub-origin"><code>${context.fleetOrigin}</code></span></p>` : null}`;
|
|
71
80
|
}
|
|
72
81
|
export function HubCompanyJoinPage({ session }) {
|
|
73
|
-
const { requestId, view, retry } = useCompanyJoinContext(), [error, setError] = useState(() => session.companyJoinFailure?.requestId === joinRequest() ?
|
|
74
|
-
|
|
82
|
+
const { requestId, view, retry } = useCompanyJoinContext(), [error, setError] = useState(() => session.companyJoinFailure?.requestId === joinRequest() ? approveError(session.companyJoinFailure) : null), [busy, setBusy] = useState(false), gen = useRef(0);
|
|
83
|
+
const [failure, setFailure] = useState(() => session.companyJoinFailure?.requestId === joinRequest() ? session.companyJoinFailure : null);
|
|
84
|
+
const approval = useJoinApproval({ requestId, deadline: view?.outerDeadline, sessionKey: session.csrf, approve: approveCompanyJoin, current: () => joinRequest() === requestId });
|
|
85
|
+
useEffect(() => { setBusy(false); setError(session.companyJoinFailure?.requestId === requestId ? approveError(session.companyJoinFailure) : null); setFailure(session.companyJoinFailure?.requestId === requestId ? session.companyJoinFailure : null);
|
|
86
|
+
return () => { gen.current++; }; }, [requestId, session.csrf]);
|
|
75
87
|
const connect = async () => {
|
|
76
88
|
if (busy || !view?.ok || view.state !== "pending") return;
|
|
77
|
-
const token = ++gen.current; setBusy(true); setError(null);
|
|
78
|
-
const r = await
|
|
79
|
-
if (gen.current !== token) return;
|
|
80
|
-
setBusy(false); if (!r.ok) setError(approveError(r
|
|
89
|
+
const token = ++gen.current; setBusy(true); setError(null); setFailure(null);
|
|
90
|
+
const r = await approval.run(session.csrf);
|
|
91
|
+
if (gen.current !== token || r.code === "retired") return;
|
|
92
|
+
setBusy(false); if (!r.ok) { setError(approveError(r)); setFailure(r); } retry();
|
|
81
93
|
};
|
|
82
94
|
const terminal = view?.ok && !["pending", "identity-approved", "issued"].includes(view.state);
|
|
95
|
+
const codeFailure = failure?.code === "denied" && ["code-scope", "code-ended"].includes(failure.reason);
|
|
83
96
|
// Connected: say so, close this tab; a tab the browser keeps open (one it did not open by script) offers the way back after 300 ms.
|
|
84
97
|
const done = view?.ok && view.state === "acknowledged" && view.connected === true, [stayed, setStayed] = useState(false);
|
|
85
98
|
useEffect(() => {
|
|
@@ -95,60 +108,60 @@ export function HubCompanyJoinPage({ session }) {
|
|
|
95
108
|
return html`<div class="col hub-owner"><div class="s-section-layout"><section class="card hub-company-join">
|
|
96
109
|
${view === undefined ? html`<${Skeleton} variant="form" lines=${3} label=${hj("loading")} />` : null}
|
|
97
110
|
${view?.ok ? html`<${CompanyJoinLead} context=${view} />
|
|
98
|
-
${view.state === "pending" ? !error ? html`<div class="field-row"><button class="btn btn-primary" type="button" disabled=${busy} onClick=${connect}>${hj("connectAs", session.displayName || session.login)}</button></div>` : null : html`<p role="status">${view.state === "acknowledged" ? hj(view.connected ? "done" : "offline") : terminal ? joinError(view.reason || view.state) : hj("approved")}</p>`}
|
|
111
|
+
${view.state === "pending" ? !error ? html`<div class="field-row"><button class="btn btn-primary" type="button" disabled=${busy} onClick=${connect}>${hj("connectAs", session.displayName || session.login)}</button></div>` : null : terminal && !view.issued && codeFailure && error ? null : html`<p role="status">${view.state === "acknowledged" ? hj(view.connected ? "done" : "offline") : terminal ? joinError(view.reason || view.state) : hj("approved")}</p>`}
|
|
99
112
|
${view.issued && terminal && view.state !== "acknowledged" ? html`<p class="note">${hj("issued")}</p>` : null}
|
|
100
113
|
${view.returnPath ? html`<div class="field-row"><a class="btn btn-sm" href=${view.returnPath} rel="noreferrer">${hj("return")}</a></div>` : null}` : view ? html`<${ErrorState} message=${joinError(view.code)} onRetry=${retry} />` : null}
|
|
101
|
-
${
|
|
114
|
+
${approval.queued ? html`<p class="note" role="status">${queueMessage(approval.retryAttempt)}</p>` : null}
|
|
115
|
+
${error ? html`<${ErrorState} message=${error} onRetry=${failure?.code === "backpressure" ? connect : () => { if (!codeFailure) setError(null); retry(); }} />` : null}
|
|
102
116
|
</section></div></div>`;
|
|
103
117
|
}
|
|
104
118
|
register("companyJoin", {
|
|
105
119
|
en: { "guide.title": "How colleagues connect", "guide.one": "Copy the colleague connection link here.", "guide.two": "In their Fleet’s Settings → Hub, paste the link and choose {0}.", "guide.three": "Sign in on the Hub and choose Sign in and connect Fleet. Allowed groups need no further approval." },
|
|
106
|
-
"zh-TW": { "guide.title": "同仁如何連接", "guide.one": "
|
|
120
|
+
"zh-TW": { "guide.title": "同仁如何連接", "guide.one": "在這裡複製含金鑰指紋的連結。", "guide.two": "在自己的 Fleet「設定 → Hub」貼上連結,按「{0}」。", "guide.three": "在 Hub 登入並按「登入並連接 Fleet」。允許的群組不需要另外核准。" },
|
|
107
121
|
});
|
|
108
122
|
const guide = (key, ...args) => t(`companyJoin.guide.${key}`, ...args);
|
|
109
123
|
export const companyJoinAdminEntryV1 = entryWords.companyAdminStringsV1 === true;
|
|
110
124
|
export function CompanyJoinAdminCard({ entry = false, groups = false } = {}) {
|
|
111
125
|
const [view, setView] = useState(null), [error, setError] = useState(null), [busy, setBusy] = useState(false), [copied, setCopied] = useState(false);
|
|
112
|
-
const live = useRef(true), csrf = useRef(null);
|
|
126
|
+
const live = useRef(true), csrf = useRef(null), readEpoch = useRef(0);
|
|
113
127
|
const [inviteLogin, setInviteLogin] = useState(""), [invitation, setInvitation] = useState(null);
|
|
114
|
-
const [invitationCopied, setInvitationCopied] = useState(false);
|
|
128
|
+
const [invitationCopied, setInvitationCopied] = useState(false), [features, setFeatures] = useState([]);
|
|
115
129
|
const read = async () => {
|
|
116
|
-
const
|
|
117
|
-
|
|
130
|
+
const mine = ++readEpoch.current, client = hubClient();
|
|
131
|
+
const current = () => live.current && mine === readEpoch.current && hubClient() === client;
|
|
132
|
+
const session = await client.session();
|
|
133
|
+
if (!current()) return;
|
|
118
134
|
if (!session.ok || !session.admin) { setError(hj("denied")); return; }
|
|
119
|
-
csrf.current = session.csrf;
|
|
120
|
-
|
|
135
|
+
csrf.current = session.csrf; setFeatures(Array.isArray(session.features) ? session.features : []);
|
|
136
|
+
// A retained client lacks the queued read; keep its existing route as the compatibility fallback.
|
|
137
|
+
const r = await (typeof client.companyJoinSettings === "function" ? client.companyJoinSettings() : call("/hub/v1/admin/company-join")); if (!current()) return;
|
|
121
138
|
if (r.ok) { setView(r); setError(null); } else setError(joinError(r.code));
|
|
122
139
|
};
|
|
123
|
-
useEffect(() => {
|
|
140
|
+
useEffect(() => {
|
|
141
|
+
live.current = true;
|
|
142
|
+
const off = hubClient().onSignedOut?.(() => { live.current = false; readEpoch.current++; setView(null); setFeatures([]); setError(hj("denied")); });
|
|
143
|
+
read(); return () => { live.current = false; readEpoch.current++; off?.(); };
|
|
144
|
+
}, []);
|
|
124
145
|
const change = async enabled => {
|
|
125
|
-
if (busy || !view) return; setBusy(true); setError(null);
|
|
146
|
+
if (!live.current || busy || !view) return; readEpoch.current++; setBusy(true); setError(null);
|
|
126
147
|
const r = await call("/hub/v1/admin/company-join", "PUT", { enabled, expectedRevision: view.revision }, csrf.current);
|
|
127
148
|
if (!live.current) return;
|
|
128
149
|
setBusy(false); if (r.ok) setView(r); else setError(joinError(r.code));
|
|
129
150
|
};
|
|
130
151
|
const makeInvitation = async e => {
|
|
131
|
-
e.preventDefault(); if (busy || !inviteLogin.trim()) return; setBusy(true); setError(null);
|
|
152
|
+
e.preventDefault(); if (!live.current || busy || !inviteLogin.trim()) return; setBusy(true); setError(null);
|
|
132
153
|
const r = await call("/hub/v1/admin/company-join/invitations", "POST", { login: inviteLogin.trim() }, csrf.current);
|
|
133
154
|
if (!live.current) return; setBusy(false);
|
|
134
155
|
if (r.ok) { setInvitation(r.url); setInvitationCopied(false); } else setError(joinError(r.code === "not-found" ? "denied" : r.code));
|
|
135
156
|
};
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
<button type="button" class="btn" disabled=${!view?.enabled || !view?.companyLink || busy || !!error} aria-describedby="hubColleagueLinkHint" onClick=${async () => { try { await navigator.clipboard.writeText(view.companyLink); if (live.current) setCopied(true); } catch { if (live.current) setError(hj("copyFailed")); } }}>${hj(copied ? "copied" : "colleagueCopy")}</button></div>
|
|
140
|
-
<div class="form hub-company-guide"><h4>${guide("title")}</h4><ol class="note"><li>${guide("one")}</li><li>${guide("two", hj("start"))}</li><li>${guide("three")}</li></ol></div>
|
|
141
|
-
<p class="note" id="hubColleagueLinkHint">${hj(view ? view.enabled ? "colleagueHint" : "offHint" : "loading")}</p>
|
|
142
|
-
${!view && !error ? html`<${Skeleton} variant="form" lines=${3} />` : null}
|
|
143
|
-
${error ? html`<${ErrorState} message=${error} onRetry=${read} />` : null}
|
|
144
|
-
${view ? html`<label class="check"><input type="checkbox" role="switch" class="s-ui-toggle" checked=${view.enabled} disabled=${busy || !!error} onChange=${e => change(e.target.checked)} /><span>${hj("enabled")}</span></label>
|
|
145
|
-
${view.companyLink && view.enabled ? html`<details class="s-ui-disclosure"><summary>${hj("linkDetails")}</summary><div class="s-disclosure-body"><label class="field"><span>${hj("companyLink")}</span><textarea rows="4" readonly value=${view.companyLink} /></label></div></details>` : null}` : null}
|
|
146
|
-
${view?.enabled ? html`<div class="form hub-admin-individual"><h4>${hj("inviteTitle")}</h4><p class="note">${hj("inviteLead")} ${hj("inviteScope")}</p>
|
|
157
|
+
// Hub UX U2 (spec 1.2): the 「讓同仁加入」 card — three steps; individual invitations stay, folded, under it.
|
|
158
|
+
if (entry) return html`<${HubJoinCard} view=${view} busy=${busy} error=${error} onToggle=${change} onRetry=${read} groups=${groups} features=${features}>
|
|
159
|
+
${view?.enabled ? html`<details class="s-ui-disclosure hub-admin-individual"><summary>${hj("inviteTitle")}</summary><div class="s-disclosure-body"><p class="note">${hj("inviteLead")} ${hj("inviteScope")}</p>
|
|
147
160
|
<form class="form" onSubmit=${makeInvitation}><label class="field"><span>${hj("inviteLogin")}</span><input autocomplete="off" value=${inviteLogin} onInput=${e => setInviteLogin(e.target.value)} /></label>
|
|
148
161
|
<div class="field-row"><button class="btn btn-sm" type="submit" disabled=${busy || !!error || !inviteLogin.trim()}>${hj("inviteCreate")}</button></div></form>
|
|
149
162
|
${invitation ? html`<label class="field"><span>${hj("inviteTitle")}</span><textarea rows="4" readonly value=${invitation} /></label>
|
|
150
|
-
<button type="button" class="btn btn-sm" onClick=${async () => { try { await navigator.clipboard.writeText(invitation); if (live.current) setInvitationCopied(true); } catch { if (live.current) setError(hj("copyFailed")); } }}>${hj(invitationCopied ? "copied" : "inviteCopy")}</button>` : null}</div>` : null}
|
|
151
|
-
|
|
163
|
+
<button type="button" class="btn btn-sm" onClick=${async () => { try { await navigator.clipboard.writeText(invitation); if (live.current) setInvitationCopied(true); } catch { if (live.current) setError(hj("copyFailed")); } }}>${hj(invitationCopied ? "copied" : "inviteCopy")}</button>` : null}</div></details>` : null}
|
|
164
|
+
</${HubJoinCard}>`;
|
|
152
165
|
return html`<section class="card hub-company-join"><h3>${hj("adminTitle")}</h3><p class="note">${hj("adminLead")}</p>
|
|
153
166
|
${!view && !error ? html`<${Skeleton} variant="form" lines=${3} />` : null}
|
|
154
167
|
${error ? html`<${ErrorState} message=${error} onRetry=${read} />` : null}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// M-2988 (Lumen's Hub story board, findings 8 and 9): where a Hub step that waits for the Settings confirmation is confirmed,
|
|
2
|
+
// in the words of that place. A card posted to a General names its chat app; every other way (no chat app connected, a card
|
|
3
|
+
// still being sent, the inline card, the authenticator code, Apply now) is the confirm card on this page. Read from the
|
|
4
|
+
// pending request's live view (appStore.pendingChanges / hubJoinChanges, kept current by settings-confirm.js), so the hint
|
|
5
|
+
// follows the request when its card moves from "sending" to General or to the host. Its own module and namespace: a tab
|
|
6
|
+
// that still holds an older hub-strings dictionary gets these words too (upgrade skew).
|
|
7
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
8
|
+
|
|
9
|
+
register("hubConfirmPlace", {
|
|
10
|
+
en: {
|
|
11
|
+
shareChat: "Sent for confirmation: press Confirm on the card in General on {0} to share it.",
|
|
12
|
+
shareCard: "Sent for confirmation: finish it on the confirm card at the top of this page to share it.",
|
|
13
|
+
joinChat: "First press Confirm on the card in General on {0}, so AgEnD knows it's really you connecting this Fleet. The Hub sign-in opens after that.",
|
|
14
|
+
joinCard: "First confirm on the confirm card that it's really you connecting this Fleet. The Hub sign-in opens after that.",
|
|
15
|
+
},
|
|
16
|
+
"zh-TW": {
|
|
17
|
+
shareChat: "已送出確認:請到 {0} 的 General,在確認卡上按「確認」,才會分享。",
|
|
18
|
+
shareCard: "已送出確認:請在上方的確認卡完成,才會分享。",
|
|
19
|
+
joinChat: "請先到 {0} 的 General,在確認卡上按「確認」,確定是你本人要連接這個 Fleet;之後才會開啟 Hub 登入。",
|
|
20
|
+
joinCard: "請先在確認卡上確認是你本人要連接這個 Fleet;之後才會開啟 Hub 登入。",
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const PLATFORM_NAMES = { discord: "Discord", telegram: "Telegram" };
|
|
25
|
+
|
|
26
|
+
/** The chat apps whose General holds this request's card ("Discord", "Discord (team-b)"), or null when no General has it. */
|
|
27
|
+
export function confirmChat(view) {
|
|
28
|
+
const c = view && view.confirmation;
|
|
29
|
+
if (!c || c.kind !== "chat") return null;
|
|
30
|
+
const names = (Array.isArray(c.where) ? c.where : []).map((w) => `${PLATFORM_NAMES[w.platform] || w.platform}${w.connection && w.connection !== w.platform ? ` (${w.connection})` : ""}`);
|
|
31
|
+
return names.length ? [...new Set(names)].join(" / ") : null;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The pending request's live view by id, from the shell's lists. */
|
|
35
|
+
export function pendingView(state, id) {
|
|
36
|
+
if (!id || !state) return null;
|
|
37
|
+
return [...(state.pendingChanges || []), ...(state.hubJoinChanges || [])].find((v) => v && v.id === id) || null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** "share" (an agent's Share switch) or "join" (a company Hub connection): the one sentence for where to confirm it. */
|
|
41
|
+
export function confirmPlace(kind, view) {
|
|
42
|
+
const chat = confirmChat(view);
|
|
43
|
+
return chat ? t(`hubConfirmPlace.${kind}Chat`, chat) : t(`hubConfirmPlace.${kind}Card`);
|
|
44
|
+
}
|
|
@@ -26,7 +26,7 @@ register("hubDirectoryEditor", {
|
|
|
26
26
|
unsaved: "Not saved", fetchingHint: "Inspecting the certificate sends no LDAP password. Confirm its fingerprint before fetching the CA.",
|
|
27
27
|
},
|
|
28
28
|
"zh-TW": {
|
|
29
|
-
scope: "這個 Hub", title: "AD 連線", lead: "變更這個 Hub
|
|
29
|
+
scope: "這個 Hub", title: "AD 連線", lead: "變更這個 Hub 與目錄的網路連線方式。管理員身分與領域維持不變。",
|
|
30
30
|
hostLead: "即使 Hub 或 AD 離線,也能在此編輯目錄連線。儲存後,原本停止的 Hub 仍保持停止。",
|
|
31
31
|
open: "編輯 AD 連線", back: "管理", realm: "領域", profile: "目錄類型", url: "LDAPS 伺服器網址", baseDn: "搜尋基底 DN", bindDn: "服務帳號 DN",
|
|
32
32
|
typeAd: "Active Directory(AD)", typeLdap: "LDAP 目錄", passwordSet: "已設定(留空則不變更)",
|
|
@@ -37,9 +37,9 @@ register("hubDirectoryEditor", {
|
|
|
37
37
|
login: "你的 AD 登入名稱", password: "你的 AD 密碼", reauth: "儲存時確認身分", reauthHint: "你的密碼只會交由目前信任的目錄驗證,絕不傳送至新伺服器。",
|
|
38
38
|
save: "儲存", test: "測試連線", reload: "重新讀取目前設定", stop: "取消", trustTitle: "確認 AD 連線信任", server: "要信任的伺服器", leaf: "伺服器憑證指紋(SHA-256)", caPrint: "CA 指紋(SHA-256)",
|
|
39
39
|
trustHint: "請向目錄管理員核對這些指紋。若不相符,請取消。",
|
|
40
|
-
fetchConfirm: "指紋相符,擷取 CA", fetchAuth: "使用服務帳號擷取 CA", fetchAuthHint: "目錄拒絕匿名擷取 CA
|
|
40
|
+
fetchConfirm: "指紋相符,擷取 CA", fetchAuth: "使用服務帳號擷取 CA", fetchAuthHint: "目錄拒絕匿名擷取 CA。只會透過已確認並鎖定指紋的網路連線,傳送下方的服務帳號。",
|
|
41
41
|
confirmSave: "確認指紋並儲存", confirmTest: "確認指紋並測試", fetching: "正在檢查已鎖定的伺服器…", saving: "正在儲存並檢查新設定…", testing: "正在測試連線…",
|
|
42
|
-
tested: "
|
|
42
|
+
tested: "測試連線通過,尚未儲存。", saved: "已儲存 AD 連線。", restored: "新的目錄連線無法啟動,已還原先前設定。請重新讀取,確認目前狀態。",
|
|
43
43
|
uncertain: "無法確認是否已儲存。請先重新讀取目前設定,再決定下一步;不要重複儲存。",
|
|
44
44
|
conflict: "沒有新設定可儲存,或此頁面已過期。請重新讀取目前設定。",
|
|
45
45
|
invalid: "請檢查伺服器網址、搜尋欄位、CA 憑證與密碼。", denied: "此工作階段無法變更 AD 連線。請重新登入,或使用這部電腦自己的設定頁面。",
|
|
@@ -13,7 +13,7 @@ register("directoryNotices", {
|
|
|
13
13
|
uncertain: "We couldn't confirm the acknowledgment. Refresh to check before trying again.",
|
|
14
14
|
},
|
|
15
15
|
"zh-TW": {
|
|
16
|
-
pageLead: "Hub 登入與 Fleet
|
|
16
|
+
pageLead: "Hub 登入與 Fleet 連接的安全通知。", title: "AD 連線變更", lead: "Hub 登入設定變更的安全通知。通知代表已記錄變更,不代表目前的網路連線正常。",
|
|
17
17
|
hostLead: "供這台電腦的擁有者查看。你的確認與各 Hub 收件者的確認分開記錄。",
|
|
18
18
|
changed: "已記錄 AD 連線變更", restored: "已記錄 AD 連線還原", host: "由主機擁有者變更", admin: "由 Hub 管理員變更",
|
|
19
19
|
server: "伺服器", ca: "憑證信任", search: "搜尋設定", "service-account": "服務帳號", secret: "服務密碼", query: "目錄查詢",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { register, t } from "/assets/app-i18n.js";
|
|
2
|
+
register("enrolmentCode", {
|
|
3
|
+
en: {
|
|
4
|
+
create: "Create join code", expires: "Valid until", hour: "In 1 hour", today: "End of today", week: "In 7 days",
|
|
5
|
+
max: "Maximum Fleets", scope: "Who can use it", directory: "Anyone in the company directory", group: "One company group",
|
|
6
|
+
more: "More", perPerson: "Fleets per person", groupLabel: "Company group", dn: "Group distinguished name (DN)",
|
|
7
|
+
resolve: "Find group", useDn: "Use the group's distinguished name", choose: "Choose a company group before creating the code.", resolved: "Selected group: {0}",
|
|
8
|
+
scopeFailed: "The group could not be verified. Choose it again.", remove: "Choose another group", cancel: "Cancel",
|
|
9
|
+
lead: "A company account is still required. This code allows a Fleet connection; it does not allow asking or sharing Agents.",
|
|
10
|
+
handoff: "In AgEnD Settings → Hub, enter {0} and this code.", used: "Connected {0} / {1}", pending: "{0} connections in progress",
|
|
11
|
+
until: "Valid until {0}", recent: "Recent connections", empty: "No join codes", emptyHint: "Create a code to connect Fleets with company accounts.",
|
|
12
|
+
live: "Active", expired: "Expired", exhausted: "Used up", revoked: "Ended", end: "End this code now",
|
|
13
|
+
copy: "Copy", copied: "Copied", copyFailed: "Copy failed. Select and copy the text.",
|
|
14
|
+
capacity: "Only {0} Fleet spaces remain on this Hub. This code allows up to {1} connections; extra connections will be refused.",
|
|
15
|
+
loadFailed: "Join codes could not be read. Check again before creating another code.",
|
|
16
|
+
createFailed: "The result could not be verified. Check the code list before creating another code.",
|
|
17
|
+
endFailed: "The result could not be verified. Check this code again.", ended: "The code has ended. Fleets already connected are unchanged.",
|
|
18
|
+
limited: "The Hub is busy. Try again shortly.", denied: "Only the configured Hub administrator can manage join codes.",
|
|
19
|
+
queued: "Many people are connecting at once. Waiting in the queue…",
|
|
20
|
+
scopeDenied: "You are outside the scope of this join code.", codeEnded: "This join code is no longer valid or has been used up.",
|
|
21
|
+
byCode: "Approved with a join code by your Hub administrator.",
|
|
22
|
+
},
|
|
23
|
+
"zh-TW": {
|
|
24
|
+
create: "建立加入碼", expires: "有效到", hour: "1 小時後", today: "今天結束", week: "7 天後",
|
|
25
|
+
max: "最多幾台", scope: "誰可以用", directory: "公司目錄中的任何人", group: "一個公司群組",
|
|
26
|
+
more: "更多", perPerson: "每人最多幾台", groupLabel: "公司群組", dn: "群組完整名稱(DN)",
|
|
27
|
+
resolve: "查找群組", useDn: "使用群組完整名稱(DN)", choose: "請先選擇公司群組,再建立加入碼。", resolved: "已選擇群組:{0}",
|
|
28
|
+
scopeFailed: "無法確認這個群組,請重新選擇。", remove: "改選群組", cancel: "取消",
|
|
29
|
+
lead: "仍須以公司帳號登入。加入碼只允許連接 Fleet,不會授予 Agent 提問或分享權限。",
|
|
30
|
+
handoff: "在 AgEnD「設定 → Hub」輸入 {0} 和這組碼。", used: "已加入 {0} / {1}", pending: "{0} 台正在連接",
|
|
31
|
+
until: "有效到 {0}", recent: "最近的連接", empty: "尚無加入碼", emptyHint: "建立加入碼,讓同仁以公司帳號連接 Fleet。",
|
|
32
|
+
live: "使用中", expired: "已過期", exhausted: "已用完", revoked: "已停用", end: "立即停用這組碼",
|
|
33
|
+
copy: "複製", copied: "已複製", copyFailed: "複製失敗,請選取文字後複製。",
|
|
34
|
+
capacity: "Hub 尚可連接 {0} 台 Fleet。這組碼最多允許 {1} 台,超出的連接會被拒絕。",
|
|
35
|
+
loadFailed: "無法讀取加入碼。請先再次檢查,再建立另一組碼。",
|
|
36
|
+
createFailed: "目前無法確認結果。請先檢查加入碼清單,再建立另一組碼。",
|
|
37
|
+
endFailed: "目前無法確認結果,請再次檢查這組碼。", ended: "加入碼已停用,已連接的 Fleet 不受影響。",
|
|
38
|
+
limited: "Hub 目前忙碌,請稍後再試。", denied: "只有指定的 Hub 管理員可以管理加入碼。",
|
|
39
|
+
queued: "目前很多人同時加入,正在排隊…",
|
|
40
|
+
scopeDenied: "你不在這組加入碼允許的範圍。", codeEnded: "加入碼已失效或已用完。",
|
|
41
|
+
byCode: "由 Hub 管理員透過加入碼核准。",
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
export const he = (key, ...args) => t(`enrolmentCode.${key}`, ...args);
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
/** U2 slot only. Codes stay in this mounted view; every action uses the current same-origin Hub session. */
|
|
2
|
+
import { html, useEffect, useRef, useState } from "/assets/app-html.js";
|
|
3
|
+
import { Dialog } from "/assets/ui-dialog.js";
|
|
4
|
+
import { Empty, ErrorState, Skeleton } from "/assets/ui-states.js";
|
|
5
|
+
import { hubClient } from "./hub-client.js";
|
|
6
|
+
import { he } from "./hub-enrolment-code-strings.js";
|
|
7
|
+
import { jf } from "./hub-joincode-flow-strings.js";
|
|
8
|
+
export const enrolmentCodeV1 = true;
|
|
9
|
+
const time = value => new Date(value).toLocaleString();
|
|
10
|
+
const supported = client => client?.enrolmentCodeV1 === true && ["enrolmentCodes", "createEnrolmentCode", "revokeEnrolmentCode"].every(key => typeof client[key] === "function");
|
|
11
|
+
const integer = (value, max) => Number.isSafeInteger(Number(value)) && Number(value) >= 1 && Number(value) <= max;
|
|
12
|
+
const errorText = (result, fallback) => result?.code === "backpressure" && result.reason === "live-code-limit" ? jf("liveLimit")
|
|
13
|
+
: result?.code === "backpressure" && result.reason === "hourly-code-limit" ? jf("hourlyLimit")
|
|
14
|
+
: he(result?.code === "backpressure" ? "limited" : result?.status === 403 ? "denied" : fallback);
|
|
15
|
+
|
|
16
|
+
function CreateCode({ client, busy, enabled, onCreate, onClose }) {
|
|
17
|
+
const [expires, setExpires] = useState("today"), [max, setMax] = useState("30"), [perPerson, setPerPerson] = useState("1");
|
|
18
|
+
const [scope, setScope] = useState("directory"), [group, setGroup] = useState(null), [dn, setDn] = useState("");
|
|
19
|
+
const [picker, setPicker] = useState(null), [resolving, setResolving] = useState(false), [error, setError] = useState(null);
|
|
20
|
+
const live = useRef(true), epoch = useRef(0), reading = useRef(false), allowed = useRef(enabled);
|
|
21
|
+
allowed.current = enabled;
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
live.current = true;
|
|
24
|
+
// An older U2 has no search module. The existing exact-DN resolver remains a safe fallback.
|
|
25
|
+
void import("./hub-group-search.js").then(m => { if (live.current && m.groupSearchV1 === true && m.groupSearchIdV1 === true && typeof m.GroupSearch === "function") setPicker({ component: m.GroupSearch }); }, () => {});
|
|
26
|
+
return () => { live.current = false; epoch.current++; };
|
|
27
|
+
}, []);
|
|
28
|
+
const resolve = async hit => {
|
|
29
|
+
if (reading.current || busy || !allowed.current || typeof client.resolveGroup !== "function") return;
|
|
30
|
+
const name = typeof hit?.dn === "string" ? hit.dn : dn.trim(); if (!name) return;
|
|
31
|
+
reading.current = true; const mine = ++epoch.current; setResolving(true); setError(null); setGroup(null);
|
|
32
|
+
let r; try { r = await client.resolveGroup(name); } catch { r = { ok: false }; }
|
|
33
|
+
if (!live.current || mine !== epoch.current) return;
|
|
34
|
+
reading.current = false; setResolving(false);
|
|
35
|
+
if (!allowed.current || !r.ok || typeof r.realm !== "string" || typeof r.objectId !== "string" || typeof r.dn !== "string"
|
|
36
|
+
|| hit?.objectId && hit.objectId.toLowerCase() !== r.objectId.toLowerCase()) { setError(he("scopeFailed")); return; }
|
|
37
|
+
setGroup({ kind: "group", realm: r.realm, objectId: r.objectId, dn: r.dn });
|
|
38
|
+
};
|
|
39
|
+
const chooseScope = value => { epoch.current++; reading.current = false; setResolving(false); setScope(value); setGroup(null); setError(null); };
|
|
40
|
+
const valid = enabled && !busy && !resolving && integer(max, 200) && integer(perPerson, 8) && (scope === "directory" || group);
|
|
41
|
+
const submit = event => { event.preventDefault(); if (!valid) return;
|
|
42
|
+
onCreate({ expires, maxUses: Number(max), perPersonFleets: Number(perPerson), scope: scope === "directory" ? { kind: "directory" } : group });
|
|
43
|
+
};
|
|
44
|
+
return html`<${Dialog} title=${he("create")} onClose=${onClose} busy=${busy} actions=${html`
|
|
45
|
+
<button type="button" class="btn" disabled=${busy} onClick=${onClose}>${he("cancel")}</button>
|
|
46
|
+
<button type="submit" form="hubEnrolmentCreate" class="btn btn-primary" disabled=${!valid}>${he("create")}</button>`}>
|
|
47
|
+
<form id="hubEnrolmentCreate" class="form" onSubmit=${submit}>
|
|
48
|
+
<p class="note">${he("lead")}</p>
|
|
49
|
+
<label class="field" for="hubCodeExpires"><span>${he("expires")}</span><select id="hubCodeExpires" disabled=${busy} value=${expires} onChange=${e => setExpires(e.target.value)}>
|
|
50
|
+
<option value="1h">${he("hour")}</option><option value="today">${he("today")}</option><option value="7d">${he("week")}</option></select></label>
|
|
51
|
+
<label class="field" for="hubCodeMax"><span>${he("max")}</span><input id="hubCodeMax" type="number" inputmode="numeric" min="1" max="200" step="1" required value=${max} disabled=${busy} onInput=${e => setMax(e.target.value)} /></label>
|
|
52
|
+
<label class="field" for="hubCodeScope"><span>${he("scope")}</span><select id="hubCodeScope" value=${scope} disabled=${busy || resolving} onChange=${e => chooseScope(e.target.value)}>
|
|
53
|
+
<option value="directory">${he("directory")}</option><option value="group">${he("group")}</option></select></label>
|
|
54
|
+
${scope === "group" ? group ? html`<p class="note hub-fp-full">${he("resolved", group.dn)}</p><div class="n-actions"><button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => setGroup(null)}>${he("remove")}</button></div>`
|
|
55
|
+
: html`${picker ? html`<${picker.component} id="hubEnrolmentScopeSearch" client=${client} disabled=${busy || resolving || !enabled} label=${he("groupLabel")} onPick=${resolve} onUnsupported=${() => setPicker(null)} />
|
|
56
|
+
<div class="n-actions"><button type="button" class="btn btn-sm" disabled=${busy || resolving || !enabled} onClick=${() => setPicker(null)}>${he("useDn")}</button></div>`
|
|
57
|
+
: html`<label class="field" for="hubCodeGroupDn"><span>${he("dn")}</span><input id="hubCodeGroupDn" maxLength="4096" value=${dn} disabled=${busy || resolving} onInput=${e => setDn(e.target.value)} /></label>
|
|
58
|
+
<div class="n-actions"><button type="button" class="btn btn-sm" disabled=${busy || resolving || !dn.trim() || !enabled} onClick=${() => resolve(null)}>${he("resolve")}</button></div>`}
|
|
59
|
+
<p class="note" role="status">${he("choose")}</p>` : null}
|
|
60
|
+
<details><summary>${he("more")}</summary><label class="field" for="hubCodePerPerson"><span>${he("perPerson")}</span><input id="hubCodePerPerson" type="number" inputmode="numeric" min="1" max="8" step="1" required value=${perPerson} disabled=${busy} onInput=${e => setPerPerson(e.target.value)} /></label></details>
|
|
61
|
+
${error ? html`<${ErrorState} message=${error} />` : null}
|
|
62
|
+
</form>
|
|
63
|
+
</${Dialog}>`;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function HubEnrolmentCode({ client = hubClient(), enabled = false, host = "", onChanged = () => {} }) {
|
|
67
|
+
const root = useRef(null), live = useRef(false), epoch = useRef(0), writing = useRef(false), reading = useRef(null), refresh = useRef(null), owner = useRef(client);
|
|
68
|
+
owner.current = client;
|
|
69
|
+
const [data, setData] = useState(null), [loading, setLoading] = useState(true), [error, setError] = useState(null);
|
|
70
|
+
const [open, setOpen] = useState(false), [busy, setBusy] = useState(false), [copied, setCopied] = useState(null), [capacity, setCapacity] = useState(null), [notice, setNotice] = useState(null);
|
|
71
|
+
const [ending, setEnding] = useState(null), [success, setSuccess] = useState(null);
|
|
72
|
+
const usable = supported(client), current = mine => live.current && owner.current === client && epoch.current === mine;
|
|
73
|
+
const read = async () => {
|
|
74
|
+
if (!live.current || writing.current || reading.current) return;
|
|
75
|
+
const mine = epoch.current, ticket = {}; reading.current = ticket;
|
|
76
|
+
let r; try { r = await client.enrolmentCodes(); } catch { r = { ok: false }; }
|
|
77
|
+
if (reading.current === ticket) reading.current = null;
|
|
78
|
+
if (!current(mine) || writing.current) return;
|
|
79
|
+
setLoading(false);
|
|
80
|
+
if (r.ok && Array.isArray(r.codes)) { setData({ client, codes: r.codes }); setError(null); return true; }
|
|
81
|
+
else { if (r.code !== "backpressure") setData(null); setError(errorText(r, "loadFailed")); }
|
|
82
|
+
};
|
|
83
|
+
refresh.current = read;
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
live.current = usable; epoch.current++; writing.current = false; reading.current = null;
|
|
86
|
+
setData(null); setError(null); setNotice(null); setSuccess(null); setEnding(null); setLoading(true); setOpen(false); setBusy(false); setCapacity(null); setCopied(null);
|
|
87
|
+
if (!usable) return undefined;
|
|
88
|
+
let timer = null, visible = true, polling = false;
|
|
89
|
+
const tick = async () => {
|
|
90
|
+
if (polling) return;
|
|
91
|
+
clearTimeout(timer);
|
|
92
|
+
if (!live.current) return;
|
|
93
|
+
polling = true;
|
|
94
|
+
if (visible && document.visibilityState !== "hidden") await refresh.current();
|
|
95
|
+
polling = false;
|
|
96
|
+
if (live.current) timer = setTimeout(tick, 5000);
|
|
97
|
+
};
|
|
98
|
+
const observer = typeof IntersectionObserver === "function" ? new IntersectionObserver(entries => {
|
|
99
|
+
visible = entries.some(entry => entry.isIntersecting); if (visible) void tick();
|
|
100
|
+
}) : null;
|
|
101
|
+
if (root.current) observer?.observe(root.current);
|
|
102
|
+
const visibility = () => { if (document.visibilityState !== "hidden") void tick(); };
|
|
103
|
+
document.addEventListener("visibilitychange", visibility);
|
|
104
|
+
const off = client.onSignedOut?.(() => { live.current = false; epoch.current++; clearTimeout(timer); setData(null); setOpen(false); setEnding(null); setSuccess(null); setLoading(false); setBusy(false); setError(he("denied")); });
|
|
105
|
+
void tick();
|
|
106
|
+
return () => { live.current = false; epoch.current++; clearTimeout(timer); observer?.disconnect(); document.removeEventListener("visibilitychange", visibility); off?.(); };
|
|
107
|
+
}, [client, usable]);
|
|
108
|
+
const mutate = async (kind, input) => {
|
|
109
|
+
if (!live.current || owner.current !== client || writing.current || kind === "create" && !enabled) return;
|
|
110
|
+
writing.current = true; reading.current = null; const mine = ++epoch.current; setBusy(true); setError(null); setNotice(null); setSuccess(null); setCopied(null);
|
|
111
|
+
let r; try { r = await (kind === "create" ? client.createEnrolmentCode(input) : client.revokeEnrolmentCode(input)); } catch { r = { ok: false }; }
|
|
112
|
+
if (!current(mine)) return;
|
|
113
|
+
writing.current = false; setBusy(false); setOpen(false); setEnding(null);
|
|
114
|
+
if (r.ok) {
|
|
115
|
+
setOpen(false); if (kind === "create" && Number.isInteger(r.freeFleetRows) && input.maxUses > r.freeFleetRows) setCapacity({ free: r.freeFleetRows, max: input.maxUses });
|
|
116
|
+
if (kind === "revoke") setSuccess(he("ended"));
|
|
117
|
+
try { onChanged(); } catch { /* U2 owns its projection refresh. */ }
|
|
118
|
+
} else setNotice(errorText(r, kind === "create" ? "createFailed" : "endFailed"));
|
|
119
|
+
// Never repeat an uncertain write automatically. Inspect the authoritative list instead.
|
|
120
|
+
await read();
|
|
121
|
+
};
|
|
122
|
+
const copy = async row => {
|
|
123
|
+
const mine = epoch.current;
|
|
124
|
+
try { await navigator.clipboard.writeText(`${he("handoff", host)}\n${row.code}`); if (current(mine)) setCopied(row.id); }
|
|
125
|
+
catch { if (current(mine)) setCopied("failed"); }
|
|
126
|
+
};
|
|
127
|
+
if (!usable) return null;
|
|
128
|
+
const rows = data?.client === client ? data.codes : [];
|
|
129
|
+
const endingRow = ending?.client === client ? rows.find(row => row.id === ending.id && row.state === "live") : null;
|
|
130
|
+
const joining = endingRow && Number.isSafeInteger(endingRow.inFlight) && endingRow.inFlight >= 0 ? endingRow.inFlight : 0;
|
|
131
|
+
const names = Array.isArray(endingRow?.inFlightLabels) ? endingRow.inFlightLabels.filter(name => typeof name === "string").slice(0, 3) : [];
|
|
132
|
+
return html`<div ref=${root} data-enrolment-codes="v1">
|
|
133
|
+
<div class="n-actions"><button type="button" class="btn btn-primary" disabled=${!enabled || busy || open || !!endingRow || loading || !!error || !!notice} onClick=${() => setOpen(true)}>${he("create")}</button></div>
|
|
134
|
+
${error ? html`<${ErrorState} message=${error} onRetry=${read} />` : null}
|
|
135
|
+
${notice ? html`<${ErrorState} message=${notice} onRetry=${async () => { if (await read()) setNotice(null); }} />` : null}
|
|
136
|
+
${success ? html`<p class="note" role="status">${success}</p>` : null}
|
|
137
|
+
${capacity ? html`<p class="note" role="status">${he("capacity", capacity.free, capacity.max)}</p>` : null}
|
|
138
|
+
${loading ? html`<${Skeleton} variant="rows" lines=${2} />` : !rows.length && !error ? html`<${Empty} title=${he("empty")} hint=${he("emptyHint")} />` : null}
|
|
139
|
+
${rows.map(row => html`<section key=${row.id} data-enrolment-code=${row.id}>
|
|
140
|
+
<p><span class="tag">${he(["live", "expired", "exhausted", "revoked"].includes(row.state) ? row.state : "expired")}</span> <span>${he("used", row.uses, row.maxUses)}</span></p>
|
|
141
|
+
${row.state === "live" && row.code ? html`<code class="hub-fp-groups">${row.code}</code><p class="note hub-fp-full">${he("handoff", host)}</p>` : null}
|
|
142
|
+
<p class="note hub-fp-full">${he("scope")}: ${row.scope?.kind === "group" ? row.scope.dn : he("directory")} · ${he("perPerson")} ${row.perPersonFleets}</p>
|
|
143
|
+
<p class="note">${he("until", time(row.expiresAt))}${row.inFlight ? html` · ${he("pending", row.inFlight)}` : null}</p>
|
|
144
|
+
<div class="n-actions">${row.state === "live" && row.code ? html`<button type="button" class="btn btn-sm" disabled=${busy} onClick=${() => copy(row)}>${he(copied === row.id ? "copied" : "copy")}</button>
|
|
145
|
+
<button type="button" class="btn btn-sm btn-danger" disabled=${busy || !!endingRow} onClick=${() => setEnding({ client, id: row.id })}>${he("end")}</button>` : null}</div>
|
|
146
|
+
${row.recent?.length ? html`<details><summary>${he("recent")}</summary><ul>${row.recent.slice(0, 50).map((use, index) => html`<li key=${index}>${use.label} · ${use.owner?.name || use.owner?.login || ""} · ${time(use.at)}</li>`)}</ul></details>` : null}
|
|
147
|
+
</section>`)}
|
|
148
|
+
${copied === "failed" ? html`<p class="note" role="status">${he("copyFailed")}</p>` : null}
|
|
149
|
+
${open ? html`<${CreateCode} client=${client} busy=${busy} enabled=${enabled} onCreate=${input => mutate("create", input)} onClose=${() => { if (!writing.current) setOpen(false); }} />` : null}
|
|
150
|
+
${endingRow ? html`<${Dialog} title=${jf("endTitle")} busy=${busy} onClose=${() => { if (!writing.current) setEnding(null); }} actions=${html`
|
|
151
|
+
<button type="button" class="btn" disabled=${busy} onClick=${() => setEnding(null)}>${he("cancel")}</button>
|
|
152
|
+
<button type="button" class="btn btn-danger" disabled=${busy} onClick=${() => mutate("revoke", endingRow.id)}>${he("end")}</button>`}>
|
|
153
|
+
<p><code>${endingRow.code}</code></p><p>${jf("endConfirm")}</p><p>${jf("endPending", joining)}</p>
|
|
154
|
+
${names.length ? html`<p class="note">${jf("endNames")}</p><ul>${names.map((name, index) => html`<li key=${index} class="hub-exposure-name">${name}</li>`)}</ul>
|
|
155
|
+
${joining > names.length ? html`<p class="note">${jf("endOthers", joining - names.length)}</p>` : null}` : null}
|
|
156
|
+
<p>${jf("endUnchanged")}</p>
|
|
157
|
+
</${Dialog}>` : null}
|
|
158
|
+
</div>`;
|
|
159
|
+
}
|