@celljs/ta-web 4.15.2 → 4.17.0
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.en.md +1 -1
- package/README.md +1 -1
- package/esm/browser/assistant/assistant-ask-book.d.ts +35 -0
- package/esm/browser/assistant/assistant-ask-book.js +96 -0
- package/esm/browser/assistant/assistant-conversation.d.ts +110 -0
- package/esm/browser/assistant/assistant-conversation.js +351 -0
- package/esm/browser/assistant/assistant-export.js +6 -7
- package/esm/browser/assistant/assistant-extension.d.ts +3 -2
- package/esm/browser/assistant/assistant-extension.js +57 -4
- package/esm/browser/assistant/assistant-protocol.d.ts +17 -2
- package/esm/browser/assistant/assistant-role.d.ts +22 -4
- package/esm/browser/assistant/assistant-role.js +29 -7
- package/esm/browser/assistant/assistant-state.d.ts +5 -1
- package/esm/browser/assistant/assistant-state.js +11 -0
- package/esm/browser/assistant/assistant-task-source.js +7 -1
- package/esm/browser/assistant/assistant-task-util.d.ts +19 -7
- package/esm/browser/assistant/assistant-task-util.js +73 -20
- package/esm/browser/assistant/assistant-tasks.d.ts +0 -7
- package/esm/browser/assistant/assistant-tasks.js +0 -2
- package/esm/browser/assistant/assistant-thread.d.ts +22 -0
- package/esm/browser/assistant/assistant-thread.js +108 -0
- package/esm/browser/assistant/assistant-view.js +77 -126
- package/esm/browser/assistant/assistant.d.ts +33 -105
- package/esm/browser/assistant/assistant.js +103 -356
- package/esm/browser/assistant/chat-task-source.d.ts +58 -0
- package/esm/browser/assistant/chat-task-source.js +107 -0
- package/esm/browser/assistant/read-aloud.d.ts +34 -0
- package/esm/browser/assistant/read-aloud.js +98 -0
- package/esm/browser/assistant/realtime-voice.d.ts +77 -0
- package/esm/browser/assistant/realtime-voice.js +320 -0
- package/esm/browser/assistant/task-views.d.ts +2 -3
- package/esm/browser/assistant/task-views.js +20 -16
- package/esm/browser/assistant/voice-call-bar.d.ts +60 -0
- package/esm/browser/assistant/voice-call-bar.js +260 -0
- package/esm/browser/assistant/voice-call.d.ts +175 -0
- package/esm/browser/assistant/voice-call.js +366 -0
- package/esm/browser/chat/chat-shown.d.ts +78 -0
- package/esm/browser/chat/chat-shown.js +262 -0
- package/esm/browser/chat/chat-view.js +2 -1
- package/esm/browser/chat/chat.d.ts +4 -68
- package/esm/browser/chat/chat.js +5 -253
- package/esm/browser/chat/draft-model.d.ts +1 -1
- package/esm/browser/components/access-view.js +1 -1
- package/esm/browser/components/account-menu.js +1 -1
- package/esm/browser/components/app-nav.d.ts +3 -1
- package/esm/browser/components/app-nav.js +7 -7
- package/esm/browser/components/app-shell-hooks.d.ts +11 -2
- package/esm/browser/components/app-shell-hooks.js +25 -4
- package/esm/browser/components/app-shell-state.d.ts +80 -0
- package/esm/browser/components/app-shell-state.js +466 -0
- package/esm/browser/components/app-view.js +128 -334
- package/esm/browser/components/asks-badge.d.ts +6 -2
- package/esm/browser/components/asks-badge.js +7 -3
- package/esm/browser/components/auth-pictures.d.ts +2 -2
- package/esm/browser/components/auth-pictures.js +13 -1
- package/esm/browser/components/auth-view.d.ts +4 -3
- package/esm/browser/components/auth-view.js +54 -5
- package/esm/browser/components/chat-asks.d.ts +2 -0
- package/esm/browser/components/chat-asks.js +8 -0
- package/esm/browser/components/chat-busy.d.ts +32 -0
- package/esm/browser/components/chat-busy.js +49 -0
- package/esm/browser/components/chat-icon.d.ts +6 -0
- package/esm/browser/components/chat-icon.js +17 -1
- package/esm/browser/components/chat-list-row.d.ts +84 -0
- package/esm/browser/components/chat-list-row.js +198 -0
- package/esm/browser/components/chat-list-util.d.ts +166 -0
- package/esm/browser/components/chat-list-util.js +335 -0
- package/esm/browser/components/chat-list.d.ts +11 -148
- package/esm/browser/components/chat-list.js +280 -511
- package/esm/browser/components/chat-seen.d.ts +7 -0
- package/esm/browser/components/chat-seen.js +58 -10
- package/esm/browser/components/composer-addon-util.d.ts +1 -1
- package/esm/browser/components/composer-addons.d.ts +1 -1
- package/esm/browser/components/composer-attachments.d.ts +11 -0
- package/esm/browser/components/composer-attachments.js +27 -0
- package/esm/browser/components/composer-box-hooks.d.ts +9 -0
- package/esm/browser/components/composer-box-hooks.js +138 -0
- package/esm/browser/components/composer-box-protocol.d.ts +108 -0
- package/esm/browser/components/composer-box-protocol.js +2 -0
- package/esm/browser/components/composer-box.d.ts +1 -95
- package/esm/browser/components/composer-box.js +49 -156
- package/esm/browser/components/composer-target.d.ts +21 -0
- package/esm/browser/components/composer-target.js +43 -0
- package/esm/browser/components/composer.d.ts +7 -1
- package/esm/browser/components/composer.js +13 -9
- package/esm/browser/components/context-menu.js +4 -0
- package/esm/browser/components/conversation-find.d.ts +27 -0
- package/esm/browser/components/conversation-find.js +151 -0
- package/esm/browser/components/conversation-scroll-hooks.js +2 -1
- package/esm/browser/components/conversation-scroll-util.d.ts +73 -0
- package/esm/browser/components/conversation-scroll-util.js +80 -0
- package/esm/browser/components/conversation-scroll.d.ts +1 -35
- package/esm/browser/components/conversation-scroll.js +2 -81
- package/esm/browser/components/conversation-view.d.ts +8 -0
- package/esm/browser/components/conversation-view.js +41 -0
- package/esm/browser/components/discover-view.d.ts +3 -2
- package/esm/browser/components/discover-view.js +31 -26
- package/esm/browser/components/dismiss.js +2 -0
- package/esm/browser/components/earlier-messages.d.ts +2 -0
- package/esm/browser/components/earlier-messages.js +2 -1
- package/esm/browser/components/environment-view.js +50 -1
- package/esm/browser/components/folder-picker.d.ts +7 -0
- package/esm/browser/components/folder-picker.js +90 -20
- package/esm/browser/components/gallery.d.ts +1 -1
- package/esm/browser/components/gallery.js +57 -14
- package/esm/browser/components/host-tag.js +2 -2
- package/esm/browser/components/host-view.d.ts +1 -1
- package/esm/browser/components/host-view.js +3 -1
- package/esm/browser/components/image-menu.d.ts +11 -0
- package/esm/browser/components/image-menu.js +29 -0
- package/esm/browser/components/image-viewer.d.ts +3 -2
- package/esm/browser/components/image-viewer.js +29 -4
- package/esm/browser/components/lightbox.js +2 -0
- package/esm/browser/components/link-dialog.js +2 -0
- package/esm/browser/components/list-rows.d.ts +3 -1
- package/esm/browser/components/list-rows.js +2 -1
- package/esm/browser/components/markdown.js +5 -0
- package/esm/browser/components/media.d.ts +2 -0
- package/esm/browser/components/media.js +16 -1
- package/esm/browser/components/message-actions.d.ts +1 -1
- package/esm/browser/components/message-actions.js +9 -0
- package/esm/browser/components/message-footer.d.ts +3 -1
- package/esm/browser/components/message-footer.js +3 -2
- package/esm/browser/components/message-images.d.ts +41 -0
- package/esm/browser/components/message-images.js +120 -0
- package/esm/browser/components/message-list.d.ts +4 -100
- package/esm/browser/components/message-list.js +10 -447
- package/esm/browser/components/message-menu.js +4 -0
- package/esm/browser/components/message-steps.d.ts +21 -0
- package/esm/browser/components/message-steps.js +182 -0
- package/esm/browser/components/message-user.d.ts +54 -0
- package/esm/browser/components/message-user.js +169 -0
- package/esm/browser/components/model-picker.d.ts +1 -1
- package/esm/browser/components/model-picker.js +2 -0
- package/esm/browser/components/moved-notice.d.ts +14 -0
- package/esm/browser/components/moved-notice.js +60 -0
- package/esm/browser/components/nav-places.d.ts +12 -1
- package/esm/browser/components/nav-places.js +10 -2
- package/esm/browser/components/notice-center.js +36 -1
- package/esm/browser/components/notice-face.js +2 -1
- package/esm/browser/components/phone-shell.d.ts +4 -3
- package/esm/browser/components/phone-shell.js +60 -68
- package/esm/browser/components/plus-menu.d.ts +1 -1
- package/esm/browser/components/relay-services.d.ts +6 -1
- package/esm/browser/components/relay-services.js +109 -2
- package/esm/browser/components/relay-view.js +2 -0
- package/esm/browser/components/remote-hosts.d.ts +10 -0
- package/esm/browser/components/remote-hosts.js +67 -5
- package/esm/browser/components/remote-prompts.js +2 -0
- package/esm/browser/components/scan-screen.js +7 -0
- package/esm/browser/components/screen-navigator-util.d.ts +28 -0
- package/esm/browser/components/screen-navigator-util.js +33 -0
- package/esm/browser/components/screen-navigator.d.ts +30 -0
- package/esm/browser/components/screen-navigator.js +47 -0
- package/esm/browser/components/session-settings.d.ts +1 -1
- package/esm/browser/components/session-view.js +157 -7
- package/esm/browser/components/settings-choices.d.ts +6 -0
- package/esm/browser/components/settings-choices.js +8 -0
- package/esm/browser/components/settings-more.d.ts +7 -0
- package/esm/browser/components/settings-more.js +263 -0
- package/esm/browser/components/settings-parts.d.ts +8 -3
- package/esm/browser/components/settings-parts.js +31 -249
- package/esm/browser/components/settings-view.js +43 -15
- package/esm/browser/components/stop-times.js +1 -0
- package/esm/browser/components/surface-flyout.js +2 -0
- package/esm/browser/components/unseen-drop.d.ts +10 -4
- package/esm/browser/components/unseen-drop.js +9 -8
- package/esm/browser/components/use-seen-chats.js +1 -1
- package/esm/browser/components/voice-services.d.ts +6 -0
- package/esm/browser/components/voice-services.js +137 -0
- package/esm/browser/components/voice-talk.d.ts +23 -6
- package/esm/browser/components/voice-talk.js +46 -11
- package/esm/browser/components/web-composer.d.ts +1 -1
- package/esm/browser/components/web-composer.js +2 -2
- package/esm/browser/components/web-dialog.js +2 -0
- package/esm/browser/device/back-stack.d.ts +89 -11
- package/esm/browser/device/back-stack.js +200 -29
- package/esm/browser/device/device-protocol.d.ts +1 -1
- package/esm/browser/device/device-protocol.js +1 -1
- package/esm/browser/device/own-gestures.d.ts +1 -1
- package/esm/browser/device/pull-down.js +3 -1
- package/esm/browser/device/row-swipe.js +3 -1
- package/esm/browser/device/sheet-swipe.d.ts +1 -179
- package/esm/browser/device/sheet-swipe.js +3 -433
- package/esm/browser/device/swipe-finger.d.ts +31 -0
- package/esm/browser/device/swipe-finger.js +83 -0
- package/esm/browser/device/swipe-settle.d.ts +52 -0
- package/esm/browser/device/swipe-settle.js +170 -0
- package/esm/browser/device/swipe-util.d.ts +97 -0
- package/esm/browser/device/swipe-util.js +183 -0
- package/esm/browser/drafts/drafts-protocol.d.ts +58 -0
- package/esm/browser/drafts/drafts-protocol.js +75 -0
- package/esm/browser/drafts/drafts.d.ts +21 -0
- package/esm/browser/drafts/drafts.js +91 -0
- package/esm/browser/drafts/use-composer-draft.d.ts +20 -0
- package/esm/browser/drafts/use-composer-draft.js +108 -0
- package/esm/browser/extension/icons.js +25 -4
- package/esm/browser/extension/web-api-components.d.ts +13 -0
- package/esm/browser/extension/web-api-contributions.d.ts +125 -0
- package/esm/browser/extension/web-extension-api.d.ts +88 -5
- package/esm/browser/extension/web-extension-context.d.ts +5 -0
- package/esm/browser/extension/web-extension-context.js +60 -7
- package/esm/browser/extension/web-extension-protocol.d.ts +19 -1
- package/esm/browser/extension/web-extension-protocol.js +3 -0
- package/esm/browser/extension/web-extension-run.d.ts +5 -2
- package/esm/browser/extension/web-extension-run.js +13 -1
- package/esm/browser/extension/web-extensions-running.d.ts +93 -0
- package/esm/browser/extension/web-extensions-running.js +339 -0
- package/esm/browser/extension/web-extensions.d.ts +6 -82
- package/esm/browser/extension/web-extensions.js +10 -319
- package/esm/browser/extension/web-pages.js +1 -0
- package/esm/browser/extension/web-session-notices.js +6 -1
- package/esm/browser/extension/web-tasks.d.ts +2 -0
- package/esm/browser/extension/web-tasks.js +6 -0
- package/esm/browser/extension/web-view-util.d.ts +2 -1
- package/esm/browser/extension/web-view-util.js +4 -1
- package/esm/browser/gateway/console-parts.d.ts +4 -12
- package/esm/browser/gateway/console-parts.js +42 -125
- package/esm/browser/gateway/console-tenant.js +3 -2
- package/esm/browser/gateway/console-trend.d.ts +11 -0
- package/esm/browser/gateway/console-trend.js +115 -0
- package/esm/browser/gateway/console-util.js +2 -2
- package/esm/browser/gateway/console-view.js +49 -3
- package/esm/browser/i18n/locales.d.ts +170 -6
- package/esm/browser/i18n/messages-ja.js +171 -7
- package/esm/browser/i18n/messages-zh-tw.js +171 -7
- package/esm/browser/i18n/messages.d.ts +167 -3
- package/esm/browser/i18n/messages.js +342 -14
- package/esm/browser/index.d.ts +17 -0
- package/esm/browser/index.js +17 -0
- package/esm/browser/notices/notices-protocol.d.ts +12 -0
- package/esm/browser/notices/notices.js +7 -4
- package/esm/browser/offline/device-values.d.ts +2 -0
- package/esm/browser/offline/device-values.js +6 -1
- package/esm/browser/screen/page-answers.d.ts +42 -0
- package/esm/browser/screen/page-answers.js +89 -0
- package/esm/browser/screen/screen-protocol.d.ts +112 -0
- package/esm/browser/screen/screen-protocol.js +45 -0
- package/esm/browser/screen/screen.d.ts +20 -0
- package/esm/browser/screen/screen.js +122 -0
- package/esm/browser/screen/use-screen-part.d.ts +6 -0
- package/esm/browser/screen/use-screen-part.js +14 -0
- package/esm/browser/settings/settings-protocol.d.ts +5 -1
- package/esm/browser/settings/settings-protocol.js +6 -2
- package/esm/browser/share/shared-extensions.d.ts +29 -0
- package/esm/browser/share/shared-extensions.js +145 -0
- package/esm/browser/share/shared-link.d.ts +11 -0
- package/esm/browser/share/shared-link.js +38 -0
- package/esm/browser/share/shared-page.d.ts +5 -0
- package/esm/browser/share/shared-page.js +137 -0
- package/esm/browser/state/state-protocol.d.ts +14 -0
- package/esm/browser/state/state-protocol.js +18 -0
- package/esm/browser/state/state.d.ts +10 -2
- package/esm/browser/state/state.js +19 -3
- package/esm/browser/style/base.d.ts +1 -1
- package/esm/browser/style/base.js +4 -0
- package/esm/browser/style/chat-list.d.ts +2 -0
- package/esm/browser/style/chat-list.js +153 -0
- package/esm/browser/style/conversation-column.d.ts +2 -0
- package/esm/browser/style/conversation-column.js +250 -0
- package/esm/browser/style/conversation.d.ts +1 -1
- package/esm/browser/style/conversation.js +24 -8
- package/esm/browser/style/dialogs.d.ts +2 -0
- package/esm/browser/style/dialogs.js +163 -0
- package/esm/browser/style/layout.d.ts +2 -2
- package/esm/browser/style/layout.js +1 -525
- package/esm/browser/style/pages.d.ts +1 -1
- package/esm/browser/style/pages.js +10 -3
- package/esm/browser/style/phone.d.ts +1 -1
- package/esm/browser/style/phone.js +6 -2
- package/esm/browser/style/shared.d.ts +2 -0
- package/esm/browser/style/shared.js +23 -0
- package/esm/browser/style/shell.d.ts +1 -1
- package/esm/browser/style/shell.js +47 -0
- package/esm/browser/style/tasks.d.ts +1 -1
- package/esm/browser/style/tasks.js +13 -8
- package/esm/browser/style.js +8 -0
- package/esm/browser/util/gallery.d.ts +24 -2
- package/esm/browser/util/gallery.js +82 -2
- package/esm/browser/util/image-copy.d.ts +16 -0
- package/esm/browser/util/image-copy.js +57 -0
- package/esm/browser/util/message.d.ts +5 -0
- package/esm/browser/util/message.js +14 -0
- package/esm/browser/util/process.d.ts +6 -2
- package/esm/browser/util/process.js +6 -2
- package/esm/browser/util/spoken.d.ts +24 -0
- package/esm/browser/util/spoken.js +83 -0
- package/esm/browser/util/transcript.d.ts +22 -0
- package/esm/browser/util/transcript.js +46 -0
- package/esm/browser/util/voice.d.ts +5 -1
- package/esm/browser/util/voice.js +6 -1
- package/esm/browser/workbench-hosts.d.ts +36 -0
- package/esm/browser/workbench-hosts.js +120 -0
- package/esm/browser/workbench-lists.d.ts +33 -0
- package/esm/browser/workbench-lists.js +128 -0
- package/esm/browser/workbench-protocol.d.ts +14 -1
- package/esm/browser/workbench-services.d.ts +49 -0
- package/esm/browser/workbench-services.js +120 -0
- package/esm/browser/workbench-util.d.ts +1 -1
- package/esm/browser/workbench.d.ts +6 -89
- package/esm/browser/workbench.js +26 -336
- package/lib/browser/assistant/assistant-ask-book.d.ts +36 -0
- package/lib/browser/assistant/assistant-ask-book.js +100 -0
- package/lib/browser/assistant/assistant-conversation.d.ts +111 -0
- package/lib/browser/assistant/assistant-conversation.js +355 -0
- package/lib/browser/assistant/assistant-export.js +6 -7
- package/lib/browser/assistant/assistant-extension.d.ts +3 -2
- package/lib/browser/assistant/assistant-extension.js +55 -2
- package/lib/browser/assistant/assistant-protocol.d.ts +17 -2
- package/lib/browser/assistant/assistant-role.d.ts +22 -4
- package/lib/browser/assistant/assistant-role.js +30 -8
- package/lib/browser/assistant/assistant-state.d.ts +5 -1
- package/lib/browser/assistant/assistant-state.js +11 -0
- package/lib/browser/assistant/assistant-task-source.js +7 -1
- package/lib/browser/assistant/assistant-task-util.d.ts +19 -7
- package/lib/browser/assistant/assistant-task-util.js +73 -20
- package/lib/browser/assistant/assistant-tasks.d.ts +0 -7
- package/lib/browser/assistant/assistant-tasks.js +1 -3
- package/lib/browser/assistant/assistant-thread.d.ts +23 -0
- package/lib/browser/assistant/assistant-thread.js +144 -0
- package/lib/browser/assistant/assistant-view.js +74 -123
- package/lib/browser/assistant/assistant.d.ts +33 -105
- package/lib/browser/assistant/assistant.js +100 -353
- package/lib/browser/assistant/chat-task-source.d.ts +59 -0
- package/lib/browser/assistant/chat-task-source.js +111 -0
- package/lib/browser/assistant/read-aloud.d.ts +35 -0
- package/lib/browser/assistant/read-aloud.js +102 -0
- package/lib/browser/assistant/realtime-voice.d.ts +78 -0
- package/lib/browser/assistant/realtime-voice.js +324 -0
- package/lib/browser/assistant/task-views.d.ts +2 -3
- package/lib/browser/assistant/task-views.js +19 -15
- package/lib/browser/assistant/voice-call-bar.d.ts +61 -0
- package/lib/browser/assistant/voice-call-bar.js +306 -0
- package/lib/browser/assistant/voice-call.d.ts +176 -0
- package/lib/browser/assistant/voice-call.js +370 -0
- package/lib/browser/chat/chat-shown.d.ts +79 -0
- package/lib/browser/chat/chat-shown.js +266 -0
- package/lib/browser/chat/chat-view.js +2 -1
- package/lib/browser/chat/chat.d.ts +4 -68
- package/lib/browser/chat/chat.js +3 -251
- package/lib/browser/chat/draft-model.d.ts +1 -1
- package/lib/browser/components/access-view.js +2 -2
- package/lib/browser/components/account-menu.js +1 -1
- package/lib/browser/components/app-nav.d.ts +3 -1
- package/lib/browser/components/app-nav.js +7 -7
- package/lib/browser/components/app-shell-hooks.d.ts +11 -2
- package/lib/browser/components/app-shell-hooks.js +26 -5
- package/lib/browser/components/app-shell-state.d.ts +81 -0
- package/lib/browser/components/app-shell-state.js +502 -0
- package/lib/browser/components/app-view.js +120 -326
- package/lib/browser/components/asks-badge.d.ts +6 -2
- package/lib/browser/components/asks-badge.js +7 -3
- package/lib/browser/components/auth-pictures.d.ts +2 -2
- package/lib/browser/components/auth-pictures.js +13 -1
- package/lib/browser/components/auth-view.d.ts +4 -3
- package/lib/browser/components/auth-view.js +53 -4
- package/lib/browser/components/chat-asks.d.ts +2 -0
- package/lib/browser/components/chat-asks.js +8 -0
- package/lib/browser/components/chat-busy.d.ts +33 -0
- package/lib/browser/components/chat-busy.js +52 -0
- package/lib/browser/components/chat-icon.d.ts +6 -0
- package/lib/browser/components/chat-icon.js +17 -1
- package/lib/browser/components/chat-list-row.d.ts +85 -0
- package/lib/browser/components/chat-list-row.js +236 -0
- package/lib/browser/components/chat-list-util.d.ts +167 -0
- package/lib/browser/components/chat-list-util.js +338 -0
- package/lib/browser/components/chat-list.d.ts +11 -148
- package/lib/browser/components/chat-list.js +297 -530
- package/lib/browser/components/chat-seen.d.ts +7 -0
- package/lib/browser/components/chat-seen.js +58 -10
- package/lib/browser/components/composer-addon-util.d.ts +1 -1
- package/lib/browser/components/composer-addons.d.ts +1 -1
- package/lib/browser/components/composer-attachments.d.ts +12 -0
- package/lib/browser/components/composer-attachments.js +64 -0
- package/lib/browser/components/composer-box-hooks.d.ts +10 -0
- package/lib/browser/components/composer-box-hooks.js +178 -0
- package/lib/browser/components/composer-box-protocol.d.ts +109 -0
- package/lib/browser/components/composer-box-protocol.js +3 -0
- package/lib/browser/components/composer-box.d.ts +1 -95
- package/lib/browser/components/composer-box.js +51 -159
- package/lib/browser/components/composer-target.d.ts +22 -0
- package/lib/browser/components/composer-target.js +46 -0
- package/lib/browser/components/composer.d.ts +7 -1
- package/lib/browser/components/composer.js +15 -11
- package/lib/browser/components/context-menu.js +4 -0
- package/lib/browser/components/conversation-find.d.ts +28 -0
- package/lib/browser/components/conversation-find.js +188 -0
- package/lib/browser/components/conversation-scroll-hooks.js +3 -2
- package/lib/browser/components/conversation-scroll-util.d.ts +73 -0
- package/lib/browser/components/conversation-scroll-util.js +85 -1
- package/lib/browser/components/conversation-scroll.d.ts +1 -35
- package/lib/browser/components/conversation-scroll.js +20 -100
- package/lib/browser/components/conversation-view.d.ts +9 -0
- package/lib/browser/components/conversation-view.js +77 -0
- package/lib/browser/components/discover-view.d.ts +3 -2
- package/lib/browser/components/discover-view.js +30 -25
- package/lib/browser/components/dismiss.js +2 -0
- package/lib/browser/components/earlier-messages.d.ts +2 -0
- package/lib/browser/components/earlier-messages.js +2 -1
- package/lib/browser/components/environment-view.js +49 -0
- package/lib/browser/components/folder-picker.d.ts +7 -0
- package/lib/browser/components/folder-picker.js +89 -19
- package/lib/browser/components/gallery.d.ts +1 -1
- package/lib/browser/components/gallery.js +56 -13
- package/lib/browser/components/host-tag.js +1 -1
- package/lib/browser/components/host-view.d.ts +1 -1
- package/lib/browser/components/host-view.js +4 -2
- package/lib/browser/components/image-menu.d.ts +12 -0
- package/lib/browser/components/image-menu.js +65 -0
- package/lib/browser/components/image-viewer.d.ts +3 -2
- package/lib/browser/components/image-viewer.js +28 -3
- package/lib/browser/components/lightbox.js +2 -0
- package/lib/browser/components/link-dialog.js +2 -0
- package/lib/browser/components/list-rows.d.ts +3 -1
- package/lib/browser/components/list-rows.js +2 -1
- package/lib/browser/components/markdown.js +5 -0
- package/lib/browser/components/media.d.ts +2 -0
- package/lib/browser/components/media.js +17 -1
- package/lib/browser/components/message-actions.d.ts +1 -1
- package/lib/browser/components/message-actions.js +9 -0
- package/lib/browser/components/message-footer.d.ts +3 -1
- package/lib/browser/components/message-footer.js +2 -1
- package/lib/browser/components/message-images.d.ts +42 -0
- package/lib/browser/components/message-images.js +157 -0
- package/lib/browser/components/message-list.d.ts +4 -100
- package/lib/browser/components/message-list.js +11 -455
- package/lib/browser/components/message-menu.js +4 -0
- package/lib/browser/components/message-steps.d.ts +22 -0
- package/lib/browser/components/message-steps.js +218 -0
- package/lib/browser/components/message-user.d.ts +55 -0
- package/lib/browser/components/message-user.js +211 -0
- package/lib/browser/components/model-picker.d.ts +1 -1
- package/lib/browser/components/model-picker.js +2 -0
- package/lib/browser/components/moved-notice.d.ts +15 -0
- package/lib/browser/components/moved-notice.js +96 -0
- package/lib/browser/components/nav-places.d.ts +12 -1
- package/lib/browser/components/nav-places.js +12 -3
- package/lib/browser/components/notice-center.js +35 -0
- package/lib/browser/components/notice-face.js +7 -6
- package/lib/browser/components/phone-shell.d.ts +4 -3
- package/lib/browser/components/phone-shell.js +59 -67
- package/lib/browser/components/plus-menu.d.ts +1 -1
- package/lib/browser/components/relay-services.d.ts +6 -1
- package/lib/browser/components/relay-services.js +107 -0
- package/lib/browser/components/relay-view.js +2 -0
- package/lib/browser/components/remote-hosts.d.ts +10 -0
- package/lib/browser/components/remote-hosts.js +67 -4
- package/lib/browser/components/remote-prompts.js +2 -0
- package/lib/browser/components/scan-screen.js +7 -0
- package/lib/browser/components/screen-navigator-util.d.ts +29 -0
- package/lib/browser/components/screen-navigator-util.js +36 -0
- package/lib/browser/components/screen-navigator.d.ts +31 -0
- package/lib/browser/components/screen-navigator.js +83 -0
- package/lib/browser/components/session-settings.d.ts +1 -1
- package/lib/browser/components/session-view.js +157 -7
- package/lib/browser/components/settings-choices.d.ts +7 -1
- package/lib/browser/components/settings-choices.js +9 -1
- package/lib/browser/components/settings-more.d.ts +8 -0
- package/lib/browser/components/settings-more.js +299 -0
- package/lib/browser/components/settings-parts.d.ts +8 -3
- package/lib/browser/components/settings-parts.js +27 -245
- package/lib/browser/components/settings-view.js +43 -15
- package/lib/browser/components/stop-times.js +1 -0
- package/lib/browser/components/surface-flyout.js +2 -0
- package/lib/browser/components/unseen-drop.d.ts +10 -4
- package/lib/browser/components/unseen-drop.js +9 -8
- package/lib/browser/components/use-seen-chats.js +2 -2
- package/lib/browser/components/voice-services.d.ts +7 -0
- package/lib/browser/components/voice-services.js +173 -0
- package/lib/browser/components/voice-talk.d.ts +23 -6
- package/lib/browser/components/voice-talk.js +45 -10
- package/lib/browser/components/web-composer.d.ts +1 -1
- package/lib/browser/components/web-composer.js +2 -2
- package/lib/browser/components/web-dialog.js +2 -0
- package/lib/browser/device/back-stack.d.ts +89 -11
- package/lib/browser/device/back-stack.js +205 -31
- package/lib/browser/device/device-protocol.d.ts +1 -1
- package/lib/browser/device/device-protocol.js +1 -1
- package/lib/browser/device/own-gestures.d.ts +1 -1
- package/lib/browser/device/pull-down.js +8 -6
- package/lib/browser/device/row-swipe.js +11 -9
- package/lib/browser/device/sheet-swipe.d.ts +1 -179
- package/lib/browser/device/sheet-swipe.js +16 -452
- package/lib/browser/device/swipe-finger.d.ts +32 -0
- package/lib/browser/device/swipe-finger.js +87 -0
- package/lib/browser/device/swipe-settle.d.ts +53 -0
- package/lib/browser/device/swipe-settle.js +176 -0
- package/lib/browser/device/swipe-util.d.ts +98 -0
- package/lib/browser/device/swipe-util.js +187 -0
- package/lib/browser/drafts/drafts-protocol.d.ts +59 -0
- package/lib/browser/drafts/drafts-protocol.js +78 -0
- package/lib/browser/drafts/drafts.d.ts +22 -0
- package/lib/browser/drafts/drafts.js +94 -0
- package/lib/browser/drafts/use-composer-draft.d.ts +21 -0
- package/lib/browser/drafts/use-composer-draft.js +146 -0
- package/lib/browser/extension/icons.js +24 -3
- package/lib/browser/extension/web-api-components.d.ts +13 -0
- package/lib/browser/extension/web-api-contributions.d.ts +125 -0
- package/lib/browser/extension/web-extension-api.d.ts +88 -5
- package/lib/browser/extension/web-extension-context.d.ts +5 -0
- package/lib/browser/extension/web-extension-context.js +62 -9
- package/lib/browser/extension/web-extension-protocol.d.ts +19 -1
- package/lib/browser/extension/web-extension-protocol.js +3 -0
- package/lib/browser/extension/web-extension-run.d.ts +5 -2
- package/lib/browser/extension/web-extension-run.js +13 -1
- package/lib/browser/extension/web-extensions-running.d.ts +94 -0
- package/lib/browser/extension/web-extensions-running.js +343 -0
- package/lib/browser/extension/web-extensions.d.ts +6 -82
- package/lib/browser/extension/web-extensions.js +7 -316
- package/lib/browser/extension/web-pages.js +1 -0
- package/lib/browser/extension/web-session-notices.js +8 -3
- package/lib/browser/extension/web-tasks.d.ts +2 -0
- package/lib/browser/extension/web-tasks.js +6 -0
- package/lib/browser/extension/web-view-util.d.ts +2 -1
- package/lib/browser/extension/web-view-util.js +4 -1
- package/lib/browser/gateway/console-parts.d.ts +4 -12
- package/lib/browser/gateway/console-parts.js +42 -126
- package/lib/browser/gateway/console-tenant.js +3 -2
- package/lib/browser/gateway/console-trend.d.ts +12 -0
- package/lib/browser/gateway/console-trend.js +151 -0
- package/lib/browser/gateway/console-util.js +2 -2
- package/lib/browser/gateway/console-view.js +48 -2
- package/lib/browser/i18n/locales.d.ts +170 -6
- package/lib/browser/i18n/messages-ja.js +171 -7
- package/lib/browser/i18n/messages-zh-tw.js +171 -7
- package/lib/browser/i18n/messages.d.ts +167 -3
- package/lib/browser/i18n/messages.js +342 -14
- package/lib/browser/index.d.ts +17 -0
- package/lib/browser/index.js +17 -0
- package/lib/browser/notices/notices-protocol.d.ts +12 -0
- package/lib/browser/notices/notices.js +7 -4
- package/lib/browser/offline/device-values.d.ts +2 -0
- package/lib/browser/offline/device-values.js +6 -1
- package/lib/browser/screen/page-answers.d.ts +43 -0
- package/lib/browser/screen/page-answers.js +93 -0
- package/lib/browser/screen/screen-protocol.d.ts +113 -0
- package/lib/browser/screen/screen-protocol.js +48 -0
- package/lib/browser/screen/screen.d.ts +21 -0
- package/lib/browser/screen/screen.js +125 -0
- package/lib/browser/screen/use-screen-part.d.ts +7 -0
- package/lib/browser/screen/use-screen-part.js +50 -0
- package/lib/browser/settings/settings-protocol.d.ts +5 -1
- package/lib/browser/settings/settings-protocol.js +5 -1
- package/lib/browser/share/shared-extensions.d.ts +30 -0
- package/lib/browser/share/shared-extensions.js +181 -0
- package/lib/browser/share/shared-link.d.ts +12 -0
- package/lib/browser/share/shared-link.js +41 -0
- package/lib/browser/share/shared-page.d.ts +6 -0
- package/lib/browser/share/shared-page.js +173 -0
- package/lib/browser/state/state-protocol.d.ts +14 -0
- package/lib/browser/state/state-protocol.js +20 -1
- package/lib/browser/state/state.d.ts +10 -2
- package/lib/browser/state/state.js +18 -2
- package/lib/browser/style/base.d.ts +1 -1
- package/lib/browser/style/base.js +4 -0
- package/lib/browser/style/chat-list.d.ts +3 -0
- package/lib/browser/style/chat-list.js +156 -0
- package/lib/browser/style/conversation-column.d.ts +3 -0
- package/lib/browser/style/conversation-column.js +253 -0
- package/lib/browser/style/conversation.d.ts +1 -1
- package/lib/browser/style/conversation.js +24 -8
- package/lib/browser/style/dialogs.d.ts +3 -0
- package/lib/browser/style/dialogs.js +166 -0
- package/lib/browser/style/layout.d.ts +2 -2
- package/lib/browser/style/layout.js +1 -525
- package/lib/browser/style/pages.d.ts +1 -1
- package/lib/browser/style/pages.js +10 -3
- package/lib/browser/style/phone.d.ts +1 -1
- package/lib/browser/style/phone.js +7 -3
- package/lib/browser/style/shared.d.ts +3 -0
- package/lib/browser/style/shared.js +26 -0
- package/lib/browser/style/shell.d.ts +1 -1
- package/lib/browser/style/shell.js +47 -0
- package/lib/browser/style/tasks.d.ts +1 -1
- package/lib/browser/style/tasks.js +13 -8
- package/lib/browser/style.js +8 -0
- package/lib/browser/util/gallery.d.ts +24 -2
- package/lib/browser/util/gallery.js +82 -2
- package/lib/browser/util/image-copy.d.ts +17 -0
- package/lib/browser/util/image-copy.js +60 -0
- package/lib/browser/util/message.d.ts +5 -0
- package/lib/browser/util/message.js +14 -0
- package/lib/browser/util/process.d.ts +6 -2
- package/lib/browser/util/process.js +6 -2
- package/lib/browser/util/spoken.d.ts +25 -0
- package/lib/browser/util/spoken.js +86 -0
- package/lib/browser/util/transcript.d.ts +23 -0
- package/lib/browser/util/transcript.js +49 -0
- package/lib/browser/util/voice.d.ts +5 -1
- package/lib/browser/util/voice.js +6 -1
- package/lib/browser/workbench-hosts.d.ts +37 -0
- package/lib/browser/workbench-hosts.js +124 -0
- package/lib/browser/workbench-lists.d.ts +34 -0
- package/lib/browser/workbench-lists.js +132 -0
- package/lib/browser/workbench-protocol.d.ts +14 -1
- package/lib/browser/workbench-services.d.ts +50 -0
- package/lib/browser/workbench-services.js +124 -0
- package/lib/browser/workbench-util.d.ts +1 -1
- package/lib/browser/workbench.d.ts +6 -89
- package/lib/browser/workbench.js +23 -333
- package/package.json +7 -7
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { Blocks, Cloud, FolderOpen, Info, Keyboard, KeyRound, LogOut, Puzzle, RefreshCw, RotateCw, Server, ShieldCheck, Smartphone, Trash2, Waypoints, } from 'lucide-react';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useDevice } from '../device/device.js';
|
|
4
|
+
import { ExtensionBoundary } from '../extension/extension-view.js';
|
|
5
|
+
import { WebLabelUtil } from '../extension/web-extension-protocol.js';
|
|
6
|
+
import { useNotices, useSettings, useWebExtensions, useWorkbench } from '../hooks.js';
|
|
7
|
+
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
8
|
+
import { WorkbenchUtil } from '../workbench-util.js';
|
|
9
|
+
import { AccessSettings, useAccess } from './access-view.js';
|
|
10
|
+
import { BusyMark } from './busy.js';
|
|
11
|
+
import { EnvironmentSettings, useGateway } from './environment-view.js';
|
|
12
|
+
import { Icon, IconButton } from './icon.js';
|
|
13
|
+
import { useLaunchRows } from './launch-settings.js';
|
|
14
|
+
import { RelayServices } from './relay-services.js';
|
|
15
|
+
import { RemoteHosts } from './remote-hosts.js';
|
|
16
|
+
import { ServeRestartUtil, useRestartTa } from './serve-restart.js';
|
|
17
|
+
import { packageLabel, SETTINGS_GROUPS, SHORTCUTS, usePackages } from './settings-choices.js';
|
|
18
|
+
import { EmptyRow, Keys, Row, row, Switch } from './settings-controls.js';
|
|
19
|
+
import { SignInSetupSettings, useSignInConfig } from './sign-in-setup.js';
|
|
20
|
+
/**
|
|
21
|
+
* The sections besides those of the page and of pi's settings, each in its part (SectionEntry.group): the packages,
|
|
22
|
+
* those built in, those of extensions where they ask, the computers and services Ta reaches, who may come in, the
|
|
23
|
+
* keys, and what is about Ta and this computer.
|
|
24
|
+
*/
|
|
25
|
+
export function useMoreSections(onClose, onDialog) {
|
|
26
|
+
const t = useT();
|
|
27
|
+
const language = useLanguage();
|
|
28
|
+
const [{ settings }, store] = useSettings();
|
|
29
|
+
const [workbench, bench] = useWorkbench();
|
|
30
|
+
const [{ extensions, settingsSections }, host] = useWebExtensions();
|
|
31
|
+
const packageList = usePackages();
|
|
32
|
+
const builtinPackages = packageList.packages.filter(pkg => pkg.origin === 'builtin');
|
|
33
|
+
const [, notices] = useNotices();
|
|
34
|
+
const access = useAccess();
|
|
35
|
+
const signInConfig = useSignInConfig();
|
|
36
|
+
const gateway = useGateway();
|
|
37
|
+
const restartTa = useRestartTa();
|
|
38
|
+
// As the menu of the account (useAccountEntries): a finger has no keys to learn; a phone is not the computer
|
|
39
|
+
// that pairs phones, and signs out at the foot of Me.
|
|
40
|
+
const touch = useDevice(device => device.touch);
|
|
41
|
+
const handheld = useDevice(device => device.handheld);
|
|
42
|
+
// What runs, one thing at a time: its control turns (Switch, IconButton busy), the others wait.
|
|
43
|
+
const [busy, setBusy] = React.useState();
|
|
44
|
+
const run = (key, action, done) => {
|
|
45
|
+
setBusy(key);
|
|
46
|
+
return action()
|
|
47
|
+
.then(() => done && notices.notify(done, { level: 'success' }))
|
|
48
|
+
.catch(error => notices.error(error))
|
|
49
|
+
.finally(() => setBusy(undefined));
|
|
50
|
+
};
|
|
51
|
+
const waits = (key) => busy !== undefined && busy !== key;
|
|
52
|
+
const remove = async (pkg) => {
|
|
53
|
+
const confirmed = await notices.confirm({
|
|
54
|
+
title: t('ta.packages.removeConfirm', { name: pkg.name }),
|
|
55
|
+
message: t('ta.packages.removeDetail'),
|
|
56
|
+
confirmLabel: t('ta.packages.remove'),
|
|
57
|
+
danger: true,
|
|
58
|
+
});
|
|
59
|
+
if (confirmed) {
|
|
60
|
+
void run(`remove:${pkg.id}`, () => packageList.remove(pkg), t('ta.packages.removed', { name: pkg.name }));
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const toggleBuiltin = (name, on) => {
|
|
64
|
+
store.update({ builtinsOff: on ? settings.builtinsOff.filter(other => other !== name) : [...settings.builtinsOff, name] });
|
|
65
|
+
return run(`builtin:${name}`, () => host.refresh());
|
|
66
|
+
};
|
|
67
|
+
// Those opened without installing are in Quick open, which installs or deletes them (ta-launcher.md).
|
|
68
|
+
const packages = packageList.packages.filter(pkg => pkg.origin !== 'builtin' && pkg.origin !== 'temporary');
|
|
69
|
+
const launchRows = useLaunchRows();
|
|
70
|
+
/** Why the web extension of a package did not load, if it did not. */
|
|
71
|
+
const failure = (pkg) => { var _a; return (_a = extensions.find(extension => { var _a; return ((_a = extension.info) === null || _a === void 0 ? void 0 : _a.source) === pkg.source && extension.error; })) === null || _a === void 0 ? void 0 : _a.error; };
|
|
72
|
+
const reload = async () => {
|
|
73
|
+
await host.refresh();
|
|
74
|
+
await packageList.read();
|
|
75
|
+
};
|
|
76
|
+
const more = [
|
|
77
|
+
{
|
|
78
|
+
id: 'packages',
|
|
79
|
+
title: t('ta.packages.installed'),
|
|
80
|
+
icon: Puzzle,
|
|
81
|
+
group: 'extensions',
|
|
82
|
+
rows: [
|
|
83
|
+
row('packages', [t('ta.packages'), t('ta.packages.hint')], React.createElement(Row, { label: t('ta.packages.installed'), description: t('ta.packages.hint') },
|
|
84
|
+
React.createElement("button", { type: "button", className: busy === 'reload' ? 'ta-button ta-busy' : 'ta-button', "aria-busy": busy === 'reload' || undefined, disabled: waits('reload'), onClick: () => void run('reload', reload, t('ta.packages.reloaded')) },
|
|
85
|
+
React.createElement(Icon, { icon: RefreshCw, size: 14 }),
|
|
86
|
+
" ",
|
|
87
|
+
t('ta.packages.reload'),
|
|
88
|
+
React.createElement(BusyMark, { busy: busy === 'reload' })))),
|
|
89
|
+
...packages.map(pkg => {
|
|
90
|
+
const error = failure(pkg);
|
|
91
|
+
const { title, summary, icon } = packageLabel(pkg, language);
|
|
92
|
+
return row(`package:${pkg.id}`, [title, summary, pkg.name, t('ta.packages')], React.createElement(Row, { icon: icon, label: title, description: error
|
|
93
|
+
? t('ta.packages.failed', { error })
|
|
94
|
+
: [summary, t(pkg.scope === 'project' ? 'ta.packages.scope.project' : 'ta.packages.scope.user')].filter(Boolean).join(' · ') },
|
|
95
|
+
React.createElement(IconButton, { icon: Trash2, label: t('ta.packages.remove'), busy: busy === `remove:${pkg.id}`, disabled: waits(`remove:${pkg.id}`), onClick: () => void remove(pkg) }),
|
|
96
|
+
React.createElement(Switch, { label: title, checked: pkg.enabled, disabled: waits(`toggle:${pkg.id}`), onChange: on => run(`toggle:${pkg.id}`, () => packageList.toggle(pkg, on)) })));
|
|
97
|
+
}),
|
|
98
|
+
...(packages.length === 0
|
|
99
|
+
? [row('packages:none', [t('ta.packages.none')], React.createElement(EmptyRow, { title: t('ta.packages.none'), hint: t('ta.packages.noneHint') }))]
|
|
100
|
+
: []),
|
|
101
|
+
...launchRows,
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
id: 'builtin',
|
|
106
|
+
title: t('ta.packages.builtinTitle'),
|
|
107
|
+
icon: Blocks,
|
|
108
|
+
group: 'extensions',
|
|
109
|
+
rows: [
|
|
110
|
+
// The console only for administrators of a gateway, where it shows.
|
|
111
|
+
...host.builtins
|
|
112
|
+
.filter(builtin => { var _a; return !builtin.gatewayAdmin || ((_a = gateway.info) === null || _a === void 0 ? void 0 : _a.admin); })
|
|
113
|
+
.map(builtin => { var _a; return row(`web:${builtin.name}`, [t(builtin.title), t(builtin.description), t('ta.packages.builtinTitle')], React.createElement(Row, { icon: (_a = builtin.icon) !== null && _a !== void 0 ? _a : Puzzle, label: t(builtin.title), description: t(builtin.description) },
|
|
114
|
+
React.createElement(Switch, { label: t(builtin.title), checked: !settings.builtinsOff.includes(builtin.name), onChange: on => toggleBuiltin(builtin.name, on) }))); }),
|
|
115
|
+
...builtinPackages.map(info => {
|
|
116
|
+
const { title, summary, icon } = packageLabel(info, language);
|
|
117
|
+
return row(`builtin:${info.name}`, [title, summary, info.name, t('ta.packages.builtinTitle')], React.createElement(Row, { icon: icon, label: title, description: summary },
|
|
118
|
+
React.createElement(Switch, { label: title, checked: info.enabled, onChange: on => run(`toggle:${info.id}`, () => packageList.toggle(info, on)) })));
|
|
119
|
+
}),
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
...settingsSections.map(extensionSection),
|
|
123
|
+
// Behind a gateway only: where the Ta of this account runs.
|
|
124
|
+
...(gateway.info
|
|
125
|
+
? [
|
|
126
|
+
{
|
|
127
|
+
id: 'environment',
|
|
128
|
+
title: t('ta.environment.title'),
|
|
129
|
+
icon: Cloud,
|
|
130
|
+
group: 'devices',
|
|
131
|
+
rows: [
|
|
132
|
+
row('environment', [t('ta.environment.title'), t('ta.environment.whereHint'), 'sandbox', 'docker'], React.createElement(EnvironmentSettings, { info: gateway.info, onChange: gateway.read })),
|
|
133
|
+
],
|
|
134
|
+
},
|
|
135
|
+
]
|
|
136
|
+
: []),
|
|
137
|
+
// The ways to sign in for the owner (those invited use them too); who may sign in only where accounts can, or could.
|
|
138
|
+
...(signInConfig.config || (access.info && (access.info.providers.length > 0 || access.info.accounts.length > 0))
|
|
139
|
+
? [
|
|
140
|
+
{
|
|
141
|
+
id: 'access',
|
|
142
|
+
title: t('ta.access.title'),
|
|
143
|
+
icon: ShieldCheck,
|
|
144
|
+
group: 'privacy',
|
|
145
|
+
rows: [
|
|
146
|
+
...(signInConfig.config
|
|
147
|
+
? [
|
|
148
|
+
row('sign-in', [t('ta.signInSetup.title'), t('ta.signInSetup.hint'), 'github', 'google', 'wechat', 'oidc', 'sso'], React.createElement(SignInSetupSettings, { config: signInConfig.config, onChange: () => Promise.all([signInConfig.read(), access.read()]) })),
|
|
149
|
+
]
|
|
150
|
+
: []),
|
|
151
|
+
...(access.info && (access.info.providers.length > 0 || access.info.accounts.length > 0)
|
|
152
|
+
? [
|
|
153
|
+
row('access', [t('ta.access.title'), t('ta.access.addHint'), 'github', 'google', 'wechat'], React.createElement(AccessSettings, { info: access.info, onChange: access.read })),
|
|
154
|
+
]
|
|
155
|
+
: []),
|
|
156
|
+
],
|
|
157
|
+
},
|
|
158
|
+
]
|
|
159
|
+
: []),
|
|
160
|
+
{
|
|
161
|
+
id: 'remote',
|
|
162
|
+
title: t('ta.remote.title'),
|
|
163
|
+
icon: Server,
|
|
164
|
+
group: 'devices',
|
|
165
|
+
rows: [row('remote', [t('ta.remote.title'), t('ta.remote.description'), 'ssh'], React.createElement(RemoteHosts, null))],
|
|
166
|
+
},
|
|
167
|
+
// Behind a gateway the relays are the gateway's business, not the tenant's.
|
|
168
|
+
...(gateway.info
|
|
169
|
+
? []
|
|
170
|
+
: [
|
|
171
|
+
{
|
|
172
|
+
id: 'relays',
|
|
173
|
+
title: t('ta.relays.title'),
|
|
174
|
+
icon: Waypoints,
|
|
175
|
+
group: 'devices',
|
|
176
|
+
rows: [row('relays', [t('ta.relays.title'), t('ta.relays.addHint'), 'relay', 'relays.json'], React.createElement(RelayServices, null))],
|
|
177
|
+
},
|
|
178
|
+
]),
|
|
179
|
+
...(touch
|
|
180
|
+
? []
|
|
181
|
+
: [
|
|
182
|
+
{
|
|
183
|
+
id: 'shortcuts',
|
|
184
|
+
title: t('ta.settings.shortcuts'),
|
|
185
|
+
icon: Keyboard,
|
|
186
|
+
rows: SHORTCUTS.map(shortcut => row(`key:${shortcut.keys}`, [t(shortcut.label), shortcut.keys, t('ta.settings.shortcuts')], React.createElement(Row, { label: t(shortcut.label) },
|
|
187
|
+
React.createElement(Keys, { keys: shortcut.keys })))),
|
|
188
|
+
},
|
|
189
|
+
]),
|
|
190
|
+
{
|
|
191
|
+
id: 'about',
|
|
192
|
+
title: t('ta.settings.about'),
|
|
193
|
+
icon: Info,
|
|
194
|
+
rows: workbench.server
|
|
195
|
+
? [
|
|
196
|
+
row('version', [t('ta.settings.version'), 'version'], React.createElement(Row, { label: t('ta.settings.version'), description: restartTa.update && t('ta.update.ready', { version: ServeRestartUtil.label(restartTa.update) }) },
|
|
197
|
+
React.createElement("span", { className: "ta-path" }, ServeRestartUtil.label(workbench.server)))),
|
|
198
|
+
...(restartTa.can
|
|
199
|
+
? [
|
|
200
|
+
row('restart', [t('ta.restart'), t('ta.restart.description'), 'restart', 'update'], React.createElement(Row, { label: t('ta.restart'), description: t('ta.restart.description') },
|
|
201
|
+
React.createElement("button", { type: "button", className: `ta-button${restartTa.update ? ' ta-primary' : ''}`, disabled: restartTa.restarting, onClick: () => void restartTa.restart() },
|
|
202
|
+
restartTa.restarting ? React.createElement("span", { className: "ta-spinner" }) : React.createElement(Icon, { icon: RotateCw, size: 15 }),
|
|
203
|
+
' ',
|
|
204
|
+
t('ta.restart.button')))),
|
|
205
|
+
]
|
|
206
|
+
: []),
|
|
207
|
+
row('cwd', [t('ta.settings.cwd'), workbench.server.cwd], React.createElement(Row, { label: t('ta.settings.cwd'), description: t('ta.settings.cwdDescription', { path: workbench.server.cwd }) },
|
|
208
|
+
React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('directory') },
|
|
209
|
+
React.createElement(Icon, { icon: FolderOpen, size: 15 }),
|
|
210
|
+
" ",
|
|
211
|
+
t('ta.settings.cwdChange')))),
|
|
212
|
+
row('accounts', [t('ta.settings.accounts'), t('ta.settings.accountsDescription')], React.createElement(Row, { label: t('ta.settings.accounts'), description: t('ta.settings.accountsDescription') },
|
|
213
|
+
React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('accounts') },
|
|
214
|
+
React.createElement(Icon, { icon: KeyRound, size: 15 }),
|
|
215
|
+
" ",
|
|
216
|
+
t('ta.settings.manageAccounts')))),
|
|
217
|
+
...(WorkbenchUtil.isApp() || handheld
|
|
218
|
+
? []
|
|
219
|
+
: [
|
|
220
|
+
row('relay', [t('ta.settings.relay'), t('ta.settings.relayDescription')], React.createElement(Row, { label: t('ta.settings.relay'), description: t('ta.settings.relayDescription') },
|
|
221
|
+
React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('relay') },
|
|
222
|
+
React.createElement(Icon, { icon: Smartphone, size: 15 }),
|
|
223
|
+
" ",
|
|
224
|
+
t('ta.settings.manageAccounts')))),
|
|
225
|
+
]),
|
|
226
|
+
...(handheld
|
|
227
|
+
? []
|
|
228
|
+
: [
|
|
229
|
+
row('signOut', [t('ta.settings.signOut')], React.createElement(Row, { label: t('ta.settings.signOut') },
|
|
230
|
+
React.createElement("button", { type: "button", className: "ta-button ta-danger", onClick: () => {
|
|
231
|
+
onClose();
|
|
232
|
+
bench.signOut();
|
|
233
|
+
} },
|
|
234
|
+
React.createElement(Icon, { icon: LogOut, size: 15 }),
|
|
235
|
+
" ",
|
|
236
|
+
t('ta.settings.signOut')))),
|
|
237
|
+
]),
|
|
238
|
+
]
|
|
239
|
+
: [],
|
|
240
|
+
},
|
|
241
|
+
];
|
|
242
|
+
return more;
|
|
243
|
+
}
|
|
244
|
+
/** A section an extension added (WebExtensionAPI.registerSettings): its rows as Ta's, each control in a boundary of its own. */
|
|
245
|
+
function extensionSection({ id, section }) {
|
|
246
|
+
var _a;
|
|
247
|
+
const title = WebLabelUtil.text(section.title);
|
|
248
|
+
return {
|
|
249
|
+
id: `extension-${id.replace(/[^\w-]+/g, '-')}`,
|
|
250
|
+
title,
|
|
251
|
+
icon: (_a = section.icon) !== null && _a !== void 0 ? _a : Puzzle,
|
|
252
|
+
group: section.group && SETTINGS_GROUPS.some(group => group.id === section.group) ? section.group : 'extensions',
|
|
253
|
+
rows: section.rows.map(item => {
|
|
254
|
+
const label = WebLabelUtil.text(item.label);
|
|
255
|
+
const description = item.description === undefined ? undefined : WebLabelUtil.text(item.description);
|
|
256
|
+
const Control = item.render;
|
|
257
|
+
return row(`${id}/${item.key}`, [label, description, title, item.search === undefined ? undefined : WebLabelUtil.text(item.search)], React.createElement(Row, { label: label, description: description, stacked: item.stacked },
|
|
258
|
+
React.createElement(ExtensionBoundary, { name: title, resetKey: Control },
|
|
259
|
+
React.createElement(Control, null))));
|
|
260
|
+
}),
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=settings-more.js.map
|
|
@@ -1,18 +1,23 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type TaSettingsScope } from '@celljs/ta-protocol';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import type { WebSettingsGroup } from '../extension/web-extension-api.js';
|
|
4
|
+
import type { Glyph } from './icon.js';
|
|
4
5
|
import { type RowEntry } from './settings-controls.js';
|
|
5
6
|
export interface SectionEntry {
|
|
6
7
|
id: string;
|
|
7
8
|
title: string;
|
|
8
9
|
icon: Glyph;
|
|
9
10
|
rows: RowEntry[];
|
|
11
|
+
/** The part it is in; default `general`. */
|
|
12
|
+
group?: WebSettingsGroup;
|
|
13
|
+
/** A setting of pi's files, of the user or of the project: under the scope of its part (Part.lead). */
|
|
14
|
+
scoped?: boolean;
|
|
10
15
|
}
|
|
11
16
|
export interface Part {
|
|
12
17
|
id: string;
|
|
13
18
|
title: string;
|
|
14
19
|
sections: SectionEntry[];
|
|
15
|
-
/** Drawn above its sections
|
|
20
|
+
/** Drawn above its sections that are `scoped`, whatever the search, and on a phone above each: the scope of the settings of ta. */
|
|
16
21
|
lead?: React.ReactNode;
|
|
17
22
|
}
|
|
18
23
|
/** What a row of the settings opens over them. */
|
|
@@ -1,77 +1,33 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TaDelegateUtil } from '@celljs/ta-protocol';
|
|
2
|
+
import { Compass, Languages, Link2, List, Palette, Smile, Volume2, Wrench } from 'lucide-react';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { useDevice } from '../device/device.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { useNotices, useSettings, useSettingsServer, useWebExtensions, useWorkbench } from '../hooks.js';
|
|
7
|
-
import { useLanguage, useT } from '../i18n/use-t.js';
|
|
5
|
+
import { useSettings, useSettingsServer, useWebExtensions, useWorkbench } from '../hooks.js';
|
|
6
|
+
import { useT } from '../i18n/use-t.js';
|
|
8
7
|
import { AGENT_SETTINGS_GROUPS, AgentSettingsUtil } from '../settings/agent-settings.js';
|
|
9
8
|
import { CHAT_ARCHIVE_CHOICES, CHAT_FOLD_CHOICES, MAX_TASKS_CHOICES } from '../settings/settings-protocol.js';
|
|
10
9
|
import { Voice } from '../util/voice.js';
|
|
11
|
-
import { WorkbenchUtil } from '../workbench-util.js';
|
|
12
|
-
import { AccessSettings, useAccess } from './access-view.js';
|
|
13
10
|
import { AgentControl, ScopeBar, useAgentSettings } from './agent-settings-view.js';
|
|
14
11
|
import { useNavigation } from './app-nav.js';
|
|
15
|
-
import { BusyMark } from './busy.js';
|
|
16
|
-
import { EnvironmentSettings, useGateway } from './environment-view.js';
|
|
17
|
-
import { Icon, IconButton } from './icon.js';
|
|
18
|
-
import { useLaunchRows } from './launch-settings.js';
|
|
19
12
|
import { SettingsModelPicker } from './model-picker.js';
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import { ChoiceRow, EmptyRow, Keys, Row, row, Segmented, Switch } from './settings-controls.js';
|
|
24
|
-
import { SignInSetupSettings, useSignInConfig } from './sign-in-setup.js';
|
|
13
|
+
import { FONT_SIZES, GROUP_ICONS, LANGUAGES, navigationRows, SETTINGS_GROUPS, THEMES } from './settings-choices.js';
|
|
14
|
+
import { ChoiceRow, Row, row, Segmented, Switch } from './settings-controls.js';
|
|
15
|
+
import { useMoreSections } from './settings-more.js';
|
|
25
16
|
import { TrustedDomains } from './trusted-domains.js';
|
|
26
17
|
import { VoicePicker } from './voice-picker.js';
|
|
27
|
-
import {
|
|
18
|
+
import { VoiceServices } from './voice-services.js';
|
|
28
19
|
/** The sections of the page and of ta, by part, with their rows. */
|
|
29
20
|
export function useParts(scope, onScope, onClose, onDialog) {
|
|
30
21
|
var _a;
|
|
31
22
|
const t = useT();
|
|
32
|
-
const language = useLanguage();
|
|
33
23
|
const [{ settings }, store] = useSettings();
|
|
34
24
|
const settingsServer = useSettingsServer();
|
|
35
|
-
const [workbench
|
|
36
|
-
const [{
|
|
25
|
+
const [workbench] = useWorkbench();
|
|
26
|
+
const [{ cwd, views }] = useWebExtensions();
|
|
37
27
|
const navigation = useNavigation(views);
|
|
38
|
-
const packageList = usePackages();
|
|
39
|
-
const builtinPackages = packageList.packages.filter(pkg => pkg.origin === 'builtin');
|
|
40
28
|
const agent = useAgentSettings(cwd !== null && cwd !== void 0 ? cwd : (_a = workbench.server) === null || _a === void 0 ? void 0 : _a.cwd);
|
|
41
|
-
const
|
|
42
|
-
const access = useAccess();
|
|
43
|
-
const signInConfig = useSignInConfig();
|
|
44
|
-
const gateway = useGateway();
|
|
45
|
-
const restartTa = useRestartTa();
|
|
46
|
-
// As the menu of the account (useAccountEntries): a finger has no keys to learn; a phone is not the computer
|
|
47
|
-
// that pairs phones, and signs out at the foot of Me.
|
|
48
|
-
const touch = useDevice(device => device.touch);
|
|
29
|
+
const more = useMoreSections(onClose, onDialog);
|
|
49
30
|
const handheld = useDevice(device => device.handheld);
|
|
50
|
-
// What runs, one thing at a time: its control turns (Switch, IconButton busy), the others wait.
|
|
51
|
-
const [busy, setBusy] = React.useState();
|
|
52
|
-
const run = (key, action, done) => {
|
|
53
|
-
setBusy(key);
|
|
54
|
-
return action()
|
|
55
|
-
.then(() => done && notices.notify(done, { level: 'success' }))
|
|
56
|
-
.catch(error => notices.error(error))
|
|
57
|
-
.finally(() => setBusy(undefined));
|
|
58
|
-
};
|
|
59
|
-
const waits = (key) => busy !== undefined && busy !== key;
|
|
60
|
-
const remove = async (pkg) => {
|
|
61
|
-
const confirmed = await notices.confirm({
|
|
62
|
-
title: t('ta.packages.removeConfirm', { name: pkg.name }),
|
|
63
|
-
message: t('ta.packages.removeDetail'),
|
|
64
|
-
confirmLabel: t('ta.packages.remove'),
|
|
65
|
-
danger: true,
|
|
66
|
-
});
|
|
67
|
-
if (confirmed) {
|
|
68
|
-
void run(`remove:${pkg.id}`, () => packageList.remove(pkg), t('ta.packages.removed', { name: pkg.name }));
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
const toggleBuiltin = (name, on) => {
|
|
72
|
-
store.update({ builtinsOff: on ? settings.builtinsOff.filter(other => other !== name) : [...settings.builtinsOff, name] });
|
|
73
|
-
return run(`builtin:${name}`, () => host.refresh());
|
|
74
|
-
};
|
|
75
31
|
const web = [
|
|
76
32
|
{
|
|
77
33
|
id: 'appearance',
|
|
@@ -112,7 +68,7 @@ export function useParts(scope, onScope, onClose, onDialog) {
|
|
|
112
68
|
{
|
|
113
69
|
id: 'chats',
|
|
114
70
|
title: t('ta.settings.chats'),
|
|
115
|
-
icon:
|
|
71
|
+
icon: List,
|
|
116
72
|
rows: [
|
|
117
73
|
row('chat-fold', [t('ta.settings.chatFold'), t('ta.settings.chatFoldHint')], React.createElement(Row, { label: t('ta.settings.chatFold'), description: t('ta.settings.chatFoldHint'), stacked: true },
|
|
118
74
|
React.createElement(Segmented, { label: t('ta.settings.chatFold'), value: String(settings.chatFoldDays), choices: CHAT_FOLD_CHOICES.map(days => ({
|
|
@@ -139,7 +95,8 @@ export function useParts(scope, onScope, onClose, onDialog) {
|
|
|
139
95
|
{
|
|
140
96
|
id: 'assistant',
|
|
141
97
|
title: t('ta.settings.assistant'),
|
|
142
|
-
icon:
|
|
98
|
+
icon: Smile,
|
|
99
|
+
group: 'ta',
|
|
143
100
|
rows: [
|
|
144
101
|
row('assistant-model', [t('ta.settings.assistantModel'), t('ta.settings.assistantModelHint')], React.createElement(Row, { label: t('ta.settings.assistantModel'), description: t('ta.settings.assistantModelHint'), stacked: true },
|
|
145
102
|
React.createElement(SettingsModelPicker, { settings: settingsServer, label: t('ta.settings.assistantModel'), value: settings.assistantModel, onChange: assistantModel => store.update({ assistantModel }) }))),
|
|
@@ -152,6 +109,8 @@ export function useParts(scope, onScope, onClose, onDialog) {
|
|
|
152
109
|
value: String(count),
|
|
153
110
|
label: count === 0 ? t('ta.settings.maxTasksAny') : String(count),
|
|
154
111
|
})), onChange: value => store.update({ maxTasks: Number(value) }) }))),
|
|
112
|
+
row('delegate', [t('ta.settings.delegate'), t('ta.settings.delegateHint')], React.createElement(Row, { label: t('ta.settings.delegate'), description: t(`ta.settings.delegate.${settings.delegate}Hint`), stacked: true },
|
|
113
|
+
React.createElement(Segmented, { label: t('ta.settings.delegate'), value: settings.delegate, choices: TaDelegateUtil.LEVELS.map(level => ({ value: level, label: t(`ta.settings.delegate.${level}`) })), onChange: value => store.update({ delegate: TaDelegateUtil.parse(value) }) }))),
|
|
155
114
|
],
|
|
156
115
|
},
|
|
157
116
|
{
|
|
@@ -163,12 +122,17 @@ export function useParts(scope, onScope, onClose, onDialog) {
|
|
|
163
122
|
React.createElement(Switch, { label: t('ta.settings.speak'), checked: settings.speak, onChange: speak => store.update({ speak }) }))),
|
|
164
123
|
row('speakTalk', [t('ta.settings.speakTalk'), t('ta.settings.speakTalkHint')], React.createElement(Row, { label: t('ta.settings.speakTalk'), description: t('ta.settings.speakTalkHint') },
|
|
165
124
|
React.createElement(Switch, { label: t('ta.settings.speakTalk'), checked: settings.speakTalk, onChange: speakTalk => store.update({ speakTalk }) }))),
|
|
125
|
+
row('callCaptions', [t('ta.settings.callCaptions'), t('ta.settings.callCaptionsHint')], React.createElement(Row, { label: t('ta.settings.callCaptions'), description: t('ta.settings.callCaptionsHint') },
|
|
126
|
+
React.createElement(Switch, { label: t('ta.settings.callCaptions'), checked: settings.callCaptions, onChange: callCaptions => store.update({ callCaptions }) }))),
|
|
166
127
|
...(Voice.canSpeak()
|
|
167
128
|
? [
|
|
168
129
|
row('voiceName', [t('ta.settings.voiceName'), t('ta.settings.voiceNameHint')], React.createElement(Row, { label: t('ta.settings.voiceName'), description: t('ta.settings.voiceNameHint'), stacked: true },
|
|
169
130
|
React.createElement(VoicePicker, { value: settings.voice, onChange: voice => store.update({ voice }) }))),
|
|
170
131
|
]
|
|
171
132
|
: []),
|
|
133
|
+
row('voiceServices', [t('ta.voices.title'), t('ta.voices.titleHint'), 'realtime', 'voices.json'], React.createElement(React.Fragment, null,
|
|
134
|
+
React.createElement(Row, { label: t('ta.voices.title'), description: t('ta.voices.titleHint') }),
|
|
135
|
+
React.createElement(VoiceServices, null))),
|
|
172
136
|
],
|
|
173
137
|
},
|
|
174
138
|
];
|
|
@@ -184,6 +148,8 @@ export function useParts(scope, onScope, onClose, onDialog) {
|
|
|
184
148
|
id: group.id,
|
|
185
149
|
title: t(group.title),
|
|
186
150
|
icon: (_a = GROUP_ICONS[group.id]) !== null && _a !== void 0 ? _a : Wrench,
|
|
151
|
+
group: 'ta',
|
|
152
|
+
scoped: true,
|
|
187
153
|
rows: snapshot
|
|
188
154
|
? group.keys.flatMap(key => {
|
|
189
155
|
const spec = AgentSettingsUtil.spec(key);
|
|
@@ -199,197 +165,13 @@ export function useParts(scope, onScope, onClose, onDialog) {
|
|
|
199
165
|
})
|
|
200
166
|
: [],
|
|
201
167
|
}); });
|
|
202
|
-
//
|
|
203
|
-
const
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
};
|
|
211
|
-
const more = [
|
|
212
|
-
{
|
|
213
|
-
id: 'packages',
|
|
214
|
-
title: t('ta.packages'),
|
|
215
|
-
icon: Puzzle,
|
|
216
|
-
rows: [
|
|
217
|
-
row('packages', [t('ta.packages'), t('ta.packages.hint')], React.createElement(Row, { label: t('ta.packages.installed'), description: t('ta.packages.hint') },
|
|
218
|
-
React.createElement("button", { type: "button", className: busy === 'reload' ? 'ta-button ta-busy' : 'ta-button', "aria-busy": busy === 'reload' || undefined, disabled: waits('reload'), onClick: () => void run('reload', reload, t('ta.packages.reloaded')) },
|
|
219
|
-
React.createElement(Icon, { icon: RefreshCw, size: 14 }),
|
|
220
|
-
" ",
|
|
221
|
-
t('ta.packages.reload'),
|
|
222
|
-
React.createElement(BusyMark, { busy: busy === 'reload' })))),
|
|
223
|
-
...packages.map(pkg => {
|
|
224
|
-
const error = failure(pkg);
|
|
225
|
-
const { title, summary, icon } = packageLabel(pkg, language);
|
|
226
|
-
return row(`package:${pkg.id}`, [title, summary, pkg.name, t('ta.packages')], React.createElement(Row, { icon: icon, label: title, description: error
|
|
227
|
-
? t('ta.packages.failed', { error })
|
|
228
|
-
: [summary, t(pkg.scope === 'project' ? 'ta.packages.scope.project' : 'ta.packages.scope.user')].filter(Boolean).join(' · ') },
|
|
229
|
-
React.createElement(IconButton, { icon: Trash2, label: t('ta.packages.remove'), busy: busy === `remove:${pkg.id}`, disabled: waits(`remove:${pkg.id}`), onClick: () => void remove(pkg) }),
|
|
230
|
-
React.createElement(Switch, { label: title, checked: pkg.enabled, disabled: waits(`toggle:${pkg.id}`), onChange: on => run(`toggle:${pkg.id}`, () => packageList.toggle(pkg, on)) })));
|
|
231
|
-
}),
|
|
232
|
-
...(packages.length === 0
|
|
233
|
-
? [row('packages:none', [t('ta.packages.none')], React.createElement(EmptyRow, { title: t('ta.packages.none'), hint: t('ta.packages.noneHint') }))]
|
|
234
|
-
: []),
|
|
235
|
-
...launchRows,
|
|
236
|
-
],
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
id: 'builtin',
|
|
240
|
-
title: t('ta.packages.builtinTitle'),
|
|
241
|
-
icon: Blocks,
|
|
242
|
-
rows: [
|
|
243
|
-
// The console only for administrators of a gateway, where it shows.
|
|
244
|
-
...host.builtins
|
|
245
|
-
.filter(builtin => { var _a; return !builtin.gatewayAdmin || ((_a = gateway.info) === null || _a === void 0 ? void 0 : _a.admin); })
|
|
246
|
-
.map(builtin => { var _a; return row(`web:${builtin.name}`, [t(builtin.title), t(builtin.description), t('ta.packages.builtinTitle')], React.createElement(Row, { icon: (_a = builtin.icon) !== null && _a !== void 0 ? _a : Puzzle, label: t(builtin.title), description: t(builtin.description) },
|
|
247
|
-
React.createElement(Switch, { label: t(builtin.title), checked: !settings.builtinsOff.includes(builtin.name), onChange: on => toggleBuiltin(builtin.name, on) }))); }),
|
|
248
|
-
...builtinPackages.map(info => {
|
|
249
|
-
const { title, summary, icon } = packageLabel(info, language);
|
|
250
|
-
return row(`builtin:${info.name}`, [title, summary, info.name, t('ta.packages.builtinTitle')], React.createElement(Row, { icon: icon, label: title, description: summary },
|
|
251
|
-
React.createElement(Switch, { label: title, checked: info.enabled, onChange: on => run(`toggle:${info.id}`, () => packageList.toggle(info, on)) })));
|
|
252
|
-
}),
|
|
253
|
-
],
|
|
254
|
-
},
|
|
255
|
-
...settingsSections.map(extensionSection),
|
|
256
|
-
// Behind a gateway only: where the Ta of this account runs.
|
|
257
|
-
...(gateway.info
|
|
258
|
-
? [
|
|
259
|
-
{
|
|
260
|
-
id: 'environment',
|
|
261
|
-
title: t('ta.environment.title'),
|
|
262
|
-
icon: Cloud,
|
|
263
|
-
rows: [
|
|
264
|
-
row('environment', [t('ta.environment.title'), t('ta.environment.whereHint'), 'sandbox', 'docker'], React.createElement(EnvironmentSettings, { info: gateway.info, onChange: gateway.read })),
|
|
265
|
-
],
|
|
266
|
-
},
|
|
267
|
-
]
|
|
268
|
-
: []),
|
|
269
|
-
// The ways to sign in for the owner (those invited use them too); who may sign in only where accounts can, or could.
|
|
270
|
-
...(signInConfig.config || (access.info && (access.info.providers.length > 0 || access.info.accounts.length > 0))
|
|
271
|
-
? [
|
|
272
|
-
{
|
|
273
|
-
id: 'access',
|
|
274
|
-
title: t('ta.access.title'),
|
|
275
|
-
icon: ShieldCheck,
|
|
276
|
-
rows: [
|
|
277
|
-
...(signInConfig.config
|
|
278
|
-
? [
|
|
279
|
-
row('sign-in', [t('ta.signInSetup.title'), t('ta.signInSetup.hint'), 'github', 'google', 'wechat', 'oidc', 'sso'], React.createElement(SignInSetupSettings, { config: signInConfig.config, onChange: () => Promise.all([signInConfig.read(), access.read()]) })),
|
|
280
|
-
]
|
|
281
|
-
: []),
|
|
282
|
-
...(access.info && (access.info.providers.length > 0 || access.info.accounts.length > 0)
|
|
283
|
-
? [
|
|
284
|
-
row('access', [t('ta.access.title'), t('ta.access.addHint'), 'github', 'google', 'wechat'], React.createElement(AccessSettings, { info: access.info, onChange: access.read })),
|
|
285
|
-
]
|
|
286
|
-
: []),
|
|
287
|
-
],
|
|
288
|
-
},
|
|
289
|
-
]
|
|
290
|
-
: []),
|
|
291
|
-
{
|
|
292
|
-
id: 'remote',
|
|
293
|
-
title: t('ta.remote.title'),
|
|
294
|
-
icon: Server,
|
|
295
|
-
rows: [row('remote', [t('ta.remote.title'), t('ta.remote.description'), 'ssh'], React.createElement(RemoteHosts, null))],
|
|
296
|
-
},
|
|
297
|
-
// Behind a gateway the relays are the gateway's business, not the tenant's.
|
|
298
|
-
...(gateway.info
|
|
299
|
-
? []
|
|
300
|
-
: [
|
|
301
|
-
{
|
|
302
|
-
id: 'relays',
|
|
303
|
-
title: t('ta.relays.title'),
|
|
304
|
-
icon: RefreshCw,
|
|
305
|
-
rows: [row('relays', [t('ta.relays.title'), t('ta.relays.addHint'), 'relay', 'relays.json'], React.createElement(RelayServices, null))],
|
|
306
|
-
},
|
|
307
|
-
]),
|
|
308
|
-
...(touch
|
|
309
|
-
? []
|
|
310
|
-
: [
|
|
311
|
-
{
|
|
312
|
-
id: 'shortcuts',
|
|
313
|
-
title: t('ta.settings.shortcuts'),
|
|
314
|
-
icon: Keyboard,
|
|
315
|
-
rows: SHORTCUTS.map(shortcut => row(`key:${shortcut.keys}`, [t(shortcut.label), shortcut.keys, t('ta.settings.shortcuts')], React.createElement(Row, { label: t(shortcut.label) },
|
|
316
|
-
React.createElement(Keys, { keys: shortcut.keys })))),
|
|
317
|
-
},
|
|
318
|
-
]),
|
|
319
|
-
{
|
|
320
|
-
id: 'about',
|
|
321
|
-
title: t('ta.settings.about'),
|
|
322
|
-
icon: Info,
|
|
323
|
-
rows: workbench.server
|
|
324
|
-
? [
|
|
325
|
-
row('version', [t('ta.settings.version'), 'version'], React.createElement(Row, { label: t('ta.settings.version'), description: restartTa.update && t('ta.update.ready', { version: ServeRestartUtil.label(restartTa.update) }) },
|
|
326
|
-
React.createElement("span", { className: "ta-path" }, ServeRestartUtil.label(workbench.server)))),
|
|
327
|
-
...(restartTa.can
|
|
328
|
-
? [
|
|
329
|
-
row('restart', [t('ta.restart'), t('ta.restart.description'), 'restart', 'update'], React.createElement(Row, { label: t('ta.restart'), description: t('ta.restart.description') },
|
|
330
|
-
React.createElement("button", { type: "button", className: `ta-button${restartTa.update ? ' ta-primary' : ''}`, disabled: restartTa.restarting, onClick: () => void restartTa.restart() },
|
|
331
|
-
restartTa.restarting ? React.createElement("span", { className: "ta-spinner" }) : React.createElement(Icon, { icon: RotateCw, size: 15 }),
|
|
332
|
-
' ',
|
|
333
|
-
t('ta.restart.button')))),
|
|
334
|
-
]
|
|
335
|
-
: []),
|
|
336
|
-
row('cwd', [t('ta.settings.cwd'), workbench.server.cwd], React.createElement(Row, { label: t('ta.settings.cwd'), description: t('ta.settings.cwdDescription', { path: workbench.server.cwd }) },
|
|
337
|
-
React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('directory') },
|
|
338
|
-
React.createElement(Icon, { icon: FolderOpen, size: 15 }),
|
|
339
|
-
" ",
|
|
340
|
-
t('ta.settings.cwdChange')))),
|
|
341
|
-
row('accounts', [t('ta.settings.accounts'), t('ta.settings.accountsDescription')], React.createElement(Row, { label: t('ta.settings.accounts'), description: t('ta.settings.accountsDescription') },
|
|
342
|
-
React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('accounts') },
|
|
343
|
-
React.createElement(Icon, { icon: KeyRound, size: 15 }),
|
|
344
|
-
" ",
|
|
345
|
-
t('ta.settings.manageAccounts')))),
|
|
346
|
-
...(WorkbenchUtil.isApp() || handheld
|
|
347
|
-
? []
|
|
348
|
-
: [
|
|
349
|
-
row('relay', [t('ta.settings.relay'), t('ta.settings.relayDescription')], React.createElement(Row, { label: t('ta.settings.relay'), description: t('ta.settings.relayDescription') },
|
|
350
|
-
React.createElement("button", { type: "button", className: "ta-button", onClick: () => onDialog('relay') },
|
|
351
|
-
React.createElement(Icon, { icon: Smartphone, size: 15 }),
|
|
352
|
-
" ",
|
|
353
|
-
t('ta.settings.manageAccounts')))),
|
|
354
|
-
]),
|
|
355
|
-
...(handheld
|
|
356
|
-
? []
|
|
357
|
-
: [
|
|
358
|
-
row('signOut', [t('ta.settings.signOut')], React.createElement(Row, { label: t('ta.settings.signOut') },
|
|
359
|
-
React.createElement("button", { type: "button", className: "ta-button ta-danger", onClick: () => {
|
|
360
|
-
onClose();
|
|
361
|
-
bench.signOut();
|
|
362
|
-
} },
|
|
363
|
-
React.createElement(Icon, { icon: LogOut, size: 15 }),
|
|
364
|
-
" ",
|
|
365
|
-
t('ta.settings.signOut')))),
|
|
366
|
-
]),
|
|
367
|
-
]
|
|
368
|
-
: [],
|
|
369
|
-
},
|
|
370
|
-
];
|
|
371
|
-
return [
|
|
372
|
-
{ id: 'web', title: t('ta.settings.web'), sections: web },
|
|
373
|
-
{ id: 'agent', title: t('ta.settings.agent'), sections: ta, lead },
|
|
374
|
-
{ id: 'more', title: t('ta.settings.more'), sections: more },
|
|
375
|
-
];
|
|
376
|
-
}
|
|
377
|
-
/** A section an extension added (WebExtensionAPI.registerSettings): its rows as Ta's, each control in a boundary of its own. */
|
|
378
|
-
function extensionSection({ id, section }) {
|
|
379
|
-
var _a;
|
|
380
|
-
const title = WebLabelUtil.text(section.title);
|
|
381
|
-
return {
|
|
382
|
-
id: `extension-${id.replace(/[^\w-]+/g, '-')}`,
|
|
383
|
-
title,
|
|
384
|
-
icon: (_a = section.icon) !== null && _a !== void 0 ? _a : Puzzle,
|
|
385
|
-
rows: section.rows.map(item => {
|
|
386
|
-
const label = WebLabelUtil.text(item.label);
|
|
387
|
-
const description = item.description === undefined ? undefined : WebLabelUtil.text(item.description);
|
|
388
|
-
const Control = item.render;
|
|
389
|
-
return row(`${id}/${item.key}`, [label, description, title, item.search === undefined ? undefined : WebLabelUtil.text(item.search)], React.createElement(Row, { label: label, description: description, stacked: item.stacked },
|
|
390
|
-
React.createElement(ExtensionBoundary, { name: title, resetKey: Control },
|
|
391
|
-
React.createElement(Control, null))));
|
|
392
|
-
}),
|
|
393
|
-
};
|
|
168
|
+
// Ta's scoped sections first in its part, under their scope; each part's own sections before those of extensions.
|
|
169
|
+
const sections = [...web.filter(entry => entry.group !== 'ta'), ...ta, ...web.filter(entry => entry.group === 'ta'), ...more];
|
|
170
|
+
return SETTINGS_GROUPS.map(group => ({
|
|
171
|
+
id: group.id,
|
|
172
|
+
title: t(group.title),
|
|
173
|
+
sections: sections.filter(entry => { var _a; return ((_a = entry.group) !== null && _a !== void 0 ? _a : 'general') === group.id; }),
|
|
174
|
+
...(group.id === 'ta' ? { lead } : {}),
|
|
175
|
+
})).filter(part => part.sections.length > 0);
|
|
394
176
|
}
|
|
395
177
|
//# sourceMappingURL=settings-parts.js.map
|