fcr-ui-scene 3.4.2 → 3.4.3
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/lib/base.js +0 -3
- package/lib/common/device-store.d.ts +21 -11
- package/lib/common/device-store.js +228 -139
- package/lib/common/device-stream-store.d.ts +17 -3
- package/lib/common/device-stream-store.js +234 -82
- package/lib/common/event-store.d.ts +24 -8
- package/lib/common/event-store.js +48 -8
- package/lib/common/room-store.js +6 -6
- package/lib/common/security-store.d.ts +43 -25
- package/lib/common/security-store.js +313 -369
- package/lib/electron/app.js +1 -2
- package/lib/electron/bootstrap-dev.js +0 -2
- package/lib/electron/bootstrap-sdk.js +0 -2
- package/lib/electron/injections.js +0 -5
- package/lib/electron/tools.js +0 -4
- package/lib/electron/window.js +0 -2
- package/lib/fragments/control-bar/cloud-recording-buttons.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +45 -1
- package/lib/fragments/control-bar/control-bar-store.js +465 -83
- package/lib/fragments/control-bar/device/index.js +5 -3
- package/lib/fragments/control-bar/index.css +15 -10
- package/lib/fragments/control-bar/index.js +24 -0
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +31 -12
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +117 -16
- package/lib/fragments/control-bar/more-actions/index.css +53 -0
- package/lib/fragments/control-bar/more-actions/index.js +73 -38
- package/lib/fragments/control-bar/security-content/index.css +75 -0
- package/lib/fragments/control-bar/security-content/index.js +105 -19
- package/lib/fragments/control-bar/share-state-nav/index.js +1 -1
- package/lib/fragments/control-bar/view.js +23 -8
- package/lib/fragments/live-streaming/store.d.ts +1 -1
- package/lib/fragments/live-streaming/store.js +1 -1
- package/lib/fragments/live-streaming/view.js +4 -2
- package/lib/fragments/share-screen-selection/selection-store.d.ts +1 -1
- package/lib/fragments/share-screen-selection/selection-store.js +1 -1
- package/lib/fragments/share-screen-selection/view.js +20 -20
- package/lib/fragments/toolbar/components/eraser-picker.js +1 -1
- package/lib/fragments/toolbar/components/pen-picker.js +1 -1
- package/lib/fragments/toolbar/components/shape-picker.js +1 -1
- package/lib/fragments/toolbar/components/wrapper.js +1 -1
- package/lib/fragments/toolbar/hooks.js +1 -1
- package/lib/fragments/toolbar/store.d.ts +1 -1
- package/lib/modules/action-bar/action-bar-collapes-items.d.ts +4 -1
- package/lib/modules/action-bar/action-bar-collapes-items.js +31 -14
- package/lib/modules/action-bar/apps/useInterpreter.js +2 -4
- package/lib/modules/action-bar/chat/index.js +8 -8
- package/lib/modules/action-bar/components/apps/app-item/index.js +0 -2
- package/lib/modules/action-bar/components/apps/appitems.js +2 -5
- package/lib/modules/action-bar/components/apps/useAppItemOptions.js +0 -1
- package/lib/modules/action-bar/components/collapse/index.js +0 -4
- package/lib/modules/action-bar/components/item/index.js +0 -2
- package/lib/modules/action-bar/components/leave/index.js +0 -2
- package/lib/modules/action-bar/components/more/poppover-content.js +0 -4
- package/lib/modules/action-bar/components/notification-bar/components/interpreter/index.js +2 -1
- package/lib/modules/action-bar/components/notification-bar/index.js +0 -2
- package/lib/modules/action-bar/components/trigger-output-language/index.js +2 -1
- package/lib/modules/action-bar/components/trigger-subscribe-language/index.js +0 -3
- package/lib/modules/action-bar/device/index.css +7 -2
- package/lib/modules/action-bar/device/index.js +25 -25
- package/lib/modules/action-bar/leave/assign-host.d.ts +3 -0
- package/lib/modules/action-bar/leave/assign-host.js +2 -4
- package/lib/modules/action-bar/leave/index.css +10 -0
- package/lib/modules/action-bar/leave/index.js +84 -34
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +13 -1
- package/lib/modules/action-bar/leave/leave-meeting.js +37 -19
- package/lib/modules/action-bar/live-streaming/index.js +3 -3
- package/lib/modules/action-bar/more/index.js +5 -5
- package/lib/modules/action-bar/more/poppover-content.js +37 -16
- package/lib/modules/action-bar/participants/index.css +12 -0
- package/lib/modules/action-bar/participants/index.js +23 -16
- package/lib/modules/action-bar/record/index.js +4 -4
- package/lib/modules/action-bar/screen-share/index.js +9 -5
- package/lib/modules/action-bar/screen-share/submenu.js +20 -26
- package/lib/modules/action-bar/security/drop-menu.js +137 -22
- package/lib/modules/action-bar/security/index.js +11 -5
- package/lib/modules/action-bar/settings/index.js +4 -4
- package/lib/modules/action-bar/smaller.js +4 -4
- package/lib/modules/action-bar/store.js +0 -6
- package/lib/modules/action-bar/switch-output-language-room/index.js +8 -2
- package/lib/modules/audio-stream/index.js +0 -3
- package/lib/modules/chat/chat-bar/index.css +1 -0
- package/lib/modules/chat/chat-bar/index.d.ts +3 -3
- package/lib/modules/chat/chat-bar/index.js +47 -37
- package/lib/modules/chat/chat-room-store.js +0 -4
- package/lib/modules/chat/chat-select/index.css +21 -4
- package/lib/modules/chat/chat-select/index.d.ts +1 -1
- package/lib/modules/chat/chat-select/index.js +3 -3
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +194 -127
- package/lib/modules/chat/components/chat-bar/index.js +0 -2
- package/lib/modules/chat/components/chat-select/index.js +0 -3
- package/lib/modules/chat/components/message-list/index.js +0 -2
- package/lib/modules/chat/message-list.js +64 -50
- package/lib/modules/chat/store.js +0 -1
- package/lib/modules/chat/view.js +0 -4
- package/lib/modules/components/device-control/components/audio-menu/index.js +2 -1
- package/lib/modules/components/device-control/components/video-menu/index.js +2 -1
- package/lib/modules/components/device-control/store.js +0 -1
- package/lib/modules/components/leave-meeting/store.js +0 -2
- package/lib/modules/components/member-window/index.js +0 -4
- package/lib/modules/components/security-menu/index.js +1 -4
- package/lib/modules/components/tab-frame/index.js +0 -4
- package/lib/modules/connection-gateway/components/phone/components/callinfo/index.js +2 -1
- package/lib/modules/connection-gateway/components/phone/index.js +2 -1
- package/lib/modules/connection-gateway/components/tabs/index.js +2 -1
- package/lib/modules/connection-gateway/store.js +0 -4
- package/lib/modules/control-bar/components/meeting-details/index.js +7 -15
- package/lib/modules/control-bar/components/more-actions/index.js +5 -17
- package/lib/modules/control-bar/index.js +0 -2
- package/lib/modules/control-bar/store.js +0 -4
- package/lib/modules/control-bar/view.js +0 -2
- package/lib/modules/device-pretest/settings/beauty.js +2 -1
- package/lib/modules/device-pretest/settings/virtual-background-setting.js +2 -1
- package/lib/modules/device-pretest/store.js +0 -2
- package/lib/modules/dialog/components/confirm/electron.d.ts +1 -1
- package/lib/modules/dialog/components/confirm/electron.js +38 -68
- package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
- package/lib/modules/dialog/components/dialog-container/component/body.js +0 -2
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +6 -3
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +1 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +14 -4
- package/lib/modules/dialog/components/system-preference/index.js +0 -2
- package/lib/modules/dialog/hooks/useElectron.js +0 -2
- package/lib/modules/dialog/index.js +0 -2
- package/lib/modules/dialog/store.js +0 -3
- package/lib/modules/dialog/view.js +2 -1
- package/lib/modules/event-confirm/store.js +0 -3
- package/lib/modules/event-confirm/view.js +2 -5
- package/lib/modules/event-toast/store.js +0 -2
- package/lib/modules/event-toast/view.js +2 -1
- package/lib/modules/{Interpreter → interpreter}/constant.d.ts +0 -4
- package/lib/modules/{Interpreter → interpreter}/constant.js +3 -45
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/index.js +2 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/index.js +2 -5
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.js +0 -2
- package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/index.js +0 -4
- package/lib/modules/{Interpreter → interpreter}/store.js +0 -5
- package/lib/modules/{Interpreter → interpreter}/utils.js +0 -1
- package/lib/modules/invite/components/pstn-invite.js +4 -13
- package/lib/modules/invite/enums.js +1 -0
- package/lib/modules/invite/pstn-invite.js +7 -9
- package/lib/modules/invite/store.d.ts +2 -0
- package/lib/modules/invite/store.js +7 -1
- package/lib/modules/invite/voip-invite.js +2 -3
- package/lib/modules/layout/components/Carousel.js +2 -1
- package/lib/modules/layout/components/Gallery.js +2 -2
- package/lib/modules/layout/components/Layout.js +4 -7
- package/lib/modules/layout/components/index.js +0 -1
- package/lib/modules/layout/member-window/index.css +95 -10
- package/lib/modules/layout/member-window/index.d.ts +10 -3
- package/lib/modules/layout/member-window/index.js +221 -110
- package/lib/modules/layout/store.js +0 -3
- package/lib/modules/layout/type.js +2 -0
- package/lib/modules/layout/video-window-datasource.js +0 -4
- package/lib/modules/live-streaming/store.js +0 -1
- package/lib/modules/notification/interpreter-status/index.js +2 -1
- package/lib/modules/offscreen-pulling/index.js +0 -1
- package/lib/modules/participant/attendee/index.js +0 -3
- package/lib/modules/participant/components/attendee/index.js +0 -3
- package/lib/modules/participant/components/drop-menu/index.js +0 -3
- package/lib/modules/participant/components/participants/index.js +0 -1
- package/lib/modules/participant/components/user-action/index.js +0 -2
- package/lib/modules/participant/index.js +0 -2
- package/lib/modules/participant/member-list-data-source.js +0 -3
- package/lib/modules/participant/room-control-drop-menu/index.css +37 -0
- package/lib/modules/participant/store.js +0 -5
- package/lib/modules/pc-audio-connect/store.js +0 -1
- package/lib/modules/phone-audio-connect/components/callinfo/index.js +2 -1
- package/lib/modules/phone-audio-connect/store.js +0 -3
- package/lib/modules/phone-audio-connect/view.js +2 -1
- package/lib/modules/setting/audio-settings/audio-settings.js +1 -1
- package/lib/modules/setting/minutes-settings/minutes-settings.js +2 -1
- package/lib/modules/setting/state/index.js +0 -4
- package/lib/modules/setting/store.js +4 -8
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/share-screen/components/selection/index.js +1 -1
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/selection/index.js +51 -40
- package/lib/modules/share-screen/share-state-bar/index.js +1 -1
- package/lib/modules/share-screen/store.js +0 -4
- package/lib/modules/sound-effect/index.js +0 -1
- package/lib/modules/state-bar/layout-config.js +2 -1
- package/lib/modules/state-bar/live-streaming-state.js +0 -1
- package/lib/modules/state-bar/meeting-details.js +29 -34
- package/lib/modules/state-bar/store.js +0 -1
- package/lib/modules/video-window/members/index.js +2 -1
- package/lib/modules/video-window/store.js +0 -4
- package/lib/modules/video-window/topControl/index.js +0 -2
- package/lib/modules/whiteboard/components/switch-theme/index.js +0 -2
- package/lib/modules/whiteboard/components/switch-theme/item.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/components/panel.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/color-picker/index.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/extra-tool-picker.js +1 -1
- package/lib/modules/whiteboard/components/toolbar/components/move-handle.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/components/pen-picker.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +2 -1
- package/lib/modules/whiteboard/components/toolbar/hooks/index.js +0 -2
- package/lib/modules/whiteboard/components/toolbar/index.js +1 -4
- package/lib/modules/whiteboard/index.js +0 -4
- package/lib/providers/device-privilege-provider.js +0 -2
- package/lib/providers/device-provider.js +0 -5
- package/lib/providers/device-stream-provider.js +0 -1
- package/lib/providers/dialog-provider.js +0 -2
- package/lib/providers/event-provider.js +0 -2
- package/lib/providers/interpreter-provider.js +0 -4
- package/lib/providers/message-provider.js +0 -2
- package/lib/providers/phone-audio-provider.js +0 -3
- package/lib/providers/privilege-provider.js +0 -4
- package/lib/providers/renderer-provider.js +0 -1
- package/lib/providers/room-provider.js +0 -3
- package/lib/providers/screen-share-provider.js +0 -1
- package/lib/scenes/main-scene.js +0 -2
- package/lib/shared-data-source/chat-data.js +0 -2
- package/lib/shared-data-source/interpreter.js +0 -2
- package/lib/shared-data-source/layout-data.js +1 -4
- package/lib/shared-data-source/setting.js +0 -2
- package/lib/shared-data-source/video-window.js +0 -4
- package/lib/shared-data-source/waiting-room.js +0 -1
- package/lib/translations/enUS.d.ts +5 -0
- package/lib/translations/enUS.js +9 -3
- package/lib/translations/zhCN.d.ts +5 -0
- package/lib/translations/zhCN.js +13 -7
- package/lib/type.js +14 -0
- package/lib/ui-scene.js +0 -2
- package/lib/utilities/constant.js +7 -0
- package/lib/utilities/extract.d.ts +1 -1
- package/lib/utilities/meeting-detail.d.ts +2 -0
- package/lib/utilities/meeting-detail.js +39 -0
- package/lib/utilities/privilege.js +0 -2
- package/lib/utilities/renderer-event.js +0 -2
- package/lib/utilities/renderer.js +0 -1
- package/lib/utilities/setting-config-storage.js +0 -2
- package/lib/utilities/tools.js +0 -3
- package/package.json +10 -5
- package/lib/ scenes/base.d.ts +0 -10
- package/lib/ scenes/base.js +0 -75
- package/lib/ scenes/main-scene.d.ts +0 -43
- package/lib/ scenes/main-scene.js +0 -368
- package/lib/ scenes/waiting-scene.d.ts +0 -31
- package/lib/ scenes/waiting-scene.js +0 -119
- package/lib/common/remote-renderer.d.ts +0 -15
- package/lib/common/remote-renderer.js +0 -138
- package/lib/common/type.d.ts +0 -8
- package/lib/common/type.js +0 -6
- package/lib/electron/bootstrap.d.ts +0 -1
- package/lib/electron/bootstrap.js +0 -56
- package/lib/electron/dev.d.ts +0 -1
- package/lib/electron/dev.js +0 -51
- package/lib/error-fallback.css +0 -62
- package/lib/error-fallback.d.ts +0 -2
- package/lib/error-fallback.js +0 -19
- package/lib/modules/Interpreter/context.d.ts +0 -2
- package/lib/modules/Interpreter/context.js +0 -9
- package/lib/modules/action-bar/components/device/index.css +0 -162
- package/lib/modules/action-bar/components/device/index.d.ts +0 -8
- package/lib/modules/action-bar/components/device/index.js +0 -611
- package/lib/modules/action-bar/components/item.d.ts +0 -27
- package/lib/modules/action-bar/components/item.js +0 -164
- package/lib/modules/action-bar/components/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/components/trigger-input-language-room/index.css +0 -86
- package/lib/modules/action-bar/components/trigger-input-language-room/index.d.ts +0 -3
- package/lib/modules/action-bar/components/trigger-input-language-room/index.js +0 -215
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.d.ts +0 -10
- package/lib/modules/action-bar/components/trigger-output-language-room/constant.js +0 -8
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.css +0 -22
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.d.ts +0 -3
- package/lib/modules/action-bar/components/trigger-output-language-room/guide-tooltip/index.js +0 -75
- package/lib/modules/action-bar/components/trigger-output-language-room/index.d.ts +0 -8
- package/lib/modules/action-bar/components/trigger-output-language-room/index.js +0 -98
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.d.ts +0 -5
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-language-room.js +0 -66
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.d.ts +0 -5
- package/lib/modules/action-bar/components/trigger-output-language-room/trigger-main-room.js +0 -37
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.d.ts +0 -12
- package/lib/modules/action-bar/components/trigger-output-language-room/useChangeOutputRoomTool.js +0 -138
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.css +0 -58
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.d.ts +0 -8
- package/lib/modules/action-bar/notification-bar/components/interpreter/index.js +0 -100
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.css +0 -56
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.d.ts +0 -5
- package/lib/modules/action-bar/notification-bar/components/virtual-image/index.js +0 -33
- package/lib/modules/action-bar/notification-bar/dome.png +0 -0
- package/lib/modules/action-bar/notification-bar/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/notification-bar/index.css +0 -74
- package/lib/modules/action-bar/notification-bar/index.d.ts +0 -2
- package/lib/modules/action-bar/notification-bar/index.js +0 -99
- package/lib/modules/action-bar/trigger-input-language-room/fcr_translateswitch.png +0 -0
- package/lib/modules/action-bar/trigger-input-language-room/index.css +0 -86
- package/lib/modules/action-bar/trigger-input-language-room/index.d.ts +0 -15
- package/lib/modules/action-bar/trigger-input-language-room/index.js +0 -220
- package/lib/modules/action-bar/trigger-output-language-room/constant.d.ts +0 -10
- package/lib/modules/action-bar/trigger-output-language-room/constant.js +0 -8
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.css +0 -22
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.d.ts +0 -14
- package/lib/modules/action-bar/trigger-output-language-room/guide-tooltip/index.js +0 -75
- package/lib/modules/action-bar/trigger-output-language-room/index.d.ts +0 -4
- package/lib/modules/action-bar/trigger-output-language-room/index.js +0 -98
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.d.ts +0 -5
- package/lib/modules/action-bar/trigger-output-language-room/trigger-language-room.js +0 -66
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.d.ts +0 -5
- package/lib/modules/action-bar/trigger-output-language-room/trigger-main-room.js +0 -36
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.d.ts +0 -12
- package/lib/modules/action-bar/trigger-output-language-room/useChangeOutputRoomTool.js +0 -138
- package/lib/modules/components/dialog-container/component/body.d.ts +0 -7
- package/lib/modules/components/dialog-container/component/body.js +0 -47
- package/lib/modules/components/dialog-container/index.css +0 -78
- package/lib/modules/components/dialog-container/index.d.ts +0 -11
- package/lib/modules/components/dialog-container/index.js +0 -110
- package/lib/modules/dialog/components/Interpreter/user-queue/index.css +0 -36
- package/lib/modules/dialog/components/Interpreter/user-queue/index.d.ts +0 -3
- package/lib/modules/dialog/components/Interpreter/user-queue/index.js +0 -47
- package/lib/modules/notification/context.d.ts +0 -2
- package/lib/modules/notification/context.js +0 -9
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -278
- package/lib/scenes/base.d.ts +0 -10
- package/lib/scenes/base.js +0 -75
- package/lib/ui-node.d.ts +0 -25
- package/lib/ui-node.js +0 -156
- /package/lib/modules/action-bar/{Interpreter → interpreter}/index.d.ts +0 -0
- /package/lib/modules/action-bar/{Interpreter → interpreter}/index.js +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/electron.d.ts +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/electron.js +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/index.css +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/index.d.ts +0 -0
- /package/lib/modules/dialog/components/{Interpreter → interpreter}/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/add-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/add-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/add-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/delete-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/delete-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/delete-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/edit-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/edit-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/edit-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/switch-btn/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/switch-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/action/switch-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/add-button/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/add-button/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/add-button/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/config.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/config.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/dialog-content/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/dialog-content/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/dialog-content/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/interpreter-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/interpreter-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/set-btn/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/set-btn/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/tooltip-wrapper/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/components/tooltip-wrapper/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/footer/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ar.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_cn.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_de.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_en.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_es.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_fr.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_hi.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_id.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_it.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_jp.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ko.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ms.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_pt.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_ru.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_th.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_tr.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/images/fcr_vi.png +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-language/useLanguageConfig/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/option-Item.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/components/pick-user/option-Item.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/interpreter-list/interpreter-item/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/loading-wrapper/index.css +0 -0
- /package/lib/modules/{Interpreter → interpreter}/loading-wrapper/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/loading-wrapper/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/store.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/tooltip-wrapper/index.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/tooltip-wrapper/index.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/type.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/type.js +0 -0
- /package/lib/modules/{Interpreter → interpreter}/utils.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/view.d.ts +0 -0
- /package/lib/modules/{Interpreter → interpreter}/view.js +0 -0
|
@@ -37,8 +37,9 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
37
37
|
Object.defineProperty(exports, "__esModule", {
|
|
38
38
|
value: true
|
|
39
39
|
});
|
|
40
|
-
exports.FcrSecurityStore = void 0;
|
|
40
|
+
exports.SecurityStoreContext = exports.FcrSecurityStore = void 0;
|
|
41
41
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
42
|
+
require("core-js/modules/es.array.concat.js");
|
|
42
43
|
require("core-js/modules/es.array.find.js");
|
|
43
44
|
require("core-js/modules/es.array.for-each.js");
|
|
44
45
|
require("core-js/modules/es.array.includes.js");
|
|
@@ -70,22 +71,22 @@ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/
|
|
|
70
71
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
71
72
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
72
73
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
73
|
-
var
|
|
74
|
-
var _type = require("
|
|
74
|
+
var _fcrCore = require("fcr-core");
|
|
75
|
+
var _type = require("fcr-core/lib/type");
|
|
75
76
|
var _decorator = require("agora-foundation/lib/decorator");
|
|
76
77
|
var _mobx = require("mobx");
|
|
77
78
|
var _mobxUtils = require("mobx-utils");
|
|
78
79
|
var _constant = require("../utilities/constant");
|
|
79
|
-
var _rendererEvent = require("../utilities/renderer-event");
|
|
80
80
|
var _lodash = require("lodash");
|
|
81
|
-
var _user = require("
|
|
81
|
+
var _user = require("fcr-core/lib/utilities/user");
|
|
82
82
|
var _toast = require("agora-ui-foundation/lib/components/toast");
|
|
83
|
-
var _enums = require("
|
|
83
|
+
var _enums = require("fcr-core/lib/room-control/whiteboard-control/enums");
|
|
84
84
|
var _logger = require("agora-foundation/lib/logger");
|
|
85
85
|
var _type2 = require("agora-ui-foundation/lib/components/icon/type");
|
|
86
86
|
var _type3 = require("../modules/whiteboard/type");
|
|
87
87
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
88
|
-
var _type4 = require("
|
|
88
|
+
var _type4 = require("fcr-core/lib/room-control/privilege-control/type");
|
|
89
|
+
var _react = require("react");
|
|
89
90
|
var _FcrSecurityStore;
|
|
90
91
|
var _initProto, _init_securityInfos, _init_permissionInfos, _init_privilegeOperator, _init_boardOwnerUser, _handlePermissionUpdatedDecs, _handleSecurityUpdatedDecs, _ref;
|
|
91
92
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -109,6 +110,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
109
110
|
(0, _classCallCheck2["default"])(this, FcrSecurityStore);
|
|
110
111
|
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), (0, _logger.getLogger)()));
|
|
111
112
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
113
|
+
(0, _defineProperty2["default"])(this, "_InterpreterRoomControlInfo", null);
|
|
112
114
|
_classPrivateFieldInitSpec(this, _A, _init_securityInfos(this));
|
|
113
115
|
_classPrivateFieldInitSpec(this, _B, _init_permissionInfos(this));
|
|
114
116
|
_classPrivateFieldInitSpec(this, _C, _init_privilegeOperator(this));
|
|
@@ -127,6 +129,9 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
127
129
|
});
|
|
128
130
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
129
131
|
}));
|
|
132
|
+
(0, _defineProperty2["default"])(this, "getWaterMarkContent", function () {
|
|
133
|
+
return _this._userControl.getWaterMarkContent() || 'Watermark';
|
|
134
|
+
});
|
|
130
135
|
(0, _defineProperty2["default"])(this, "convertSendChatPayload", function (payload) {
|
|
131
136
|
return {
|
|
132
137
|
"public": !!payload["public"],
|
|
@@ -194,7 +199,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
194
199
|
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
195
200
|
});
|
|
196
201
|
var shareState = info === null || info === void 0 || (_info$info = info.info) === null || _info$info === void 0 ? void 0 : _info$info.payload;
|
|
197
|
-
var screenShareState = shareState.screen === _enums.FcrSharePermissionState.ON;
|
|
202
|
+
var screenShareState = (shareState === null || shareState === void 0 ? void 0 : shareState.screen) === _enums.FcrSharePermissionState.ON;
|
|
198
203
|
return screenShareState;
|
|
199
204
|
}));
|
|
200
205
|
(0, _defineProperty2["default"])(this, "allowBoardWrite", (0, _mobxUtils.computedFn)(function () {
|
|
@@ -204,7 +209,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
204
209
|
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.Sharing;
|
|
205
210
|
});
|
|
206
211
|
var shareState = info === null || info === void 0 || (_info$info2 = info.info) === null || _info$info2 === void 0 ? void 0 : _info$info2.payload;
|
|
207
|
-
var boardWriteState = ((_shareState$board = shareState.board) === null || _shareState$board === void 0 ? void 0 : _shareState$board.write) === _enums.FcrSharePermissionState.ON;
|
|
212
|
+
var boardWriteState = (shareState === null || shareState === void 0 || (_shareState$board = shareState.board) === null || _shareState$board === void 0 ? void 0 : _shareState$board.write) === _enums.FcrSharePermissionState.ON;
|
|
208
213
|
return boardWriteState;
|
|
209
214
|
}));
|
|
210
215
|
(0, _defineProperty2["default"])(this, "allowUnmuteSelfVideo", (0, _mobxUtils.computedFn)(function () {
|
|
@@ -235,6 +240,17 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
235
240
|
});
|
|
236
241
|
return !!(info !== null && info !== void 0 && info.enable);
|
|
237
242
|
}));
|
|
243
|
+
(0, _defineProperty2["default"])(this, "isWaterMarkEnabled", (0, _mobxUtils.computedFn)(function () {
|
|
244
|
+
var info = _this.securityInfos.find(function (_ref16) {
|
|
245
|
+
var info = _ref16.info;
|
|
246
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaterMark;
|
|
247
|
+
});
|
|
248
|
+
return !!(info !== null && info !== void 0 && info.enable);
|
|
249
|
+
}));
|
|
250
|
+
(0, _defineProperty2["default"])(this, "hasWaitingRoomPermission", function () {
|
|
251
|
+
var role = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _type4.FcrPrivilegeUserRole.PARTICIPANT;
|
|
252
|
+
return _this._hasPermission(_type4.FcrPermissionAction.WaitingRoomOpen, role);
|
|
253
|
+
});
|
|
238
254
|
(0, _defineProperty2["default"])(this, "hasMutePermission", function (targetRole) {
|
|
239
255
|
return _this._hasPermission(_type4.FcrPermissionAction.StreamMuteAudio, targetRole);
|
|
240
256
|
});
|
|
@@ -271,12 +287,21 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
271
287
|
(0, _defineProperty2["default"])(this, "hasKickOutPermission", function (targetRole) {
|
|
272
288
|
return _this._hasPermission(_type4.FcrPermissionAction.UserKickOut, targetRole);
|
|
273
289
|
});
|
|
290
|
+
(0, _defineProperty2["default"])(this, "hasCallMergePermission", function () {
|
|
291
|
+
return _this._hasPermission(_type4.FcrPermissionAction.CallMerge, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
292
|
+
});
|
|
293
|
+
(0, _defineProperty2["default"])(this, "hasCallSplitPermission", function () {
|
|
294
|
+
return _this._hasPermission(_type4.FcrPermissionAction.CallSplit, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
295
|
+
});
|
|
274
296
|
(0, _defineProperty2["default"])(this, "hasStartScreenSharePermission", function () {
|
|
275
297
|
return _this._hasPermission(_type4.FcrPermissionAction.StreamStartScreenShare, _type4.FcrPrivilegeUserRole.SELF);
|
|
276
298
|
});
|
|
277
299
|
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermission", function () {
|
|
278
300
|
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, _type4.FcrPrivilegeUserRole.SELF);
|
|
279
301
|
});
|
|
302
|
+
(0, _defineProperty2["default"])(this, "hasChatSendPublicPermissionByTargetRole", function (targetRole) {
|
|
303
|
+
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPublic, targetRole);
|
|
304
|
+
});
|
|
280
305
|
// 是否有权限发送私信息
|
|
281
306
|
(0, _defineProperty2["default"])(this, "hasPermissionToSendPrivateMessage", function (targetRole) {
|
|
282
307
|
return _this._hasPermission(_type4.FcrPermissionAction.ChatSendPrivate, targetRole);
|
|
@@ -297,6 +322,12 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
297
322
|
(0, _defineProperty2["default"])(this, "hasPermissionToControlDisallowSendPrivate", function () {
|
|
298
323
|
return _this._hasPermission(_type4.FcrPermissionAction.ChatDisallowSendPrivate, _type4.FcrPrivilegeUserRole.SELF);
|
|
299
324
|
});
|
|
325
|
+
// 是否有设置角色的权限
|
|
326
|
+
(0, _defineProperty2["default"])(this, "hasSetRolePermission", function (targetRole, setToRole) {
|
|
327
|
+
return _this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, targetRole, {
|
|
328
|
+
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(setToRole)
|
|
329
|
+
});
|
|
330
|
+
});
|
|
300
331
|
(0, _defineProperty2["default"])(this, "hasStartCloudRecordingPermission", function () {
|
|
301
332
|
return _this._hasPermission(_type4.FcrPermissionAction.RecordStartCloudRecording, _type4.FcrPrivilegeUserRole.SELF);
|
|
302
333
|
});
|
|
@@ -327,11 +358,167 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
327
358
|
(0, _defineProperty2["default"])(this, "hasLockRoomPermission", function () {
|
|
328
359
|
return _this._hasPermission(_type4.FcrPermissionAction.RoomLock, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
329
360
|
});
|
|
361
|
+
(0, _defineProperty2["default"])(this, "hasWatermarkEnablePermission", function () {
|
|
362
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomEnableWatermark, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
363
|
+
});
|
|
364
|
+
(0, _defineProperty2["default"])(this, "hasWatermarkDisablePermission", function () {
|
|
365
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomDisableWatermark, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
366
|
+
});
|
|
367
|
+
(0, _defineProperty2["default"])(this, "hasEndRoomPermission", function () {
|
|
368
|
+
return _this._hasPermission(_type4.FcrPermissionAction.RoomEnd, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
369
|
+
});
|
|
370
|
+
(0, _defineProperty2["default"])(this, "hasAssignHostBeforeLeavingPermission", function (role) {
|
|
371
|
+
return _this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, _type4.FcrPrivilegeUserRole.PARTICIPANT, {
|
|
372
|
+
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(role)
|
|
373
|
+
});
|
|
374
|
+
});
|
|
375
|
+
(0, _defineProperty2["default"])(this, "hasStartBoardPermission", function () {
|
|
376
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
377
|
+
});
|
|
378
|
+
(0, _defineProperty2["default"])(this, "hasCloseBoardPermission", function () {
|
|
379
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardClose, _type4.FcrPrivilegeUserRole.SELF);
|
|
380
|
+
});
|
|
381
|
+
(0, _defineProperty2["default"])(this, "hasWriteBoardPermission", function () {
|
|
382
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
383
|
+
});
|
|
384
|
+
(0, _defineProperty2["default"])(this, "hasAllowStartBoardPermission", function () {
|
|
385
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardAllowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
386
|
+
});
|
|
387
|
+
(0, _defineProperty2["default"])(this, "hasDisallowStartBoardPermission", function () {
|
|
388
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardDisallowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
389
|
+
});
|
|
390
|
+
(0, _defineProperty2["default"])(this, "hasAllowWriteBoardPermission", function () {
|
|
391
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardAllowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
392
|
+
});
|
|
393
|
+
(0, _defineProperty2["default"])(this, "hasDisallowWriteBoardPermission", function () {
|
|
394
|
+
return _this._hasPermission(_type4.FcrPermissionAction.BoardDisallowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
395
|
+
});
|
|
396
|
+
(0, _defineProperty2["default"])(this, "hasAllowScreenShareAndBoardPermission", function () {
|
|
397
|
+
var _this$_privilegeContr;
|
|
398
|
+
return (_this$_privilegeContr = _this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.Sharing)) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.enable;
|
|
399
|
+
});
|
|
400
|
+
(0, _defineProperty2["default"])(this, "hasAllowWaterMarkPermission", function () {
|
|
401
|
+
var _this$_privilegeContr2;
|
|
402
|
+
return (_this$_privilegeContr2 = _this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.WaterMark)) === null || _this$_privilegeContr2 === void 0 ? void 0 : _this$_privilegeContr2.enable;
|
|
403
|
+
});
|
|
404
|
+
(0, _defineProperty2["default"])(this, "hasEnableInterpreterPermission", function () {
|
|
405
|
+
return _this._hasPermission(_type4.FcrPermissionAction.InterpreterStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
406
|
+
});
|
|
407
|
+
(0, _defineProperty2["default"])(this, "hasDisableInterpreterPermission", function () {
|
|
408
|
+
return _this._hasPermission(_type4.FcrPermissionAction.InterpreterStop, _type4.FcrPrivilegeUserRole.SELF);
|
|
409
|
+
});
|
|
410
|
+
(0, _defineProperty2["default"])(this, "hasAllowChangeNamePermission", function () {
|
|
411
|
+
return _this._privilegeControl.getLocalUserPermissionInfo(_type4.FcrPermissionAction.UserAllowChangeName).enable;
|
|
412
|
+
});
|
|
413
|
+
(0, _defineProperty2["default"])(this, "hasDisallowChangeNamePermission", function () {
|
|
414
|
+
return _this._privilegeControl.getLocalUserPermissionInfo(_type4.FcrPermissionAction.UserDisallowChangeName).enable;
|
|
415
|
+
});
|
|
416
|
+
(0, _defineProperty2["default"])(this, "hasChangeNamePermission", function (targetRole) {
|
|
417
|
+
return _this._hasPermission(_type4.FcrPermissionAction.UserChangeName, targetRole);
|
|
418
|
+
});
|
|
419
|
+
(0, _defineProperty2["default"])(this, "isMulti", (0, _mobxUtils.computedFn)(function () {
|
|
420
|
+
var _info$info3;
|
|
421
|
+
var info = _this.securityInfos.find(function (_ref17) {
|
|
422
|
+
var info = _ref17.info;
|
|
423
|
+
return (info === null || info === void 0 ? void 0 : info.action) === _type4.FcrSecurityAction.WaterMark;
|
|
424
|
+
});
|
|
425
|
+
return (info === null || info === void 0 || (_info$info3 = info.info) === null || _info$info3 === void 0 ? void 0 : _info$info3.payload.lineType) === _type.FcrLineType.MULTI_ROW;
|
|
426
|
+
}));
|
|
427
|
+
(0, _defineProperty2["default"])(this, "getAllowedOperations", function (targetUserRole, isSelf) {
|
|
428
|
+
var operations = [];
|
|
429
|
+
if (_this.hasRequestStartVideoPermission(targetUserRole)) {
|
|
430
|
+
//请求开启摄像头权限
|
|
431
|
+
operations.push('request_start_video');
|
|
432
|
+
}
|
|
433
|
+
if (_this.hasStartVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
434
|
+
//开启摄像头权限
|
|
435
|
+
operations.push('start_video');
|
|
436
|
+
}
|
|
437
|
+
if (_this.hasStopVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
438
|
+
//关闭摄像头权限
|
|
439
|
+
operations.push('stop_video');
|
|
440
|
+
}
|
|
441
|
+
if (_this.hasPermissionToSendPrivateMessage(targetUserRole)) {
|
|
442
|
+
//私聊权限
|
|
443
|
+
operations.push('private_chat');
|
|
444
|
+
}
|
|
445
|
+
operations.push('pin');
|
|
446
|
+
if (_this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.HOST)) {
|
|
447
|
+
//设为主持人权限
|
|
448
|
+
operations.push('set_as_host');
|
|
449
|
+
}
|
|
450
|
+
if (_this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.COHOST)) {
|
|
451
|
+
//设为联席主持人权限
|
|
452
|
+
operations.push('set_as_co_host');
|
|
453
|
+
}
|
|
454
|
+
if (_this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
455
|
+
//撤销联席主持人权限
|
|
456
|
+
operations.push('revoke_co_host');
|
|
457
|
+
}
|
|
458
|
+
if (_this.hasCallMergePermission()) {
|
|
459
|
+
//与视频合并权限
|
|
460
|
+
operations.push('merge_video');
|
|
461
|
+
}
|
|
462
|
+
if (_this.hasKickOutPermission(targetUserRole)) {
|
|
463
|
+
//移除房间权限
|
|
464
|
+
operations.push('kick_out');
|
|
465
|
+
}
|
|
466
|
+
if (_this.hasWaitingRoomPermission(targetUserRole)) {
|
|
467
|
+
operations.push('put_into_waiting_room');
|
|
468
|
+
}
|
|
469
|
+
if (_this.hasChangeNamePermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
470
|
+
operations.push('change_name');
|
|
471
|
+
}
|
|
472
|
+
return operations;
|
|
473
|
+
});
|
|
474
|
+
(0, _defineProperty2["default"])(this, "allowShare", /*#__PURE__*/function () {
|
|
475
|
+
var _ref18 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state) {
|
|
476
|
+
var enable;
|
|
477
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
478
|
+
while (1) switch (_context.prev = _context.next) {
|
|
479
|
+
case 0:
|
|
480
|
+
enable = state === _enums.FcrSharePermissionState.ON;
|
|
481
|
+
_context.next = 3;
|
|
482
|
+
return _this._privilegeControl.allowShare(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
483
|
+
case 3:
|
|
484
|
+
return _context.abrupt("return", _context.sent);
|
|
485
|
+
case 4:
|
|
486
|
+
case "end":
|
|
487
|
+
return _context.stop();
|
|
488
|
+
}
|
|
489
|
+
}, _callee);
|
|
490
|
+
}));
|
|
491
|
+
return function (_x) {
|
|
492
|
+
return _ref18.apply(this, arguments);
|
|
493
|
+
};
|
|
494
|
+
}());
|
|
495
|
+
(0, _defineProperty2["default"])(this, "setAllowWriteBoard", /*#__PURE__*/function () {
|
|
496
|
+
var _ref19 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state) {
|
|
497
|
+
var enable;
|
|
498
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
499
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
500
|
+
case 0:
|
|
501
|
+
_this.logger.info('setAllowWriteBoard', state);
|
|
502
|
+
enable = typeof state === 'boolean' ? state : state === _enums.FcrSharePermissionState.ON;
|
|
503
|
+
_context2.next = 4;
|
|
504
|
+
return _this._privilegeControl.allowWriteBoard(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
505
|
+
case 4:
|
|
506
|
+
return _context2.abrupt("return", _context2.sent);
|
|
507
|
+
case 5:
|
|
508
|
+
case "end":
|
|
509
|
+
return _context2.stop();
|
|
510
|
+
}
|
|
511
|
+
}, _callee2);
|
|
512
|
+
}));
|
|
513
|
+
return function (_x2) {
|
|
514
|
+
return _ref19.apply(this, arguments);
|
|
515
|
+
};
|
|
516
|
+
}());
|
|
330
517
|
//全体静音
|
|
331
518
|
(0, _defineProperty2["default"])(this, "muteAll", function () {
|
|
332
519
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
333
|
-
audioPrivilege:
|
|
334
|
-
videoPrivilege:
|
|
520
|
+
audioPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOPRIVILEGE,
|
|
521
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
335
522
|
}, {
|
|
336
523
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
337
524
|
targetRoleTypeIsInclude: true
|
|
@@ -340,8 +527,8 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
340
527
|
//要求所有人解除静音
|
|
341
528
|
(0, _defineProperty2["default"])(this, "unmuteAll", function () {
|
|
342
529
|
_this._streamControl.updatePublishPrivilegeOfStreams({
|
|
343
|
-
audioPrivilege:
|
|
344
|
-
videoPrivilege:
|
|
530
|
+
audioPrivilege: _fcrCore.FcrStreamPrivilegeOperation.HAS_PRIVILEGE,
|
|
531
|
+
videoPrivilege: _fcrCore.FcrStreamPrivilegeOperation.NOOPERATION
|
|
345
532
|
}, {
|
|
346
533
|
targetRoleType: [_type.FcrUserRole.PARTICIPANT],
|
|
347
534
|
targetRoleTypeIsInclude: true
|
|
@@ -353,8 +540,8 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
353
540
|
(0, _defineProperty2["default"])(this, "setWaitingRoomEnabled", function () {
|
|
354
541
|
// this._privilegeControl.enableWaitingRoom(true);
|
|
355
542
|
});
|
|
356
|
-
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function () {
|
|
357
|
-
|
|
543
|
+
(0, _defineProperty2["default"])(this, "setAllowChangeSelfName", function (enable) {
|
|
544
|
+
_this._privilegeControl.allowChangeUserName(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
358
545
|
});
|
|
359
546
|
//设置是否允许聊天
|
|
360
547
|
(0, _defineProperty2["default"])(this, "setAllowChat", function (enable) {
|
|
@@ -399,14 +586,7 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
399
586
|
});
|
|
400
587
|
//允许屏幕共享
|
|
401
588
|
(0, _defineProperty2["default"])(this, "setAllowShareScreen", function (state) {
|
|
402
|
-
|
|
403
|
-
var payload = {
|
|
404
|
-
screen: enable,
|
|
405
|
-
board: {
|
|
406
|
-
start: enable
|
|
407
|
-
}
|
|
408
|
-
};
|
|
409
|
-
_this._privilegeControl.allowShare(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
589
|
+
_this._privilegeControl.allowShare(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
410
590
|
});
|
|
411
591
|
//允许开启视频
|
|
412
592
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfVideo", function (enable) {
|
|
@@ -416,12 +596,16 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
416
596
|
(0, _defineProperty2["default"])(this, "setAllowUnmuteSelfAudio", function (enable) {
|
|
417
597
|
_this._privilegeControl.allowStartAudio(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT]);
|
|
418
598
|
});
|
|
599
|
+
(0, _defineProperty2["default"])(this, "hasSendAllChatPermission", function () {
|
|
600
|
+
var _this$_privilegeContr3;
|
|
601
|
+
return (_this$_privilegeContr3 = _this._privilegeControl.getLocalUserPermissionInfo(_type4.FcrPermissionAction.ChatSendPublic)) === null || _this$_privilegeContr3 === void 0 ? void 0 : _this$_privilegeContr3.enable;
|
|
602
|
+
});
|
|
419
603
|
(0, _defineProperty2["default"])(this, "_hasPermission", (0, _mobxUtils.computedFn)(function (action, targetRole) {
|
|
420
604
|
var _this$permissionInfos;
|
|
421
605
|
var convertedRole = targetRole === _type4.FcrPrivilegeUserRole.SELF ? [_this.localUser.userRole, _type4.FcrPrivilegeUserRole.SELF] : [targetRole];
|
|
422
|
-
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (
|
|
606
|
+
var info = (_this$permissionInfos = _this.permissionInfos) === null || _this$permissionInfos === void 0 ? void 0 : _this$permissionInfos.find(function (_ref20) {
|
|
423
607
|
var _info$targetRoles;
|
|
424
|
-
var info =
|
|
608
|
+
var info = _ref20.info;
|
|
425
609
|
return (info === null || info === void 0 ? void 0 : info.action) === action && ((info === null || info === void 0 || (_info$targetRoles = info.targetRoles) === null || _info$targetRoles === void 0 ? void 0 : _info$targetRoles.length) === 0 || convertedRole.some(function (role) {
|
|
426
610
|
var _info$targetRoles2;
|
|
427
611
|
return info === null || info === void 0 || (_info$targetRoles2 = info.targetRoles) === null || _info$targetRoles2 === void 0 ? void 0 : _info$targetRoles2.includes(role);
|
|
@@ -437,9 +621,9 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
437
621
|
return _params && _params[key].includes(params[key]);
|
|
438
622
|
});
|
|
439
623
|
};
|
|
440
|
-
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (
|
|
624
|
+
var info = (_this$permissionInfos2 = _this.permissionInfos) === null || _this$permissionInfos2 === void 0 ? void 0 : _this$permissionInfos2.find(function (_ref21) {
|
|
441
625
|
var _info$targetRoles3, _info$params;
|
|
442
|
-
var info =
|
|
626
|
+
var info = _ref21.info;
|
|
443
627
|
return (info === null || info === void 0 ? void 0 : info.action) === action && ((info === null || info === void 0 || (_info$targetRoles3 = info.targetRoles) === null || _info$targetRoles3 === void 0 ? void 0 : _info$targetRoles3.length) === 0 || convertedRole.some(function (role) {
|
|
444
628
|
var _info$targetRoles4;
|
|
445
629
|
return info === null || info === void 0 || (_info$targetRoles4 = info.targetRoles) === null || _info$targetRoles4 === void 0 ? void 0 : _info$targetRoles4.includes(role);
|
|
@@ -455,8 +639,6 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
455
639
|
this._uiEventStore = _uiEventStore;
|
|
456
640
|
this.securityInfos = this._privilegeControl.getAllSecurityInfo();
|
|
457
641
|
this.permissionInfos = this._privilegeControl.getAllLocalUserPermissionInfo();
|
|
458
|
-
this._addReactions();
|
|
459
|
-
(0, _rendererEvent.addEventListener)(this._handleProcessEvent);
|
|
460
642
|
this._uiEventStore.addObserver({
|
|
461
643
|
onEvent: function onEvent(action, payload) {
|
|
462
644
|
if (action === _constant.UIAction.WHITEBOARD_CHANGED) {
|
|
@@ -510,181 +692,24 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
510
692
|
set: function set(v) {
|
|
511
693
|
_classPrivateFieldSet(_D, this, v);
|
|
512
694
|
}
|
|
695
|
+
}, {
|
|
696
|
+
key: "hasSecurityPermission",
|
|
697
|
+
get: function get() {
|
|
698
|
+
return this.hasEnableStartScreenSharePermission() || this.hasPermissionToControlAllowSendAll() || this.hasEnableStartAudioPermission() || this.hasEnableChangeNamePermission() || this.hasEnableStartVideoPermission() || this.hasLockRoomPermission();
|
|
699
|
+
}
|
|
513
700
|
}, {
|
|
514
701
|
key: "release",
|
|
515
702
|
value: function release() {
|
|
516
|
-
this.
|
|
517
|
-
|
|
703
|
+
this._disposers.forEach(function (d) {
|
|
704
|
+
return d();
|
|
705
|
+
});
|
|
706
|
+
this._disposers = [];
|
|
518
707
|
}
|
|
519
708
|
}, {
|
|
520
709
|
key: "localUser",
|
|
521
710
|
get: function get() {
|
|
522
711
|
return this._userControl.getLocalUser();
|
|
523
712
|
}
|
|
524
|
-
}, {
|
|
525
|
-
key: "hasCallMergePermission",
|
|
526
|
-
value: function hasCallMergePermission() {
|
|
527
|
-
return this._hasPermission(_type4.FcrPermissionAction.CallMerge, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
528
|
-
}
|
|
529
|
-
}, {
|
|
530
|
-
key: "hasCallSplitPermission",
|
|
531
|
-
value: function hasCallSplitPermission() {
|
|
532
|
-
return this._hasPermission(_type4.FcrPermissionAction.CallSplit, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
533
|
-
}
|
|
534
|
-
}, {
|
|
535
|
-
key: "hasSetRolePermission",
|
|
536
|
-
value:
|
|
537
|
-
// 是否有设置角色的权限
|
|
538
|
-
function hasSetRolePermission(targetRole, setToRole) {
|
|
539
|
-
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, targetRole, {
|
|
540
|
-
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(setToRole)
|
|
541
|
-
});
|
|
542
|
-
}
|
|
543
|
-
}, {
|
|
544
|
-
key: "hasEndRoomPermission",
|
|
545
|
-
value: function hasEndRoomPermission() {
|
|
546
|
-
return this._hasPermission(_type4.FcrPermissionAction.RoomEnd, _type4.FcrPrivilegeUserRole.PARTICIPANT);
|
|
547
|
-
}
|
|
548
|
-
}, {
|
|
549
|
-
key: "hasAssignHostBeforeLeavingPermission",
|
|
550
|
-
value: function hasAssignHostBeforeLeavingPermission(role) {
|
|
551
|
-
return this._hasPermissionWithParams(_type4.FcrPermissionAction.UserSetRole, _type4.FcrPrivilegeUserRole.PARTICIPANT, {
|
|
552
|
-
role: (0, _user.convertFcrPrivilegeRoleToStringPrivilegeRole)(role)
|
|
553
|
-
});
|
|
554
|
-
}
|
|
555
|
-
}, {
|
|
556
|
-
key: "hasStartBoardPermission",
|
|
557
|
-
value: function hasStartBoardPermission() {
|
|
558
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
559
|
-
}
|
|
560
|
-
}, {
|
|
561
|
-
key: "hasCloseBoardPermission",
|
|
562
|
-
value: function hasCloseBoardPermission() {
|
|
563
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardClose, _type4.FcrPrivilegeUserRole.SELF);
|
|
564
|
-
}
|
|
565
|
-
}, {
|
|
566
|
-
key: "hasWriteBoardPermission",
|
|
567
|
-
value: function hasWriteBoardPermission() {
|
|
568
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
569
|
-
}
|
|
570
|
-
}, {
|
|
571
|
-
key: "hasAllowStartBoardPermission",
|
|
572
|
-
value: function hasAllowStartBoardPermission() {
|
|
573
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
574
|
-
}
|
|
575
|
-
}, {
|
|
576
|
-
key: "hasDisallowStartBoardPermission",
|
|
577
|
-
value: function hasDisallowStartBoardPermission() {
|
|
578
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowStart, _type4.FcrPrivilegeUserRole.SELF);
|
|
579
|
-
}
|
|
580
|
-
}, {
|
|
581
|
-
key: "hasAllowWriteBoardPermission",
|
|
582
|
-
value: function hasAllowWriteBoardPermission() {
|
|
583
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardAllowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
584
|
-
}
|
|
585
|
-
}, {
|
|
586
|
-
key: "hasDisallowWriteBoardPermission",
|
|
587
|
-
value: function hasDisallowWriteBoardPermission() {
|
|
588
|
-
return this._hasPermission(_type4.FcrPermissionAction.BoardDisallowWrite, _type4.FcrPrivilegeUserRole.SELF);
|
|
589
|
-
}
|
|
590
|
-
}, {
|
|
591
|
-
key: "hasAllowScreenShareAndBoardPermission",
|
|
592
|
-
value: function hasAllowScreenShareAndBoardPermission() {
|
|
593
|
-
var _this$_privilegeContr;
|
|
594
|
-
return (_this$_privilegeContr = this._privilegeControl.getSecurityInfo(_type4.FcrSecurityAction.Sharing)) === null || _this$_privilegeContr === void 0 ? void 0 : _this$_privilegeContr.enable;
|
|
595
|
-
}
|
|
596
|
-
}, {
|
|
597
|
-
key: "getAllowedOperations",
|
|
598
|
-
value: function getAllowedOperations(targetUserRole, isSelf) {
|
|
599
|
-
var operations = [];
|
|
600
|
-
if (this.hasRequestStartVideoPermission(targetUserRole)) {
|
|
601
|
-
//请求开启摄像头权限
|
|
602
|
-
operations.push('request_start_video');
|
|
603
|
-
}
|
|
604
|
-
if (this.hasStartVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
605
|
-
//开启摄像头权限
|
|
606
|
-
operations.push('start_video');
|
|
607
|
-
}
|
|
608
|
-
if (this.hasStopVideoPermission(isSelf ? _type4.FcrPrivilegeUserRole.SELF : targetUserRole)) {
|
|
609
|
-
//关闭摄像头权限
|
|
610
|
-
operations.push('stop_video');
|
|
611
|
-
}
|
|
612
|
-
if (this.hasPermissionToSendPrivateMessage(targetUserRole)) {
|
|
613
|
-
//私聊权限
|
|
614
|
-
operations.push('private_chat');
|
|
615
|
-
}
|
|
616
|
-
operations.push('pin');
|
|
617
|
-
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.HOST)) {
|
|
618
|
-
//设为主持人权限
|
|
619
|
-
operations.push('set_as_host');
|
|
620
|
-
}
|
|
621
|
-
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.COHOST)) {
|
|
622
|
-
//设为联席主持人权限
|
|
623
|
-
operations.push('set_as_co_host');
|
|
624
|
-
}
|
|
625
|
-
if (this.hasSetRolePermission(targetUserRole, _type4.FcrPrivilegeUserRole.PARTICIPANT)) {
|
|
626
|
-
//撤销联席主持人权限
|
|
627
|
-
operations.push('revoke_co_host');
|
|
628
|
-
}
|
|
629
|
-
if (this.hasCallMergePermission()) {
|
|
630
|
-
//与视频合并权限
|
|
631
|
-
operations.push('merge_video');
|
|
632
|
-
}
|
|
633
|
-
if (this.hasKickOutPermission(targetUserRole)) {
|
|
634
|
-
//移除房间权限
|
|
635
|
-
operations.push('kick_out');
|
|
636
|
-
}
|
|
637
|
-
return operations;
|
|
638
|
-
}
|
|
639
|
-
}, {
|
|
640
|
-
key: "allowShare",
|
|
641
|
-
value: function () {
|
|
642
|
-
var _allowShare = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(state, payload) {
|
|
643
|
-
var enable;
|
|
644
|
-
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
645
|
-
while (1) switch (_context.prev = _context.next) {
|
|
646
|
-
case 0:
|
|
647
|
-
enable = state === _enums.FcrSharePermissionState.ON;
|
|
648
|
-
_context.next = 3;
|
|
649
|
-
return this._privilegeControl.allowShare(enable, [_type4.FcrPrivilegeUserRole.PARTICIPANT], payload);
|
|
650
|
-
case 3:
|
|
651
|
-
return _context.abrupt("return", _context.sent);
|
|
652
|
-
case 4:
|
|
653
|
-
case "end":
|
|
654
|
-
return _context.stop();
|
|
655
|
-
}
|
|
656
|
-
}, _callee, this);
|
|
657
|
-
}));
|
|
658
|
-
function allowShare(_x, _x2) {
|
|
659
|
-
return _allowShare.apply(this, arguments);
|
|
660
|
-
}
|
|
661
|
-
return allowShare;
|
|
662
|
-
}()
|
|
663
|
-
}, {
|
|
664
|
-
key: "setAllowWriteBoard",
|
|
665
|
-
value: function () {
|
|
666
|
-
var _setAllowWriteBoard = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(state, payload) {
|
|
667
|
-
var enable;
|
|
668
|
-
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
669
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
670
|
-
case 0:
|
|
671
|
-
this.logger.info('setAllowWriteBoard', state);
|
|
672
|
-
enable = state === _enums.FcrSharePermissionState.ON;
|
|
673
|
-
_context2.next = 4;
|
|
674
|
-
return this._privilegeControl.allowWriteBoard(enable, [], payload);
|
|
675
|
-
case 4:
|
|
676
|
-
return _context2.abrupt("return", _context2.sent);
|
|
677
|
-
case 5:
|
|
678
|
-
case "end":
|
|
679
|
-
return _context2.stop();
|
|
680
|
-
}
|
|
681
|
-
}, _callee2, this);
|
|
682
|
-
}));
|
|
683
|
-
function setAllowWriteBoard(_x3, _x4) {
|
|
684
|
-
return _setAllowWriteBoard.apply(this, arguments);
|
|
685
|
-
}
|
|
686
|
-
return setAllowWriteBoard;
|
|
687
|
-
}()
|
|
688
713
|
}, {
|
|
689
714
|
key: "_handlePermissionUpdated",
|
|
690
715
|
value: function _handlePermissionUpdated() {
|
|
@@ -693,18 +718,23 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
693
718
|
}, {
|
|
694
719
|
key: "_handleSecurityUpdated",
|
|
695
720
|
value: function _handleSecurityUpdated(roomId, event) {
|
|
696
|
-
var
|
|
721
|
+
var _event$operatorUser,
|
|
722
|
+
_event$operatorUser2,
|
|
723
|
+
_this$privilegeOperat,
|
|
724
|
+
_securityInfo$info,
|
|
697
725
|
_securityInfo$info2,
|
|
698
726
|
_securityInfo$info3,
|
|
699
727
|
_securityInfo$info4,
|
|
700
728
|
_securityInfo$info5,
|
|
701
729
|
_securityInfo$info6,
|
|
702
|
-
_this2 = this
|
|
730
|
+
_this2 = this,
|
|
731
|
+
_event$securityInfo$i,
|
|
732
|
+
_event$securityInfo$i2;
|
|
703
733
|
this.securityInfos = this._privilegeControl.getAllSecurityInfo();
|
|
704
734
|
this.privilegeOperator = event.operatorUser;
|
|
705
735
|
var securityInfo = event.securityInfo;
|
|
706
736
|
var enable = securityInfo.enable;
|
|
707
|
-
var operator = this.localUser.userRole === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('
|
|
737
|
+
var operator = this.localUser.userId === ((_event$operatorUser = event.operatorUser) === null || _event$operatorUser === void 0 ? void 0 : _event$operatorUser.userId) ? (0, _i18n.transI18n)('fmt_settings_labels_you') : (((_event$operatorUser2 = event.operatorUser) === null || _event$operatorUser2 === void 0 ? void 0 : _event$operatorUser2.userRole) === _type.FcrUserRole.HOST ? (0, _i18n.transI18n)('fmt_role_host') : (0, _i18n.transI18n)('fmt_role_cohost')) + " ".concat((_this$privilegeOperat = this.privilegeOperator) === null || _this$privilegeOperat === void 0 ? void 0 : _this$privilegeOperat.userName, " ");
|
|
708
738
|
if (((_securityInfo$info = securityInfo.info) === null || _securityInfo$info === void 0 ? void 0 : _securityInfo$info.action) === _type4.FcrSecurityAction.JoinWithMuteAudio) {
|
|
709
739
|
if (enable) {
|
|
710
740
|
this._uiEventStore.showToast({
|
|
@@ -715,15 +745,18 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
715
745
|
});
|
|
716
746
|
}
|
|
717
747
|
} else if (((_securityInfo$info2 = securityInfo.info) === null || _securityInfo$info2 === void 0 ? void 0 : _securityInfo$info2.action) === _type4.FcrSecurityAction.StartAudio) {
|
|
748
|
+
var _this$_InterpreterRoo;
|
|
718
749
|
var toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_allowedselfunmuting', {
|
|
719
750
|
reason1: operator
|
|
720
751
|
}) : (0, _i18n.transI18n)('fmt_settings_tips_disabledselfunmuting', {
|
|
721
752
|
reason1: operator
|
|
722
753
|
});
|
|
723
|
-
this.
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
754
|
+
if (!((_this$_InterpreterRoo = this._InterpreterRoomControlInfo) !== null && _this$_InterpreterRoo !== void 0 && _this$_InterpreterRoo.interpreter)) {
|
|
755
|
+
this._uiEventStore.showToast({
|
|
756
|
+
type: 'info',
|
|
757
|
+
message: toastMessage
|
|
758
|
+
});
|
|
759
|
+
}
|
|
727
760
|
} else if (((_securityInfo$info3 = securityInfo.info) === null || _securityInfo$info3 === void 0 ? void 0 : _securityInfo$info3.action) === _type4.FcrSecurityAction.StartVideo) {
|
|
728
761
|
var _toastMessage = enable ? (0, _i18n.transI18n)('fmt_settings_tips_videoenabled', {
|
|
729
762
|
reason1: operator
|
|
@@ -785,6 +818,54 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
785
818
|
}
|
|
786
819
|
});
|
|
787
820
|
}
|
|
821
|
+
} else if (((_event$securityInfo$i = event.securityInfo.info) === null || _event$securityInfo$i === void 0 ? void 0 : _event$securityInfo$i.action) === _type4.FcrSecurityAction.WaitingRoom) {
|
|
822
|
+
var _event$operatorUser3, _event$operatorUser4;
|
|
823
|
+
var isSelf = this.localUser.userId === ((_event$operatorUser3 = event.operatorUser) === null || _event$operatorUser3 === void 0 ? void 0 : _event$operatorUser3.userId);
|
|
824
|
+
var userName = (_event$operatorUser4 = event.operatorUser) === null || _event$operatorUser4 === void 0 ? void 0 : _event$operatorUser4.userName;
|
|
825
|
+
if (!isSelf) {
|
|
826
|
+
if (enable) {
|
|
827
|
+
this._uiEventStore.showToast({
|
|
828
|
+
type: 'normal',
|
|
829
|
+
message: "".concat(userName).concat((0, _i18n.transI18n)('fmt_waitingroom_setting_tips_enable'))
|
|
830
|
+
});
|
|
831
|
+
} else {
|
|
832
|
+
this._uiEventStore.showToast({
|
|
833
|
+
type: 'normal',
|
|
834
|
+
message: "".concat(userName).concat((0, _i18n.transI18n)('fmt_waitingroom_mobile_setting_label_disable'))
|
|
835
|
+
});
|
|
836
|
+
}
|
|
837
|
+
}
|
|
838
|
+
} else if (((_event$securityInfo$i2 = event.securityInfo.info) === null || _event$securityInfo$i2 === void 0 ? void 0 : _event$securityInfo$i2.action) == _type4.FcrSecurityAction.WaterMark) {
|
|
839
|
+
var _event$securityInfo$i3;
|
|
840
|
+
var _enable = event.securityInfo.enable;
|
|
841
|
+
if (this._prevWaterMarkEnable !== _enable) {
|
|
842
|
+
var _event$operatorUser5;
|
|
843
|
+
var toastText = '';
|
|
844
|
+
var roleValue = (_event$operatorUser5 = event.operatorUser) === null || _event$operatorUser5 === void 0 ? void 0 : _event$operatorUser5.userRole;
|
|
845
|
+
var canTriggerToast = roleValue === _type.FcrUserRole.HOST || roleValue === _type.FcrUserRole.COHOST;
|
|
846
|
+
if (canTriggerToast) {
|
|
847
|
+
if (_enable) {
|
|
848
|
+
if (roleValue === _type.FcrUserRole.HOST) {
|
|
849
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_facilitator_watermark');
|
|
850
|
+
} else if (roleValue === _type.FcrUserRole.COHOST) {
|
|
851
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_co_facilitator_watermark');
|
|
852
|
+
}
|
|
853
|
+
} else {
|
|
854
|
+
toastText = (0, _i18n.transI18n)('fmt_security_setting_popup_toast_turn_off_watermark');
|
|
855
|
+
}
|
|
856
|
+
this._prevWaterMarkEnable = _enable;
|
|
857
|
+
if (toastText) {
|
|
858
|
+
this._uiEventStore.showToast({
|
|
859
|
+
type: 'normal',
|
|
860
|
+
message: toastText
|
|
861
|
+
});
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
this._uiEventStore.sendEvent(_constant.UIAction.WATERMARK_INFO_UPDATE, {
|
|
866
|
+
enable: _enable,
|
|
867
|
+
lineType: (_event$securityInfo$i3 = event.securityInfo.info) === null || _event$securityInfo$i3 === void 0 ? void 0 : _event$securityInfo$i3.payload.lineType
|
|
868
|
+
});
|
|
788
869
|
}
|
|
789
870
|
}
|
|
790
871
|
}, {
|
|
@@ -838,176 +919,39 @@ var FcrSecurityStore = exports.FcrSecurityStore = /*#__PURE__*/function () {
|
|
|
838
919
|
this.logger.debug(JSON.stringify((0, _mobx.toJS)(this.permissionInfos)));
|
|
839
920
|
}
|
|
840
921
|
}, {
|
|
841
|
-
key: "
|
|
842
|
-
value: function
|
|
843
|
-
var
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_UNMUTE_SELF_VIDEO:
|
|
860
|
-
this.setAllowUnmuteSelfVideo(payload.allow);
|
|
861
|
-
break;
|
|
862
|
-
case _constant.RendererEventAction.FRAGMENT_SET_ALLOW_UNMUTE_SELF_AUDIO:
|
|
863
|
-
this.setAllowUnmuteSelfAudio(payload.allow);
|
|
864
|
-
break;
|
|
865
|
-
case _constant.RendererEventAction.FRAGMENT_SET_LOCK_ROOM:
|
|
866
|
-
this.setLockRoomEnabled(payload.allow);
|
|
867
|
-
break;
|
|
868
|
-
case _constant.RendererEventAction.FRAGMENT_SET_ENABLE_WAITING_ROOM:
|
|
869
|
-
// this.setWaitingRoomEnabled(payload.allow);
|
|
870
|
-
break;
|
|
871
|
-
default:
|
|
872
|
-
break;
|
|
922
|
+
key: "setAllowWaterMark",
|
|
923
|
+
value: function () {
|
|
924
|
+
var _setAllowWaterMark = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee3(state, lineType) {
|
|
925
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
926
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
927
|
+
case 0:
|
|
928
|
+
_context3.next = 2;
|
|
929
|
+
return this._privilegeControl.allowWatermark(state, [_type4.FcrPrivilegeUserRole.PARTICIPANT], lineType);
|
|
930
|
+
case 2:
|
|
931
|
+
return _context3.abrupt("return", _context3.sent);
|
|
932
|
+
case 3:
|
|
933
|
+
case "end":
|
|
934
|
+
return _context3.stop();
|
|
935
|
+
}
|
|
936
|
+
}, _callee3, this);
|
|
937
|
+
}));
|
|
938
|
+
function setAllowWaterMark(_x3, _x4) {
|
|
939
|
+
return _setAllowWaterMark.apply(this, arguments);
|
|
873
940
|
}
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
key: "_addReactions",
|
|
877
|
-
value: function _addReactions() {
|
|
878
|
-
var _this3 = this;
|
|
879
|
-
var securityReactions = [{
|
|
880
|
-
observable: function observable() {
|
|
881
|
-
return _this3.allowChangeSelfName();
|
|
882
|
-
},
|
|
883
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_CHANGE_SELF_NAME
|
|
884
|
-
}, {
|
|
885
|
-
observable: function observable() {
|
|
886
|
-
return _this3.allowChat();
|
|
887
|
-
},
|
|
888
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_CHAT
|
|
889
|
-
}, {
|
|
890
|
-
observable: function observable() {
|
|
891
|
-
return _this3.allowJoinWithMuteAudio();
|
|
892
|
-
},
|
|
893
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_JOIN_WITH_MUTE_AUDIO
|
|
894
|
-
}, {
|
|
895
|
-
observable: function observable() {
|
|
896
|
-
return _this3.allowScreenShareAndBoard();
|
|
897
|
-
},
|
|
898
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_SHARE_SCREEN
|
|
899
|
-
}, {
|
|
900
|
-
observable: function observable() {
|
|
901
|
-
return _this3.allowUnmuteSelfVideo();
|
|
902
|
-
},
|
|
903
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_UNMUTE_SELF_VIDEO
|
|
904
|
-
}, {
|
|
905
|
-
observable: function observable() {
|
|
906
|
-
return _this3.allowUnmuteSelfAudio();
|
|
907
|
-
},
|
|
908
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_UNMUTE_SELF_AUDIO
|
|
909
|
-
}, {
|
|
910
|
-
observable: function observable() {
|
|
911
|
-
return _this3.isLockRoomEnabled();
|
|
912
|
-
},
|
|
913
|
-
action: _constant.RendererEventAction.MAIN_SET_LOCK_ROOM
|
|
914
|
-
}, {
|
|
915
|
-
observable: function observable() {
|
|
916
|
-
return _this3.isWaitingRoomEnabled();
|
|
917
|
-
},
|
|
918
|
-
action: _constant.RendererEventAction.MAIN_SET_ENABLE_WAITING_ROOM
|
|
919
|
-
}, {
|
|
920
|
-
observable: function observable() {
|
|
921
|
-
return _this3.hasStartCloudRecordingPermission();
|
|
922
|
-
},
|
|
923
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_CLOUD_RECORDING_START
|
|
924
|
-
}, {
|
|
925
|
-
observable: function observable() {
|
|
926
|
-
return _this3.hasStartLiveStreamingPermission();
|
|
927
|
-
},
|
|
928
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_LIVE_STREAMING_START
|
|
929
|
-
}, {
|
|
930
|
-
observable: function observable() {
|
|
931
|
-
return _this3.hasStopLiveStreamingPermission();
|
|
932
|
-
},
|
|
933
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_LIVE_STREAMING_STOP
|
|
934
|
-
}, {
|
|
935
|
-
observable: function observable() {
|
|
936
|
-
return _this3.hasGetLiveStreamingLinkPermission();
|
|
937
|
-
},
|
|
938
|
-
action: _constant.RendererEventAction.MAIN_SET_ALLOW_GET_LIVE_STREAMING_LINK
|
|
939
|
-
}, {
|
|
940
|
-
observable: function observable() {
|
|
941
|
-
return _this3.hasAllowScreenShareAndBoardPermission();
|
|
942
|
-
},
|
|
943
|
-
action: _constant.RendererEventAction.SET_ALLOW_SHARE_SCREEN_AND_BOARD
|
|
944
|
-
}, {
|
|
945
|
-
observable: function observable() {
|
|
946
|
-
return _this3.hasAllowWriteBoardPermission();
|
|
947
|
-
},
|
|
948
|
-
action: _constant.RendererEventAction.SET_ALLOW_WRITE_BOARD
|
|
949
|
-
},
|
|
950
|
-
// security item permission
|
|
951
|
-
{
|
|
952
|
-
observable: function observable() {
|
|
953
|
-
return _this3.hasEnableStartScreenSharePermission();
|
|
954
|
-
},
|
|
955
|
-
action: _constant.RendererEventAction.START_SCREEN_SHARE_PERMISSION
|
|
956
|
-
}, {
|
|
957
|
-
observable: function observable() {
|
|
958
|
-
return _this3.hasPermissionToControlAllowSendAll();
|
|
959
|
-
},
|
|
960
|
-
action: _constant.RendererEventAction.ALLOW_SEND_ALL_PERMISSION
|
|
961
|
-
}, {
|
|
962
|
-
observable: function observable() {
|
|
963
|
-
return _this3.hasEnableStartAudioPermission();
|
|
964
|
-
},
|
|
965
|
-
action: _constant.RendererEventAction.START_AUDIO_PERMISSION
|
|
966
|
-
}, {
|
|
967
|
-
observable: function observable() {
|
|
968
|
-
return _this3.hasEnableChangeNamePermission();
|
|
969
|
-
},
|
|
970
|
-
action: _constant.RendererEventAction.CHANGE_NAME_PERMISSION
|
|
971
|
-
}, {
|
|
972
|
-
observable: function observable() {
|
|
973
|
-
return _this3.hasEnableStartVideoPermission();
|
|
974
|
-
},
|
|
975
|
-
action: _constant.RendererEventAction.START_VIDEO_PERMISSION
|
|
976
|
-
}, {
|
|
977
|
-
observable: function observable() {
|
|
978
|
-
return _this3.hasLockRoomPermission();
|
|
979
|
-
},
|
|
980
|
-
action: _constant.RendererEventAction.LOCK_ROOM_PERMISSION
|
|
981
|
-
}];
|
|
982
|
-
securityReactions.forEach(function (_ref19) {
|
|
983
|
-
var observable = _ref19.observable,
|
|
984
|
-
action = _ref19.action;
|
|
985
|
-
_this3._disposers.push((0, _mobx.reaction)(observable, function (allow) {
|
|
986
|
-
window.runtime.sendEvent({
|
|
987
|
-
action: action,
|
|
988
|
-
payload: {
|
|
989
|
-
allow: allow
|
|
990
|
-
}
|
|
991
|
-
});
|
|
992
|
-
}));
|
|
993
|
-
});
|
|
994
|
-
}
|
|
941
|
+
return setAllowWaterMark;
|
|
942
|
+
}()
|
|
995
943
|
}, {
|
|
996
|
-
key: "
|
|
997
|
-
value: function
|
|
998
|
-
this.
|
|
999
|
-
return d();
|
|
1000
|
-
});
|
|
1001
|
-
this._disposers = [];
|
|
944
|
+
key: "setInterpreterRoomControlInfo",
|
|
945
|
+
value: function setInterpreterRoomControlInfo(payload) {
|
|
946
|
+
this._InterpreterRoomControlInfo = payload;
|
|
1002
947
|
}
|
|
1003
948
|
}]);
|
|
1004
949
|
}();
|
|
1005
950
|
_FcrSecurityStore = FcrSecurityStore;
|
|
1006
|
-
var _applyDecs$e = _applyDecs(_FcrSecurityStore, [[_mobx.observable, 1, "securityInfos"], [_mobx.observable, 1, "permissionInfos"], [_mobx.observable, 1, "privilegeOperator"], [_mobx.observable, 1, "boardOwnerUser"], [_handlePermissionUpdatedDecs, 18, "_handlePermissionUpdated"], [_handleSecurityUpdatedDecs, 18, "_handleSecurityUpdated"], [_decorator.bound, 2, "
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
_applyDecs$e;
|
|
951
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_FcrSecurityStore, [[_mobx.observable, 1, "securityInfos"], [_mobx.observable, 1, "permissionInfos"], [_mobx.observable, 1, "privilegeOperator"], [_mobx.observable, 1, "boardOwnerUser"], [_handlePermissionUpdatedDecs, 18, "_handlePermissionUpdated"], [_handleSecurityUpdatedDecs, 18, "_handleSecurityUpdated"], [_decorator.bound, 2, "setAllowWaterMark"], [_decorator.bound, 2, "setInterpreterRoomControlInfo"]], []).e, 5);
|
|
952
|
+
_init_securityInfos = _applyDecs$e[0];
|
|
953
|
+
_init_permissionInfos = _applyDecs$e[1];
|
|
954
|
+
_init_privilegeOperator = _applyDecs$e[2];
|
|
955
|
+
_init_boardOwnerUser = _applyDecs$e[3];
|
|
956
|
+
_initProto = _applyDecs$e[4];
|
|
957
|
+
var SecurityStoreContext = exports.SecurityStoreContext = /*#__PURE__*/(0, _react.createContext)(null);
|