@peers-app/peers-ui 0.14.0 → 0.15.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/.github/workflows/publish.yml +8 -5
- package/babel.config.js +4 -4
- package/biome.json +191 -0
- package/dist/command-palette/command-palette-ui.d.ts +1 -2
- package/dist/command-palette/command-palette-ui.js +175 -244
- package/dist/command-palette/command-palette.js +65 -64
- package/dist/components/chat-overlay.d.ts +2 -2
- package/dist/components/chat-overlay.js +160 -217
- package/dist/components/checkbox.d.ts +5 -4
- package/dist/components/checkbox.js +4 -7
- package/dist/components/group-switcher.d.ts +1 -2
- package/dist/components/group-switcher.js +119 -159
- package/dist/components/input-date.d.ts +3 -3
- package/dist/components/input-date.js +6 -6
- package/dist/components/input-number.d.ts +7 -6
- package/dist/components/input-number.js +25 -20
- package/dist/components/input.d.ts +5 -4
- package/dist/components/input.js +4 -7
- package/dist/components/inverse-lazy-list.d.ts +3 -3
- package/dist/components/inverse-lazy-list.js +13 -47
- package/dist/components/io-schema-values.d.ts +5 -6
- package/dist/components/io-schema-values.js +28 -65
- package/dist/components/io-schema.d.ts +4 -5
- package/dist/components/io-schema.js +42 -79
- package/dist/components/lazy-list.d.ts +3 -3
- package/dist/components/lazy-list.js +38 -58
- package/dist/components/list-screen.d.ts +3 -8
- package/dist/components/list-screen.js +28 -23
- package/dist/components/loading-indicator.d.ts +1 -2
- package/dist/components/loading-indicator.js +2 -6
- package/dist/components/markdown-editor/autolink-plugin.js +5 -8
- package/dist/components/markdown-editor/editor-inline.d.ts +2 -3
- package/dist/components/markdown-editor/editor-inline.js +2 -6
- package/dist/components/markdown-editor/editor.d.ts +6 -6
- package/dist/components/markdown-editor/editor.js +9 -19
- package/dist/components/markdown-editor/markdown-plugin.d.ts +1 -1
- package/dist/components/markdown-editor/markdown-plugin.js +20 -21
- package/dist/components/markdown-editor/mention-node.d.ts +2 -2
- package/dist/components/markdown-editor/mention-node.js +24 -24
- package/dist/components/markdown-editor/mentions-plugin.d.ts +2 -2
- package/dist/components/markdown-editor/mentions-plugin.js +61 -62
- package/dist/components/markdown-editor/theme.js +28 -28
- package/dist/components/markdown-editor/toolbar.d.ts +2 -3
- package/dist/components/markdown-editor/toolbar.js +32 -49
- package/dist/components/markdown-with-mentions.d.ts +1 -1
- package/dist/components/markdown-with-mentions.js +43 -43
- package/dist/components/message-logs/message-logs.d.ts +1 -2
- package/dist/components/message-logs/message-logs.js +91 -116
- package/dist/components/messages/avatar.d.ts +3 -4
- package/dist/components/messages/avatar.js +37 -46
- package/dist/components/messages/channel-message-list.d.ts +5 -6
- package/dist/components/messages/channel-message-list.js +34 -34
- package/dist/components/messages/channel-view.d.ts +1 -2
- package/dist/components/messages/channel-view.js +23 -57
- package/dist/components/messages/message-compose.d.ts +3 -4
- package/dist/components/messages/message-compose.js +27 -38
- package/dist/components/messages/message-display.d.ts +2 -3
- package/dist/components/messages/message-display.js +42 -95
- package/dist/components/messages/thread-message-list.d.ts +4 -5
- package/dist/components/messages/thread-message-list.js +29 -29
- package/dist/components/router.d.ts +1 -2
- package/dist/components/router.js +58 -66
- package/dist/components/save-button.d.ts +3 -3
- package/dist/components/save-button.js +23 -33
- package/dist/components/sortable-list.d.ts +11 -12
- package/dist/components/sortable-list.js +42 -22
- package/dist/components/tabs.d.ts +3 -3
- package/dist/components/tabs.js +16 -47
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/tooltip.js +4 -9
- package/dist/components/trust-level-badge.d.ts +2 -3
- package/dist/components/trust-level-badge.js +16 -16
- package/dist/components/trust-level-dropdown.d.ts +3 -4
- package/dist/components/trust-level-dropdown.js +32 -55
- package/dist/components/typeahead.d.ts +3 -3
- package/dist/components/typeahead.js +48 -89
- package/dist/components/voice-indicator.d.ts +2 -2
- package/dist/components/voice-indicator.js +93 -106
- package/dist/components/voice-subscribe-events.d.ts +32 -0
- package/dist/components/voice-subscribe-events.js +2 -0
- package/dist/globals.d.ts +3 -5
- package/dist/globals.js +22 -33
- package/dist/hooks.d.ts +5 -5
- package/dist/hooks.js +22 -12
- package/dist/hooks.test.js +129 -145
- package/dist/index.d.ts +9 -8
- package/dist/index.js +13 -12
- package/dist/mention-configs.d.ts +2 -2
- package/dist/mention-configs.js +55 -42
- package/dist/screens/assistants/assistant-config.d.ts +2 -3
- package/dist/screens/assistants/assistant-config.js +9 -22
- package/dist/screens/assistants/assistant-details.d.ts +1 -2
- package/dist/screens/assistants/assistant-details.js +13 -28
- package/dist/screens/assistants/assistant-info.d.ts +2 -3
- package/dist/screens/assistants/assistant-info.js +3 -17
- package/dist/screens/assistants/assistant-list.d.ts +1 -2
- package/dist/screens/assistants/assistant-list.js +15 -56
- package/dist/screens/assistants/assistant-tools.d.ts +2 -3
- package/dist/screens/assistants/assistant-tools.js +10 -24
- package/dist/screens/console-logs/console-logs-list.d.ts +1 -2
- package/dist/screens/console-logs/console-logs-list.js +130 -134
- package/dist/screens/console-logs/log-display.d.ts +2 -3
- package/dist/screens/console-logs/log-display.js +40 -42
- package/dist/screens/console-logs/log-filters.d.ts +1 -2
- package/dist/screens/console-logs/log-filters.js +2 -24
- package/dist/screens/console-logs/mobile-log-card.d.ts +2 -3
- package/dist/screens/console-logs/mobile-log-card.js +64 -67
- package/dist/screens/console-logs/resizable-table-header.d.ts +1 -2
- package/dist/screens/console-logs/resizable-table-header.js +31 -67
- package/dist/screens/contacts/contact-details.d.ts +1 -2
- package/dist/screens/contacts/contact-details.js +16 -46
- package/dist/screens/contacts/contact-list.d.ts +1 -2
- package/dist/screens/contacts/contact-list.js +44 -103
- package/dist/screens/contacts/index.d.ts +4 -4
- package/dist/screens/contacts/index.js +1 -1
- package/dist/screens/contacts/user-connect.d.ts +1 -2
- package/dist/screens/contacts/user-connect.js +85 -186
- package/dist/screens/data-explorer/data-explorer.d.ts +1 -2
- package/dist/screens/data-explorer/data-explorer.js +61 -181
- package/dist/screens/data-explorer/index.d.ts +2 -2
- package/dist/screens/data-explorer/query-executor.d.ts +1 -2
- package/dist/screens/data-explorer/query-executor.js +56 -166
- package/dist/screens/groups/group-details.d.ts +1 -2
- package/dist/screens/groups/group-details.js +27 -122
- package/dist/screens/groups/group-invite-listener.d.ts +2 -3
- package/dist/screens/groups/group-invite-listener.js +8 -104
- package/dist/screens/groups/group-list.d.ts +1 -2
- package/dist/screens/groups/group-list.js +56 -133
- package/dist/screens/groups/group-members.d.ts +2 -3
- package/dist/screens/groups/group-members.js +62 -132
- package/dist/screens/groups/index.d.ts +4 -4
- package/dist/screens/groups/index.js +1 -1
- package/dist/screens/join-group/index.d.ts +2 -2
- package/dist/screens/join-group/join-group.d.ts +1 -2
- package/dist/screens/join-group/join-group.js +9 -109
- package/dist/screens/network-viewer/connection-troubleshooter.d.ts +2 -3
- package/dist/screens/network-viewer/connection-troubleshooter.js +89 -193
- package/dist/screens/network-viewer/cpu-usage-graph.d.ts +1 -2
- package/dist/screens/network-viewer/cpu-usage-graph.js +60 -99
- package/dist/screens/network-viewer/device-details-modal.d.ts +1 -2
- package/dist/screens/network-viewer/device-details-modal.js +25 -177
- package/dist/screens/network-viewer/group-details-modal.d.ts +1 -2
- package/dist/screens/network-viewer/group-details-modal.js +31 -142
- package/dist/screens/network-viewer/index.d.ts +4 -4
- package/dist/screens/network-viewer/index.js +3 -3
- package/dist/screens/network-viewer/network-viewer-ipc.d.ts +22 -0
- package/dist/screens/network-viewer/network-viewer-ipc.js +6 -0
- package/dist/screens/network-viewer/network-viewer.d.ts +1 -2
- package/dist/screens/network-viewer/network-viewer.js +91 -296
- package/dist/screens/network-viewer/usage-graph.d.ts +1 -2
- package/dist/screens/network-viewer/usage-graph.js +78 -110
- package/dist/screens/packages/package-details.d.ts +1 -2
- package/dist/screens/packages/package-details.js +35 -41
- package/dist/screens/packages/package-info.d.ts +2 -2
- package/dist/screens/packages/package-info.js +33 -86
- package/dist/screens/packages/package-list.d.ts +1 -2
- package/dist/screens/packages/package-list.js +42 -106
- package/dist/screens/packages/package-new-local.d.ts +1 -2
- package/dist/screens/packages/package-new-local.js +13 -19
- package/dist/screens/packages/package-versions.d.ts +2 -3
- package/dist/screens/packages/package-versions.js +29 -96
- package/dist/screens/peer-types/peer-type-details.d.ts +3 -4
- package/dist/screens/peer-types/peer-type-details.js +26 -78
- package/dist/screens/peer-types/peer-type-list.d.ts +1 -2
- package/dist/screens/peer-types/peer-type-list.js +13 -24
- package/dist/screens/search/global-search.d.ts +1 -2
- package/dist/screens/search/global-search.js +104 -182
- package/dist/screens/settings/color-mode-dropdown.d.ts +3 -4
- package/dist/screens/settings/color-mode-dropdown.js +18 -37
- package/dist/screens/settings/settings-page.d.ts +1 -1
- package/dist/screens/settings/settings-page.js +86 -213
- package/dist/screens/settings/voice-settings-agent.d.ts +1 -1
- package/dist/screens/settings/voice-settings-agent.js +7 -44
- package/dist/screens/settings/voice-settings-api-keys.d.ts +2 -2
- package/dist/screens/settings/voice-settings-api-keys.js +2 -29
- package/dist/screens/settings/voice-settings-output.d.ts +2 -2
- package/dist/screens/settings/voice-settings-output.js +2 -40
- package/dist/screens/settings/voice-settings-providers.d.ts +2 -2
- package/dist/screens/settings/voice-settings-providers.js +2 -19
- package/dist/screens/settings/voice-settings-types.d.ts +4 -4
- package/dist/screens/settings/voice-settings-types.js +31 -31
- package/dist/screens/settings/voice-settings-wake-word.d.ts +2 -2
- package/dist/screens/settings/voice-settings-wake-word.js +2 -33
- package/dist/screens/settings/voice-settings.d.ts +1 -1
- package/dist/screens/settings/voice-settings.js +35 -112
- package/dist/screens/setup-user.d.ts +1 -2
- package/dist/screens/setup-user.js +38 -116
- package/dist/screens/tools/tool-code.d.ts +2 -3
- package/dist/screens/tools/tool-code.js +9 -13
- package/dist/screens/tools/tool-details.d.ts +1 -2
- package/dist/screens/tools/tool-details.js +26 -39
- package/dist/screens/tools/tool-info.d.ts +2 -3
- package/dist/screens/tools/tool-info.js +9 -48
- package/dist/screens/tools/tool-list.d.ts +1 -2
- package/dist/screens/tools/tool-list.js +33 -65
- package/dist/screens/tools/tool-schema.d.ts +2 -3
- package/dist/screens/tools/tool-schema.js +2 -13
- package/dist/screens/tools/tool-test-details.d.ts +1 -2
- package/dist/screens/tools/tool-test-details.js +12 -28
- package/dist/screens/tools/tool-test-list.d.ts +1 -2
- package/dist/screens/tools/tool-test-list.js +17 -56
- package/dist/screens/variables/variable-details.d.ts +1 -2
- package/dist/screens/variables/variable-details.js +19 -86
- package/dist/screens/variables/variable-list.d.ts +1 -2
- package/dist/screens/variables/variable-list.js +16 -27
- package/dist/screens/welcome-modal.d.ts +1 -2
- package/dist/screens/welcome-modal.js +44 -111
- package/dist/screens/workflows/workflow-details.d.ts +1 -2
- package/dist/screens/workflows/workflow-details.js +17 -31
- package/dist/screens/workflows/workflow-info.d.ts +2 -3
- package/dist/screens/workflows/workflow-info.js +2 -9
- package/dist/screens/workflows/workflow-instructions.d.ts +2 -3
- package/dist/screens/workflows/workflow-instructions.js +23 -55
- package/dist/screens/workflows/workflow-list.d.ts +1 -2
- package/dist/screens/workflows/workflow-list.js +23 -62
- package/dist/setupTests.d.ts +1 -1
- package/dist/setupTests.js +10 -11
- package/dist/system-apps/assistants.app.d.ts +1 -1
- package/dist/system-apps/assistants.app.js +3 -3
- package/dist/system-apps/console-logs.app.d.ts +1 -1
- package/dist/system-apps/console-logs.app.js +3 -3
- package/dist/system-apps/contacts.app.d.ts +1 -1
- package/dist/system-apps/contacts.app.js +4 -4
- package/dist/system-apps/data-explorer.app.d.ts +1 -1
- package/dist/system-apps/data-explorer.app.js +4 -4
- package/dist/system-apps/groups.app.d.ts +1 -1
- package/dist/system-apps/groups.app.js +4 -4
- package/dist/system-apps/index.d.ts +17 -17
- package/dist/system-apps/index.js +52 -52
- package/dist/system-apps/join-group.app.d.ts +1 -1
- package/dist/system-apps/join-group.app.js +4 -4
- package/dist/system-apps/mobile-settings.app.d.ts +1 -1
- package/dist/system-apps/mobile-settings.app.js +3 -3
- package/dist/system-apps/network-viewer.app.d.ts +1 -1
- package/dist/system-apps/network-viewer.app.js +4 -4
- package/dist/system-apps/packages.app.d.ts +1 -1
- package/dist/system-apps/packages.app.js +3 -3
- package/dist/system-apps/search.app.d.ts +1 -1
- package/dist/system-apps/search.app.js +4 -4
- package/dist/system-apps/settings.app.d.ts +1 -1
- package/dist/system-apps/settings.app.js +3 -3
- package/dist/system-apps/threads.app.d.ts +1 -1
- package/dist/system-apps/threads.app.js +3 -3
- package/dist/system-apps/tools.app.d.ts +1 -1
- package/dist/system-apps/tools.app.js +3 -3
- package/dist/system-apps/types.app.d.ts +1 -1
- package/dist/system-apps/types.app.js +3 -3
- package/dist/system-apps/variables.app.d.ts +1 -1
- package/dist/system-apps/variables.app.js +3 -3
- package/dist/system-apps/workflows.app.d.ts +1 -1
- package/dist/system-apps/workflows.app.js +3 -3
- package/dist/tabs-layout/tabs-layout.d.ts +2 -3
- package/dist/tabs-layout/tabs-layout.js +215 -246
- package/dist/tabs-layout/tabs-state.d.ts +2 -2
- package/dist/tabs-layout/tabs-state.js +73 -61
- package/dist/ui-defaults/index.d.ts +2 -2
- package/dist/ui-defaults/list-screen.d.ts +2 -3
- package/dist/ui-defaults/list-screen.js +33 -37
- package/dist/ui-defaults/markdown-field.js +24 -56
- package/dist/ui-router/routes-loader.d.ts +1 -1
- package/dist/ui-router/routes-loader.js +17 -13
- package/dist/ui-router/ui-loader.d.ts +6 -6
- package/dist/ui-router/ui-loader.js +172 -268
- package/dist/utils.js +49 -39
- package/jest.config.js +16 -16
- package/package.json +16 -14
- package/src/command-palette/command-palette-ui.tsx +261 -237
- package/src/command-palette/command-palette.ts +81 -78
- package/src/components/chat-overlay.tsx +366 -261
- package/src/components/checkbox.tsx +15 -12
- package/src/components/group-switcher.tsx +150 -105
- package/src/components/input-date.tsx +17 -16
- package/src/components/input-number.tsx +47 -31
- package/src/components/input.tsx +15 -12
- package/src/components/inverse-lazy-list.tsx +14 -13
- package/src/components/io-schema-values.tsx +51 -69
- package/src/components/io-schema.tsx +94 -69
- package/src/components/lazy-list.tsx +51 -34
- package/src/components/list-screen.tsx +51 -35
- package/src/components/loading-indicator.tsx +2 -4
- package/src/components/markdown-editor/autolink-plugin.tsx +4 -11
- package/src/components/markdown-editor/editor-inline.tsx +3 -4
- package/src/components/markdown-editor/editor.tsx +53 -51
- package/src/components/markdown-editor/markdown-plugin.tsx +48 -40
- package/src/components/markdown-editor/mention-node.ts +39 -38
- package/src/components/markdown-editor/mentions-plugin.tsx +99 -101
- package/src/components/markdown-editor/theme.ts +28 -29
- package/src/components/markdown-editor/toolbar.tsx +53 -47
- package/src/components/markdown-with-mentions.tsx +56 -46
- package/src/components/message-logs/message-logs.tsx +225 -165
- package/src/components/messages/avatar.tsx +70 -52
- package/src/components/messages/channel-message-list.tsx +80 -68
- package/src/components/messages/channel-view.tsx +34 -33
- package/src/components/messages/message-compose.tsx +84 -67
- package/src/components/messages/message-display.tsx +103 -89
- package/src/components/messages/thread-message-list.tsx +53 -44
- package/src/components/router.tsx +42 -43
- package/src/components/save-button.tsx +43 -39
- package/src/components/sortable-list.tsx +77 -49
- package/src/components/tabs.tsx +31 -31
- package/src/components/tooltip.tsx +21 -28
- package/src/components/trust-level-badge.tsx +15 -11
- package/src/components/trust-level-dropdown.tsx +49 -19
- package/src/components/typeahead.tsx +57 -59
- package/src/components/voice-indicator.tsx +158 -141
- package/src/components/voice-subscribe-events.ts +20 -0
- package/src/globals.tsx +42 -40
- package/src/hooks.test.tsx +141 -134
- package/src/hooks.ts +80 -48
- package/src/index.tsx +17 -10
- package/src/mention-configs.ts +122 -68
- package/src/screens/assistants/assistant-config.tsx +28 -18
- package/src/screens/assistants/assistant-details.tsx +35 -36
- package/src/screens/assistants/assistant-info.tsx +16 -11
- package/src/screens/assistants/assistant-list.tsx +37 -34
- package/src/screens/assistants/assistant-tools.tsx +41 -20
- package/src/screens/console-logs/console-logs-list.tsx +173 -140
- package/src/screens/console-logs/log-display.tsx +65 -38
- package/src/screens/console-logs/log-filters.tsx +4 -3
- package/src/screens/console-logs/mobile-log-card.tsx +78 -71
- package/src/screens/console-logs/resizable-table-header.tsx +29 -21
- package/src/screens/contacts/contact-details.tsx +29 -30
- package/src/screens/contacts/contact-list.tsx +71 -60
- package/src/screens/contacts/index.ts +5 -5
- package/src/screens/contacts/user-connect.tsx +177 -171
- package/src/screens/data-explorer/data-explorer.tsx +134 -98
- package/src/screens/data-explorer/index.ts +2 -3
- package/src/screens/data-explorer/query-executor.tsx +90 -80
- package/src/screens/groups/group-details.tsx +120 -101
- package/src/screens/groups/group-invite-listener.tsx +34 -37
- package/src/screens/groups/group-list.tsx +119 -103
- package/src/screens/groups/group-members.tsx +225 -164
- package/src/screens/groups/index.ts +5 -6
- package/src/screens/join-group/index.ts +2 -2
- package/src/screens/join-group/join-group.tsx +41 -39
- package/src/screens/network-viewer/connection-troubleshooter.tsx +145 -104
- package/src/screens/network-viewer/cpu-usage-graph.tsx +39 -43
- package/src/screens/network-viewer/device-details-modal.tsx +46 -59
- package/src/screens/network-viewer/group-details-modal.tsx +68 -49
- package/src/screens/network-viewer/index.ts +4 -5
- package/src/screens/network-viewer/network-viewer-ipc.ts +23 -0
- package/src/screens/network-viewer/network-viewer.tsx +261 -236
- package/src/screens/network-viewer/usage-graph.tsx +57 -49
- package/src/screens/packages/package-details.tsx +43 -35
- package/src/screens/packages/package-info.tsx +107 -66
- package/src/screens/packages/package-list.tsx +175 -98
- package/src/screens/packages/package-new-local.tsx +28 -26
- package/src/screens/packages/package-versions.tsx +102 -77
- package/src/screens/peer-types/peer-type-details.tsx +60 -50
- package/src/screens/peer-types/peer-type-list.tsx +20 -30
- package/src/screens/search/global-search.tsx +153 -137
- package/src/screens/settings/color-mode-dropdown.tsx +52 -35
- package/src/screens/settings/settings-page.tsx +215 -141
- package/src/screens/settings/voice-settings-agent.tsx +13 -12
- package/src/screens/settings/voice-settings-api-keys.tsx +14 -12
- package/src/screens/settings/voice-settings-output.tsx +12 -11
- package/src/screens/settings/voice-settings-providers.tsx +7 -3
- package/src/screens/settings/voice-settings-types.ts +52 -49
- package/src/screens/settings/voice-settings-wake-word.tsx +25 -9
- package/src/screens/settings/voice-settings.tsx +66 -43
- package/src/screens/setup-user.tsx +88 -41
- package/src/screens/tools/tool-code.tsx +12 -17
- package/src/screens/tools/tool-details.tsx +28 -28
- package/src/screens/tools/tool-info.tsx +14 -19
- package/src/screens/tools/tool-list.tsx +58 -40
- package/src/screens/tools/tool-schema.tsx +16 -9
- package/src/screens/tools/tool-test-details.tsx +11 -22
- package/src/screens/tools/tool-test-list.tsx +29 -30
- package/src/screens/variables/variable-details.tsx +63 -51
- package/src/screens/variables/variable-list.tsx +29 -30
- package/src/screens/welcome-modal.tsx +68 -48
- package/src/screens/workflows/workflow-details.tsx +40 -30
- package/src/screens/workflows/workflow-info.tsx +4 -11
- package/src/screens/workflows/workflow-instructions.tsx +35 -28
- package/src/screens/workflows/workflow-list.tsx +50 -40
- package/src/setupTests.ts +14 -13
- package/src/system-apps/assistants.app.ts +5 -5
- package/src/system-apps/console-logs.app.ts +4 -4
- package/src/system-apps/contacts.app.ts +6 -6
- package/src/system-apps/data-explorer.app.ts +5 -5
- package/src/system-apps/groups.app.ts +6 -6
- package/src/system-apps/index.ts +49 -49
- package/src/system-apps/join-group.app.ts +5 -5
- package/src/system-apps/mobile-settings.app.ts +4 -5
- package/src/system-apps/network-viewer.app.ts +5 -5
- package/src/system-apps/packages.app.ts +5 -5
- package/src/system-apps/search.app.ts +6 -6
- package/src/system-apps/settings.app.ts +5 -5
- package/src/system-apps/threads.app.ts +5 -5
- package/src/system-apps/tools.app.ts +5 -5
- package/src/system-apps/types.app.ts +5 -5
- package/src/system-apps/variables.app.ts +5 -5
- package/src/system-apps/workflows.app.ts +5 -5
- package/src/tabs-layout/tabs-layout.tsx +345 -254
- package/src/tabs-layout/tabs-state.ts +100 -81
- package/src/ui-defaults/index.ts +2 -3
- package/src/ui-defaults/list-screen.tsx +45 -40
- package/src/ui-defaults/markdown-field.tsx +22 -26
- package/src/ui-router/routes-loader.ts +40 -24
- package/src/ui-router/ui-loader.tsx +312 -214
- package/src/utils.ts +68 -81
- package/tsconfig.json +5 -10
- package/dist/components/input-datetime.d.ts +0 -7
- package/dist/components/input-datetime.js +0 -35
- package/dist/components/lazy-sortable-list.d.ts +0 -29
- package/dist/components/lazy-sortable-list.js +0 -12
- package/dist/components/left-bar.d.ts +0 -5
- package/dist/components/left-bar.js +0 -207
- package/dist/components/main-content-container.d.ts +0 -2
- package/dist/components/main-content-container.js +0 -92
- package/dist/components/messages/thread-view.d.ts +0 -6
- package/dist/components/messages/thread-view.js +0 -174
- package/dist/components/off-canvas.d.ts +0 -13
- package/dist/components/off-canvas.js +0 -89
- package/dist/components/text-list-editor.tsx/text-list-editor.d.ts +0 -6
- package/dist/components/text-list-editor.tsx/text-list-editor.js +0 -13
- package/dist/components/top-bar.d.ts +0 -2
- package/dist/components/top-bar.js +0 -51
- package/dist/components/typeahead/mentions-plugin.d.ts +0 -7
- package/dist/components/typeahead/mentions-plugin.js +0 -203
- package/dist/components/typeahead/typeahead-editor.d.ts +0 -15
- package/dist/components/typeahead/typeahead-editor.js +0 -134
- package/dist/components/typeahead/typeahead.d.ts +0 -12
- package/dist/components/typeahead/typeahead.js +0 -94
- package/dist/screens/profile.d.ts +0 -2
- package/dist/screens/profile.js +0 -76
- package/src/components/input-datetime.tsx +0 -41
- package/src/components/lazy-sortable-list.tsx +0 -51
- package/src/components/left-bar.tsx +0 -322
- package/src/components/main-content-container.tsx +0 -79
- package/src/components/messages/thread-view.tsx +0 -214
- package/src/components/off-canvas.tsx +0 -83
- package/src/components/text-list-editor.tsx/text-list-editor.tsx +0 -13
- package/src/components/top-bar.tsx +0 -119
- package/src/components/typeahead/mentions-plugin.tsx +0 -265
- package/src/components/typeahead/typeahead-editor.tsx +0 -140
- package/src/components/typeahead/typeahead.tsx +0 -77
- package/src/screens/profile.tsx +0 -75
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
checkQRCodeCompatibility,
|
|
3
|
+
copyToClipboard,
|
|
4
|
+
Groups,
|
|
5
|
+
generateGroupShare,
|
|
6
|
+
getIconClassName,
|
|
7
|
+
getUserContext,
|
|
8
|
+
type IDoc,
|
|
9
|
+
type IGroup,
|
|
10
|
+
type Observable,
|
|
11
|
+
rpcServerCalls,
|
|
12
|
+
sleep,
|
|
13
|
+
} from "@peers-app/peers-sdk";
|
|
14
|
+
import { useState } from "react";
|
|
3
15
|
import { Checkbox } from "../../components/checkbox";
|
|
4
16
|
import { Input } from "../../components/input";
|
|
5
17
|
import { LoadingIndicator } from "../../components/loading-indicator";
|
|
@@ -16,36 +28,39 @@ interface IProps {
|
|
|
16
28
|
}
|
|
17
29
|
|
|
18
30
|
export const GroupDetails = (props: IProps) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
const group = usePromise(
|
|
32
|
+
async () => {
|
|
33
|
+
const userContext = await getUserContext();
|
|
34
|
+
const userGroupTable = Groups(userContext.userDataContext);
|
|
35
|
+
const group = await userGroupTable.get(props.groupId);
|
|
36
|
+
if (!group) {
|
|
37
|
+
throw new Error("Group not found");
|
|
38
|
+
}
|
|
39
|
+
updateActiveTabTitle(group.name || "Group");
|
|
40
|
+
const groupDoc = userGroupTable.initDoc(group);
|
|
41
|
+
// saves go to both the group and user db
|
|
42
|
+
groupDoc.save = async () => {
|
|
43
|
+
const groupDataContext = userContext.getDataContext(group.groupId);
|
|
44
|
+
const groupGroupTable = Groups(groupDataContext);
|
|
45
|
+
const groupData = groupDoc.toJS();
|
|
46
|
+
await groupGroupTable.signAndSave(groupData);
|
|
47
|
+
await userGroupTable.signAndSave(groupData);
|
|
48
|
+
return groupDoc.load();
|
|
49
|
+
};
|
|
50
|
+
const originalDelete = groupDoc.delete;
|
|
51
|
+
groupDoc.delete = async () => {
|
|
52
|
+
const deleteResult = await originalDelete();
|
|
53
|
+
userContext.defaultDataContext(userContext.userDataContext);
|
|
54
|
+
await sleep(100);
|
|
55
|
+
await rpcServerCalls.flushDatabases();
|
|
56
|
+
window.location.reload();
|
|
57
|
+
return deleteResult;
|
|
58
|
+
};
|
|
59
|
+
return groupDoc;
|
|
60
|
+
},
|
|
61
|
+
undefined,
|
|
62
|
+
[props.groupId],
|
|
63
|
+
);
|
|
49
64
|
|
|
50
65
|
if (!group) {
|
|
51
66
|
return <LoadingIndicator />;
|
|
@@ -53,7 +68,6 @@ export const GroupDetails = (props: IProps) => {
|
|
|
53
68
|
|
|
54
69
|
return (
|
|
55
70
|
<div className="container-fluid p-3">
|
|
56
|
-
|
|
57
71
|
<div className="d-flex">
|
|
58
72
|
<div>
|
|
59
73
|
<h4>
|
|
@@ -64,18 +78,15 @@ export const GroupDetails = (props: IProps) => {
|
|
|
64
78
|
<h4>
|
|
65
79
|
<Input
|
|
66
80
|
key={group.groupId}
|
|
67
|
-
className=
|
|
68
|
-
style={{ width:
|
|
81
|
+
className="border border-0"
|
|
82
|
+
style={{ width: "100%", outline: "none", backgroundColor: "transparent" }}
|
|
69
83
|
value={group.qs.name}
|
|
70
84
|
/>
|
|
71
85
|
</h4>
|
|
72
86
|
</div>
|
|
73
87
|
<div className="d-flex gap-2">
|
|
74
88
|
<ShareButton groupId={props.groupId} />
|
|
75
|
-
<SaveButton
|
|
76
|
-
key={group.groupId}
|
|
77
|
-
doc={group}
|
|
78
|
-
/>
|
|
89
|
+
<SaveButton key={group.groupId} doc={group} />
|
|
79
90
|
</div>
|
|
80
91
|
</div>
|
|
81
92
|
|
|
@@ -83,31 +94,34 @@ export const GroupDetails = (props: IProps) => {
|
|
|
83
94
|
key={group.groupId}
|
|
84
95
|
tabs={[
|
|
85
96
|
{
|
|
86
|
-
name:
|
|
97
|
+
name: "Info",
|
|
98
|
+
content: (
|
|
87
99
|
<ScreenTabBody>
|
|
88
100
|
<GroupInfo group={group} />
|
|
89
101
|
</ScreenTabBody>
|
|
102
|
+
),
|
|
90
103
|
},
|
|
91
104
|
{
|
|
92
|
-
name:
|
|
105
|
+
name: "Members",
|
|
106
|
+
content: (
|
|
93
107
|
<ScreenTabBody>
|
|
94
108
|
<GroupMembersWrapper groupId={props.groupId} />
|
|
95
109
|
</ScreenTabBody>
|
|
110
|
+
),
|
|
96
111
|
},
|
|
97
112
|
]}
|
|
98
113
|
/>
|
|
99
114
|
</div>
|
|
100
|
-
)
|
|
101
|
-
}
|
|
115
|
+
);
|
|
116
|
+
};
|
|
102
117
|
|
|
103
118
|
const GroupInfo = (props: { group: IDoc<IGroup> }) => {
|
|
104
|
-
const { group } = props
|
|
119
|
+
const { group } = props;
|
|
105
120
|
|
|
106
|
-
group.description = group.description ||
|
|
121
|
+
group.description = group.description || "";
|
|
107
122
|
|
|
108
123
|
return (
|
|
109
124
|
<div>
|
|
110
|
-
|
|
111
125
|
<small>Name:</small>
|
|
112
126
|
<Input
|
|
113
127
|
value={group.qs.name}
|
|
@@ -125,73 +139,70 @@ const GroupInfo = (props: { group: IDoc<IGroup> }) => {
|
|
|
125
139
|
/>
|
|
126
140
|
|
|
127
141
|
<small>Group ID:</small>
|
|
128
|
-
<div
|
|
142
|
+
<div
|
|
143
|
+
className="form-control mb-3 p-2 bg-body-secondary text-body-secondary"
|
|
144
|
+
style={{ fontFamily: "monospace", fontSize: "0.9em" }}
|
|
145
|
+
>
|
|
129
146
|
{group.groupId}
|
|
130
147
|
</div>
|
|
131
148
|
|
|
132
149
|
<div className="d-flex flex-row">
|
|
133
150
|
<div className="ms-2">
|
|
134
151
|
<label className="form-label small mt-2 me-2">Disabled:</label>
|
|
135
|
-
<Checkbox
|
|
136
|
-
className="form-check-input mt-2"
|
|
137
|
-
checked={group.qs.disabled}
|
|
138
|
-
/>
|
|
152
|
+
<Checkbox className="form-check-input mt-2" checked={group.qs.disabled} />
|
|
139
153
|
</div>
|
|
140
154
|
</div>
|
|
141
155
|
|
|
142
156
|
<br />
|
|
143
157
|
|
|
144
158
|
<small className="mt-2">Description:</small>
|
|
145
|
-
<MarkdownEditorInline
|
|
146
|
-
value={group.qs.description as Observable<string>}
|
|
147
|
-
/>
|
|
148
|
-
|
|
159
|
+
<MarkdownEditorInline value={group.qs.description as Observable<string>} />
|
|
149
160
|
</div>
|
|
150
|
-
)
|
|
151
|
-
}
|
|
161
|
+
);
|
|
162
|
+
};
|
|
152
163
|
|
|
153
164
|
const ShareButton = ({ groupId }: { groupId: string }) => {
|
|
154
165
|
const [isSharing, setIsSharing] = useState(false);
|
|
155
166
|
const [shareResult, setShareResult] = useState<{
|
|
156
167
|
success: boolean;
|
|
157
168
|
message: string;
|
|
158
|
-
qrInfo?:
|
|
169
|
+
qrInfo?: ReturnType<typeof checkQRCodeCompatibility>;
|
|
159
170
|
} | null>(null);
|
|
160
171
|
|
|
161
172
|
const handleShare = async () => {
|
|
162
173
|
setIsSharing(true);
|
|
163
174
|
setShareResult(null);
|
|
164
|
-
|
|
175
|
+
|
|
165
176
|
try {
|
|
166
177
|
// Generate the group share data
|
|
167
178
|
const groupShare = await generateGroupShare(groupId);
|
|
168
|
-
|
|
179
|
+
|
|
169
180
|
// Check QR code compatibility
|
|
170
181
|
const qrInfo = checkQRCodeCompatibility(groupShare, 20);
|
|
171
|
-
|
|
182
|
+
|
|
172
183
|
// Convert to JSON
|
|
173
184
|
const groupShareJson = JSON.stringify(groupShare, null, 2);
|
|
174
|
-
|
|
185
|
+
|
|
175
186
|
// Copy to clipboard
|
|
176
187
|
const copied = await copyToClipboard(groupShareJson);
|
|
177
|
-
|
|
188
|
+
|
|
178
189
|
if (copied) {
|
|
179
190
|
setShareResult({
|
|
180
191
|
success: true,
|
|
181
192
|
message: `Group share data copied to clipboard! (${qrInfo.size} chars, ${qrInfo.memberCount} admin members)`,
|
|
182
|
-
qrInfo
|
|
193
|
+
qrInfo,
|
|
183
194
|
});
|
|
184
195
|
} else {
|
|
185
196
|
setShareResult({
|
|
186
197
|
success: false,
|
|
187
|
-
message:
|
|
188
|
-
qrInfo
|
|
198
|
+
message: "Failed to copy to clipboard. Please copy manually from the modal.",
|
|
199
|
+
qrInfo,
|
|
189
200
|
});
|
|
190
201
|
}
|
|
191
|
-
} catch (error:
|
|
202
|
+
} catch (error: unknown) {
|
|
192
203
|
setShareResult({
|
|
193
204
|
success: false,
|
|
194
|
-
message: `Error generating share: ${error.message}`,
|
|
205
|
+
message: `Error generating share: ${error instanceof Error ? error.message : String(error)}`,
|
|
195
206
|
});
|
|
196
207
|
} finally {
|
|
197
208
|
setIsSharing(false);
|
|
@@ -200,7 +211,7 @@ const ShareButton = ({ groupId }: { groupId: string }) => {
|
|
|
200
211
|
|
|
201
212
|
return (
|
|
202
213
|
<>
|
|
203
|
-
<button
|
|
214
|
+
<button
|
|
204
215
|
className="btn btn-secondary btn-sm"
|
|
205
216
|
onClick={handleShare}
|
|
206
217
|
disabled={isSharing}
|
|
@@ -208,7 +219,11 @@ const ShareButton = ({ groupId }: { groupId: string }) => {
|
|
|
208
219
|
>
|
|
209
220
|
{isSharing ? (
|
|
210
221
|
<>
|
|
211
|
-
<span
|
|
222
|
+
<span
|
|
223
|
+
className="spinner-border spinner-border-sm me-1"
|
|
224
|
+
role="status"
|
|
225
|
+
aria-hidden="true"
|
|
226
|
+
></span>
|
|
212
227
|
Sharing...
|
|
213
228
|
</>
|
|
214
229
|
) : (
|
|
@@ -218,64 +233,68 @@ const ShareButton = ({ groupId }: { groupId: string }) => {
|
|
|
218
233
|
</>
|
|
219
234
|
)}
|
|
220
235
|
</button>
|
|
221
|
-
|
|
236
|
+
|
|
222
237
|
{shareResult && (
|
|
223
|
-
<div
|
|
224
|
-
|
|
225
|
-
|
|
238
|
+
<div
|
|
239
|
+
className="position-fixed top-0 start-0 w-100 h-100 d-flex align-items-center justify-content-center"
|
|
240
|
+
style={{ backgroundColor: "rgba(0,0,0,0.5)", zIndex: 1050 }}
|
|
241
|
+
>
|
|
242
|
+
<div className="card" style={{ maxWidth: "500px", width: "90%" }}>
|
|
226
243
|
<div className="card-header d-flex justify-content-between align-items-center">
|
|
227
244
|
<h6 className="mb-0">
|
|
228
|
-
<i
|
|
229
|
-
|
|
245
|
+
<i
|
|
246
|
+
className={`bi-${shareResult.success ? "check-circle text-success" : "exclamation-triangle text-warning"} me-2`}
|
|
247
|
+
></i>
|
|
248
|
+
Group Share {shareResult.success ? "Ready" : "Error"}
|
|
230
249
|
</h6>
|
|
231
|
-
<button
|
|
232
|
-
className="btn-close"
|
|
250
|
+
<button
|
|
251
|
+
className="btn-close"
|
|
233
252
|
onClick={() => setShareResult(null)}
|
|
234
253
|
aria-label="Close"
|
|
235
254
|
></button>
|
|
236
255
|
</div>
|
|
237
256
|
<div className="card-body">
|
|
238
257
|
<p className="mb-3">{shareResult.message}</p>
|
|
239
|
-
|
|
258
|
+
|
|
240
259
|
{shareResult.qrInfo && (
|
|
241
260
|
<div className="mb-3">
|
|
242
261
|
<h6>QR Code Compatibility</h6>
|
|
243
262
|
<div className="row g-2">
|
|
244
263
|
<div className="col-6">
|
|
245
|
-
<small className="text-muted">Size:</small
|
|
264
|
+
<small className="text-muted">Size:</small>
|
|
265
|
+
<br />
|
|
246
266
|
<strong>{shareResult.qrInfo.size} chars</strong>
|
|
247
267
|
</div>
|
|
248
268
|
<div className="col-6">
|
|
249
|
-
<small className="text-muted">QR Version 20:</small
|
|
250
|
-
<
|
|
251
|
-
|
|
269
|
+
<small className="text-muted">QR Version 20:</small>
|
|
270
|
+
<br />
|
|
271
|
+
<span
|
|
272
|
+
className={`badge bg-${shareResult.qrInfo.fits ? "success" : "warning"}`}
|
|
273
|
+
>
|
|
274
|
+
{shareResult.qrInfo.fits ? "✓ Fits" : "⚠ Too Large"} (
|
|
275
|
+
{shareResult.qrInfo.usagePercent}%)
|
|
252
276
|
</span>
|
|
253
277
|
</div>
|
|
254
278
|
</div>
|
|
255
|
-
|
|
279
|
+
|
|
256
280
|
{!shareResult.qrInfo.fits && (
|
|
257
281
|
<div className="alert alert-warning mt-2 mb-0">
|
|
258
282
|
<small>
|
|
259
283
|
<i className="bi-exclamation-triangle me-1"></i>
|
|
260
|
-
Data may be too large for standard QR codes. Consider reducing admin members
|
|
284
|
+
Data may be too large for standard QR codes. Consider reducing admin members
|
|
285
|
+
or use text sharing.
|
|
261
286
|
</small>
|
|
262
287
|
</div>
|
|
263
288
|
)}
|
|
264
289
|
</div>
|
|
265
290
|
)}
|
|
266
|
-
|
|
291
|
+
|
|
267
292
|
<div className="text-end">
|
|
268
|
-
<button
|
|
269
|
-
className="btn btn-secondary me-2"
|
|
270
|
-
onClick={() => setShareResult(null)}
|
|
271
|
-
>
|
|
293
|
+
<button className="btn btn-secondary me-2" onClick={() => setShareResult(null)}>
|
|
272
294
|
Close
|
|
273
295
|
</button>
|
|
274
296
|
{shareResult.success && (
|
|
275
|
-
<button
|
|
276
|
-
className="btn btn-primary"
|
|
277
|
-
onClick={handleShare}
|
|
278
|
-
>
|
|
297
|
+
<button className="btn btn-primary" onClick={handleShare}>
|
|
279
298
|
Copy Again
|
|
280
299
|
</button>
|
|
281
300
|
)}
|
|
@@ -293,10 +312,10 @@ const GroupMembersWrapper = (props: { groupId: string }) => {
|
|
|
293
312
|
if (!userContext) return null;
|
|
294
313
|
|
|
295
314
|
return <GroupMembersUI groupId={props.groupId} userContext={userContext} />;
|
|
296
|
-
}
|
|
315
|
+
};
|
|
297
316
|
|
|
298
317
|
registerInternalPeersUI({
|
|
299
|
-
peersUIId:
|
|
318
|
+
peersUIId: "00group00details00component",
|
|
300
319
|
component: GroupDetails,
|
|
301
320
|
routes: [
|
|
302
321
|
{
|
|
@@ -308,8 +327,8 @@ registerInternalPeersUI({
|
|
|
308
327
|
}
|
|
309
328
|
return false;
|
|
310
329
|
},
|
|
311
|
-
uiCategory:
|
|
312
|
-
priority: 2
|
|
313
|
-
}
|
|
314
|
-
]
|
|
315
|
-
})
|
|
330
|
+
uiCategory: "screen",
|
|
331
|
+
priority: 2,
|
|
332
|
+
},
|
|
333
|
+
],
|
|
334
|
+
});
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Component for admins to prepare group invitations and manage join requests.
|
|
3
|
-
*
|
|
3
|
+
*
|
|
4
4
|
* Shows in the group details Members tab for users with Admin role or above.
|
|
5
|
-
*
|
|
5
|
+
*
|
|
6
6
|
* Communicates with device layer through pvars (not direct imports).
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, { useState, useEffect, useCallback } from "react";
|
|
10
9
|
import {
|
|
10
|
+
copyToClipboard,
|
|
11
11
|
GroupMemberRole,
|
|
12
12
|
generateInvitePassword,
|
|
13
13
|
groupInviteListeners,
|
|
14
|
+
groupInviteProcessRequest,
|
|
14
15
|
groupInviteRequests,
|
|
15
|
-
groupInviteStatus,
|
|
16
16
|
groupInviteStartListening,
|
|
17
|
+
groupInviteStatus,
|
|
17
18
|
groupInviteStopListening,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
copyToClipboard,
|
|
21
|
-
UserContext,
|
|
19
|
+
type IGroupJoinRequest,
|
|
20
|
+
type UserContext,
|
|
22
21
|
} from "@peers-app/peers-sdk";
|
|
22
|
+
import { useCallback, useEffect, useState } from "react";
|
|
23
23
|
import { useObservable } from "../../hooks";
|
|
24
24
|
|
|
25
25
|
interface GroupInviteListenerProps {
|
|
@@ -44,7 +44,7 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
44
44
|
|
|
45
45
|
// Check if we're currently listening for this group
|
|
46
46
|
const currentListener = listeners?.[groupId];
|
|
47
|
-
const pendingRequests = (requests || []).filter(r => r.groupId === groupId);
|
|
47
|
+
const pendingRequests = (requests || []).filter((r) => r.groupId === groupId);
|
|
48
48
|
|
|
49
49
|
// Sync local state with listener state
|
|
50
50
|
useEffect(() => {
|
|
@@ -89,17 +89,20 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
89
89
|
}, [password]);
|
|
90
90
|
|
|
91
91
|
// Approve a join request (set pvar, device layer reacts)
|
|
92
|
-
const handleApprove = useCallback(
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
92
|
+
const handleApprove = useCallback(
|
|
93
|
+
(request: IGroupJoinRequest) => {
|
|
94
|
+
setProcessingRequestId(request.requestId);
|
|
95
|
+
// Set the action pvar - device layer will process it
|
|
96
|
+
groupInviteProcessRequest({
|
|
97
|
+
requestId: request.requestId,
|
|
98
|
+
approved: true,
|
|
99
|
+
role: approvalRole,
|
|
100
|
+
});
|
|
101
|
+
// Clear processing state after a short delay
|
|
102
|
+
setTimeout(() => setProcessingRequestId(null), 1000);
|
|
103
|
+
},
|
|
104
|
+
[approvalRole],
|
|
105
|
+
);
|
|
103
106
|
|
|
104
107
|
// Deny a join request (set pvar, device layer reacts)
|
|
105
108
|
const handleDeny = useCallback((request: IGroupJoinRequest) => {
|
|
@@ -108,7 +111,7 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
108
111
|
groupInviteProcessRequest({
|
|
109
112
|
requestId: request.requestId,
|
|
110
113
|
approved: false,
|
|
111
|
-
role: GroupMemberRole.None
|
|
114
|
+
role: GroupMemberRole.None,
|
|
112
115
|
});
|
|
113
116
|
// Clear processing state after a short delay
|
|
114
117
|
setTimeout(() => setProcessingRequestId(null), 1000);
|
|
@@ -125,9 +128,7 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
125
128
|
<div className="card-body">
|
|
126
129
|
{/* Password input and controls */}
|
|
127
130
|
<div className="mb-3">
|
|
128
|
-
<label className="form-label small text-muted">
|
|
129
|
-
Invitation Password
|
|
130
|
-
</label>
|
|
131
|
+
<label className="form-label small text-muted">Invitation Password</label>
|
|
131
132
|
<div className="input-group">
|
|
132
133
|
<input
|
|
133
134
|
type="text"
|
|
@@ -155,7 +156,8 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
155
156
|
</button>
|
|
156
157
|
</div>
|
|
157
158
|
<small className="text-muted">
|
|
158
|
-
Share this password with people you want to invite. They can enter it in the "Join
|
|
159
|
+
Share this password with people you want to invite. They can enter it in the "Join
|
|
160
|
+
Group" screen.
|
|
159
161
|
</small>
|
|
160
162
|
</div>
|
|
161
163
|
|
|
@@ -171,10 +173,7 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
171
173
|
Start Listening
|
|
172
174
|
</button>
|
|
173
175
|
) : (
|
|
174
|
-
<button
|
|
175
|
-
className="btn btn-danger"
|
|
176
|
-
onClick={handleStopListening}
|
|
177
|
-
>
|
|
176
|
+
<button className="btn btn-danger" onClick={handleStopListening}>
|
|
178
177
|
<i className="bi-stop-circle me-2" />
|
|
179
178
|
Stop Listening
|
|
180
179
|
</button>
|
|
@@ -190,7 +189,9 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
190
189
|
<div>
|
|
191
190
|
<strong>Listening for join requests</strong>
|
|
192
191
|
<br />
|
|
193
|
-
<small>
|
|
192
|
+
<small>
|
|
193
|
+
Password: <code>{password}</code>
|
|
194
|
+
</small>
|
|
194
195
|
</div>
|
|
195
196
|
</div>
|
|
196
197
|
)}
|
|
@@ -210,12 +211,10 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
210
211
|
<i className="bi-inbox-fill me-2" />
|
|
211
212
|
Pending Requests ({pendingRequests.length})
|
|
212
213
|
</h6>
|
|
213
|
-
|
|
214
|
+
|
|
214
215
|
{/* Role selector for approvals */}
|
|
215
216
|
<div className="mb-2">
|
|
216
|
-
<label className="form-label small text-muted">
|
|
217
|
-
Role for new members:
|
|
218
|
-
</label>
|
|
217
|
+
<label className="form-label small text-muted">Role for new members:</label>
|
|
219
218
|
<select
|
|
220
219
|
className="form-select form-select-sm"
|
|
221
220
|
value={approvalRole}
|
|
@@ -238,9 +237,7 @@ export const GroupInviteListener = (props: GroupInviteListenerProps) => {
|
|
|
238
237
|
<div>
|
|
239
238
|
<strong>{request.requester.name || request.requester.userId}</strong>
|
|
240
239
|
{request.requester.name && (
|
|
241
|
-
<small className="text-muted d-block">
|
|
242
|
-
{request.requester.userId}
|
|
243
|
-
</small>
|
|
240
|
+
<small className="text-muted d-block">{request.requester.userId}</small>
|
|
244
241
|
)}
|
|
245
242
|
</div>
|
|
246
243
|
</div>
|