fcr-ui-scene 3.2.0 → 3.3.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/installer/icons/favicon.ico +0 -0
- package/installer/icons/favicon.png +0 -0
- package/installer/mac/entitlements.mac.plist +16 -0
- package/lib/common/device-store.d.ts +1 -1
- package/lib/common/device-store.js +11 -3
- package/lib/common/event-store.d.ts +17 -1
- package/lib/common/event-store.js +38 -5
- package/lib/common/security-store.d.ts +14 -4
- package/lib/common/security-store.js +149 -30
- package/lib/electron/bootstrap-dev.d.ts +1 -0
- package/lib/electron/bootstrap-dev.js +51 -0
- package/lib/electron/bootstrap-sdk.d.ts +1 -0
- package/lib/electron/bootstrap-sdk.js +56 -0
- package/lib/electron/bootstrap.d.ts +1 -0
- package/lib/electron/bootstrap.js +56 -0
- package/lib/electron/default-options.js +1 -1
- package/lib/electron/dev.d.ts +1 -0
- package/lib/electron/dev.js +51 -0
- package/lib/electron/injections.d.ts +1 -1
- package/lib/electron/injections.js +3 -6
- package/lib/electron/main.js +4 -16
- package/lib/electron/plugins/meeting-state.d.ts +2 -0
- package/lib/electron/plugins/meeting-state.js +39 -0
- package/lib/electron/preload.js +1 -1
- package/lib/fragments/control-bar/control-bar-store.d.ts +34 -1
- package/lib/fragments/control-bar/control-bar-store.js +371 -79
- 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 +18 -0
- package/lib/fragments/control-bar/meeting-details/meeting-detail.css +109 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.d.ts +3 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details-portal.js +60 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.d.ts +2 -0
- package/lib/fragments/control-bar/meeting-details/meeting-details.js +179 -0
- package/lib/fragments/control-bar/more-actions/index.css +53 -0
- package/lib/fragments/control-bar/more-actions/index.js +72 -37
- package/lib/fragments/control-bar/security-content/index.css +10 -0
- package/lib/fragments/control-bar/security-content/index.js +40 -18
- package/lib/fragments/control-bar/view.js +8 -2
- package/lib/login-confirm-dialog.d.ts +12 -0
- package/lib/login-confirm-dialog.js +80 -0
- package/lib/modules/action-bar/action-bar-collapes-items.js +5 -5
- package/lib/modules/action-bar/chat/index.js +5 -5
- package/lib/modules/action-bar/device/index.css +7 -2
- package/lib/modules/action-bar/device/index.js +4 -4
- package/lib/modules/action-bar/index.css +59 -12
- package/lib/modules/action-bar/index.d.ts +3 -2
- package/lib/modules/action-bar/index.dev.js +1 -1
- package/lib/modules/action-bar/index.js +21 -0
- 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.js +29 -6
- package/lib/modules/action-bar/leave/leave-meeting.d.ts +11 -0
- package/lib/modules/action-bar/leave/leave-meeting.js +25 -16
- package/lib/modules/action-bar/more/poppover-content.js +4 -4
- package/lib/modules/action-bar/participants/index.css +12 -0
- package/lib/modules/action-bar/participants/index.js +21 -14
- package/lib/modules/action-bar/screen-share/index.js +5 -1
- package/lib/modules/action-bar/screen-share/submenu.js +16 -22
- package/lib/modules/action-bar/security/drop-menu.js +90 -13
- package/lib/modules/action-bar/store.d.ts +38 -6
- package/lib/modules/action-bar/store.js +487 -95
- package/lib/modules/action-bar/view.js +65 -42
- package/lib/modules/chat/chat-bar/index.js +39 -27
- package/lib/modules/chat/chat-select/index.css +14 -4
- package/lib/modules/chat/chat.d.ts +1 -2
- package/lib/modules/chat/chat.js +184 -105
- package/lib/modules/chat/index.css +49 -0
- package/lib/modules/chat/index.d.ts +2 -2
- package/lib/modules/chat/index.dev.js +1 -1
- package/lib/modules/chat/index.js +13 -8
- package/lib/modules/chat/message-list.js +59 -48
- package/lib/modules/chat/store.d.ts +48 -2
- package/lib/modules/chat/store.js +258 -45
- package/lib/modules/connection-gateway/index.d.ts +2 -1
- package/lib/modules/connection-gateway/store.d.ts +6 -3
- package/lib/modules/connection-gateway/store.js +5 -1
- package/lib/modules/device-pretest/audio-preview/speaker-control.js +1 -1
- package/lib/modules/device-pretest/index.css +0 -4
- package/lib/modules/device-pretest/settings/beauty.js +17 -6
- package/lib/modules/device-pretest/store.js +7 -11
- package/lib/modules/dialog/components/chat/electron.js +2 -1
- package/lib/modules/dialog/components/confirm/electron.js +5 -3
- package/lib/modules/dialog/components/connection-gateway/electron.js +3 -1
- package/lib/modules/dialog/components/connection-gateway/index.css +0 -2
- package/lib/modules/dialog/components/device-setting/electron.js +3 -1
- package/lib/modules/dialog/components/device-setting/index.css +0 -1
- package/lib/modules/dialog/components/operation-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.css +44 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/operation-waiting-room/index.js +156 -0
- package/lib/modules/dialog/components/participant/electron.js +2 -1
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/electron.js +89 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.css +50 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.d.ts +5 -0
- package/lib/modules/dialog/components/remove-admit-waiting-room/index.js +90 -0
- package/lib/modules/dialog/components/whiteboard/index.js +2 -1
- package/lib/modules/dialog/dialogs.js +17 -13
- package/lib/modules/dialog/index.css +2 -0
- package/lib/modules/dialog/store.d.ts +4 -0
- package/lib/modules/dialog/store.js +16 -2
- package/lib/modules/event-notification/context.d.ts +2 -0
- package/lib/modules/event-notification/context.js +9 -0
- package/lib/modules/event-notification/index.css +58 -0
- package/lib/modules/event-notification/index.d.ts +13 -0
- package/lib/modules/event-notification/index.js +48 -0
- package/lib/modules/event-notification/store.d.ts +17 -0
- package/lib/modules/event-notification/store.js +133 -0
- package/lib/modules/event-notification/view.d.ts +5 -0
- package/lib/modules/event-notification/view.js +114 -0
- package/lib/modules/invite/index.css +4 -4
- package/lib/modules/invite/pstn-invite.js +1 -0
- package/lib/modules/layout/components/Gallery.js +7 -1
- package/lib/modules/layout/components/Layout.js +82 -57
- package/lib/modules/layout/components/index.css +33 -6
- package/lib/modules/layout/index.css +30 -0
- package/lib/modules/layout/member-window/index.js +9 -3
- package/lib/modules/layout/store.d.ts +19 -2
- package/lib/modules/layout/store.js +177 -70
- package/lib/modules/layout/video-window-datasource.d.ts +1 -1
- package/lib/modules/layout/video-window-datasource.js +1 -1
- package/lib/modules/live-streaming/index.dev.js +1 -1
- package/lib/modules/participant/attendee/index.d.ts +12 -3
- package/lib/modules/participant/attendee/index.js +132 -30
- package/lib/modules/participant/index.css +20 -0
- package/lib/modules/participant/index.d.ts +5 -2
- package/lib/modules/participant/index.dev.js +1 -1
- package/lib/modules/participant/index.js +27 -0
- package/lib/modules/participant/room-control-drop-menu/index.css +37 -0
- package/lib/modules/participant/store.d.ts +30 -5
- package/lib/modules/participant/store.js +347 -74
- package/lib/modules/participant/view.js +133 -34
- package/lib/modules/setting/index.css +1 -5
- package/lib/modules/setting/index.dev.js +1 -1
- package/lib/modules/setting/store.d.ts +2 -2
- package/lib/modules/setting/store.js +3 -8
- package/lib/modules/setting/translate-settings/translate-settings.js +1 -1
- package/lib/modules/setting/video-settings/index.css +9 -6
- package/lib/modules/share-screen/index.d.ts +2 -0
- package/lib/modules/share-screen/index.dev.js +3 -2
- package/lib/modules/share-screen/selection/index.css +2 -0
- package/lib/modules/share-screen/store.d.ts +6 -3
- package/lib/modules/share-screen/store.js +170 -129
- package/lib/modules/state-bar/index.css +2 -2
- package/lib/modules/state-bar/index.d.ts +2 -2
- package/lib/modules/state-bar/index.dev.js +1 -1
- package/lib/modules/state-bar/meeting-detail.css +6 -4
- package/lib/modules/state-bar/meeting-details.js +29 -3
- package/lib/modules/state-bar/meeting-network-state.css +14 -3
- package/lib/modules/state-bar/meeting-network-state.js +10 -4
- package/lib/modules/state-bar/recording.js +3 -5
- package/lib/modules/state-bar/store.d.ts +4 -2
- package/lib/modules/state-bar/store.js +18 -3
- package/lib/modules/state-bar/view.js +1 -6
- package/lib/modules/video-window/index.css +1 -0
- package/lib/modules/video-window/store.d.ts +2 -2
- package/lib/modules/video-window/store.js +14 -11
- package/lib/modules/waiting-room-layout/context.d.ts +2 -0
- package/lib/modules/waiting-room-layout/context.js +9 -0
- package/lib/modules/waiting-room-layout/index.css +71 -0
- package/lib/modules/waiting-room-layout/index.d.ts +8 -0
- package/lib/modules/waiting-room-layout/index.js +47 -0
- package/lib/modules/waiting-room-layout/store.d.ts +30 -0
- package/lib/modules/waiting-room-layout/store.js +189 -0
- package/lib/modules/waiting-room-layout/type.d.ts +0 -0
- package/lib/modules/waiting-room-layout/type.js +1 -0
- package/lib/modules/waiting-room-layout/view.d.ts +3 -0
- package/lib/modules/waiting-room-layout/view.js +67 -0
- package/lib/modules/whiteboard/app.js +0 -6
- package/lib/modules/whiteboard/components/control-bar/index.css +3 -0
- package/lib/modules/whiteboard/components/multi-window/index.js +6 -1
- package/lib/modules/whiteboard/components/progress/electron.js +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.css +4 -0
- package/lib/modules/whiteboard/components/switch-theme/index.d.ts +2 -1
- package/lib/modules/whiteboard/components/switch-theme/index.js +20 -15
- package/lib/modules/whiteboard/components/switch-theme/item.d.ts +1 -0
- package/lib/modules/whiteboard/components/switch-theme/item.js +9 -2
- package/lib/modules/whiteboard/components/toolbar/components/shape-picker.js +14 -10
- package/lib/modules/whiteboard/components/toolbar/store.d.ts +1 -0
- package/lib/modules/whiteboard/components/toolbar/store.js +3 -0
- package/lib/modules/whiteboard/context.d.ts +4 -0
- package/lib/modules/whiteboard/context.js +4 -2
- package/lib/modules/whiteboard/index.js +22 -6
- package/lib/plugins/browser-runtime-plugin.js +1 -1
- package/lib/plugins/module-dev-plugin.js +8 -6
- package/lib/runtime.d.ts +1 -1
- package/lib/translations/enUS.d.ts +449 -6
- package/lib/translations/enUS.js +485 -32
- package/lib/translations/zhCN.d.ts +447 -6
- package/lib/translations/zhCN.js +468 -17
- package/lib/type.d.ts +6 -2
- package/lib/ui-manager.d.ts +7 -3
- package/lib/ui-manager.js +576 -139
- package/lib/ui-scene.d.ts +1 -0
- package/lib/ui-scene.js +26 -21
- package/lib/utilities/constant.d.ts +43 -4
- package/lib/utilities/constant.js +41 -1
- package/lib/utilities/parameters.js +2 -2
- package/lib/utilities/renderer.d.ts +1 -0
- package/lib/utilities/renderer.js +6 -2
- package/package.json +14 -14
- package/public/assets/fcr_defaultpage.png +0 -0
- package/public/assets/login_confirm.png +0 -0
- package/public/index.html +29 -11
- package/dist/132.js +0 -2
- package/dist/132.js.LICENSE.txt +0 -311
- package/dist/651.js +0 -2
- package/dist/651.js.LICENSE.txt +0 -1
- package/dist/73.js +0 -1
- package/dist/index.html +0 -13
- package/dist/main.da7c203ab32d15742cfe.css +0 -11760
- package/dist/main.js +0 -2
- package/dist/main.js.LICENSE.txt +0 -254
- package/dist/worker-entry.worker.js.LICENSE.txt +0 -13
- package/lib/modules/device-pretest/settings/index.css +0 -15
- package/lib/modules/participant/attendee/participants-more-action.d.ts +0 -18
- package/lib/modules/participant/attendee/participants-more-action.js +0 -278
|
@@ -22,7 +22,7 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
22
22
|
Object.defineProperty(exports, "__esModule", {
|
|
23
23
|
value: true
|
|
24
24
|
});
|
|
25
|
-
exports["default"] = exports.allToUser = exports.USER_NONE = exports.USER_ALL = void 0;
|
|
25
|
+
exports["default"] = exports.allToUser = exports.USER_NONE = exports.USER_ALL = exports.ChatRoomStore = void 0;
|
|
26
26
|
exports.isManager = isManager;
|
|
27
27
|
exports.noUser = void 0;
|
|
28
28
|
exports.sortUsers = sortUsers;
|
|
@@ -72,9 +72,9 @@ require("core-js/modules/esnext.weak-map.emplace.js");
|
|
|
72
72
|
require("core-js/modules/web.dom-collections.for-each.js");
|
|
73
73
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
74
74
|
require("core-js/modules/web.timers.js");
|
|
75
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
76
75
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
77
76
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
77
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
78
78
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
79
79
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
80
80
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
@@ -88,8 +88,10 @@ var _reactVirtualized = require("react-virtualized");
|
|
|
88
88
|
var _constant = require("../../utilities/constant");
|
|
89
89
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
90
90
|
var _type2 = require("agora-edu-core/lib/room-control/chatroom-control/type");
|
|
91
|
-
var
|
|
92
|
-
var
|
|
91
|
+
var _type3 = require("agora-edu-core/lib/room-control/type");
|
|
92
|
+
var _observable = require("agora-foundation/lib/utilities/observable");
|
|
93
|
+
var _ChatStore, _ChatRoomStore;
|
|
94
|
+
var _initProto, _init_chatRoomStores, _init_activeTabIndex, _handleReceiveMessageDecs, _handlerActiveTabDecs, _handleEventDecs, _ref, _initProto2, _init__userInfo, _init_messageList, _init_readMsgIndex, _init_readIdx, _init_viewIdx, _init_historyUnreadCount, _init_hasHistoryMsg, _init_newMsgsUnReadCnt, _init_privateTargetUser, _init_chatLevel, _init_currentUserMap, _init_textMsg, _init_privateTargetList, _init_chatRoomState, _init_hasNewMsg, _init_userCount, _init_unReadMsgCount, _setLastScrollTopDecs, _setMessageListDecs, _sendMessageDecs, _setUnReadMsgCountDecs, _setHasNewMsgDecs, _handleTextMessageReceivedDecs, _getUserCountDecs, _onRemoteUserUpdateDecs, _refreshUserListDecs, _handleNewMsgDecs, _updateReadMsgIndexDecs, _initReadInfoDecs, _updateHistoryUnreadCntDecs, _updateHasHistoryMsgDecs, _updateScrollInfoDecs, _updateViewIdxDecs, _updateReadIdxDecs, _updateFirstMsgIdDecs, _updateHistoryUnReadCountDecs, _updateListDecs, _updateMostRecentHeightDecs, _updateMostRecentWidthDecs, _patchHandleMsgDecs, _forceNotifyMsgsDecs, _resetComponentCacheDecs, _resetTargetUserDecs, _initChatLevelDecs, _setTargetUserDecs, _updateChatLevelDecs, _updateChatTextMsgDecs, _filterChatMemberDecs, _hasSendMessagePermissionDecs, _permitPrivateChatDecs, _handleToastDecs, _handleConnectionUpdatedDecs, _ref3;
|
|
93
95
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
94
96
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
95
97
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -121,6 +123,136 @@ var noUser = exports.noUser = {
|
|
|
121
123
|
};
|
|
122
124
|
var _A = /*#__PURE__*/new WeakMap();
|
|
123
125
|
var _B = /*#__PURE__*/new WeakMap();
|
|
126
|
+
_ref = (_handleReceiveMessageDecs = [_mobx.action, _mobx.action.bound], _handlerActiveTabDecs = [_mobx.action, _mobx.action.bound], _handleEventDecs = [_mobx.action, _mobx.action.bound], "_observable");
|
|
127
|
+
var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
128
|
+
function ChatStore(_ref2) {
|
|
129
|
+
var _roomControl$getRoomI;
|
|
130
|
+
var chatRoomControl = _ref2.chatRoomControl,
|
|
131
|
+
userControl = _ref2.userControl,
|
|
132
|
+
uiEventStore = _ref2.uiEventStore,
|
|
133
|
+
securityStore = _ref2.securityStore,
|
|
134
|
+
roomControl = _ref2.roomControl;
|
|
135
|
+
(0, _classCallCheck2["default"])(this, ChatStore);
|
|
136
|
+
(0, _defineProperty2["default"])(this, _ref, (_initProto(this), new _observable.AgoraObservable()));
|
|
137
|
+
(0, _defineProperty2["default"])(this, "_chatVisible", false);
|
|
138
|
+
(0, _defineProperty2["default"])(this, "_eventObserver", {
|
|
139
|
+
onEvent: this._handleEvent
|
|
140
|
+
});
|
|
141
|
+
(0, _defineProperty2["default"])(this, "_chatStoreObserver", {
|
|
142
|
+
onReceiveMessage: this._handleReceiveMessage.bind(this)
|
|
143
|
+
});
|
|
144
|
+
_classPrivateFieldInitSpec(this, _A, _init_chatRoomStores(this, {}));
|
|
145
|
+
_classPrivateFieldInitSpec(this, _B, _init_activeTabIndex(this, _constant.RoomType.MAIN_ROOM));
|
|
146
|
+
this._securityStore = securityStore;
|
|
147
|
+
this._uiEventStore = uiEventStore;
|
|
148
|
+
uiEventStore.addObserver(this._eventObserver);
|
|
149
|
+
this._observable.addObserver(this._chatStoreObserver);
|
|
150
|
+
var isMainroom = ((_roomControl$getRoomI = roomControl.getRoomInfo()) === null || _roomControl$getRoomI === void 0 ? void 0 : _roomControl$getRoomI.roomType) === _type3.FcrRoomType.Mainroom;
|
|
151
|
+
var type = isMainroom ? _constant.RoomType.MAIN_ROOM : _constant.RoomType.WAITING_ROOM;
|
|
152
|
+
this.activeTabIndex = isMainroom ? _constant.RoomType.MAIN_ROOM : _constant.RoomType.WAITING_ROOM;
|
|
153
|
+
this.chatRoomStores[type] = new ChatRoomStore({
|
|
154
|
+
chatRoomControl: chatRoomControl,
|
|
155
|
+
userControl: userControl,
|
|
156
|
+
uiEventStore: uiEventStore,
|
|
157
|
+
securityStore: securityStore,
|
|
158
|
+
type: type,
|
|
159
|
+
chatStoreObservable: this._observable
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
return (0, _createClass2["default"])(ChatStore, [{
|
|
163
|
+
key: "chatRoomStores",
|
|
164
|
+
get: function get() {
|
|
165
|
+
return _classPrivateFieldGet(_A, this);
|
|
166
|
+
},
|
|
167
|
+
set: function set(v) {
|
|
168
|
+
_classPrivateFieldSet(_A, this, v);
|
|
169
|
+
}
|
|
170
|
+
}, {
|
|
171
|
+
key: "activeTabIndex",
|
|
172
|
+
get: function get() {
|
|
173
|
+
return _classPrivateFieldGet(_B, this);
|
|
174
|
+
},
|
|
175
|
+
set: function set(v) {
|
|
176
|
+
_classPrivateFieldSet(_B, this, v);
|
|
177
|
+
}
|
|
178
|
+
}, {
|
|
179
|
+
key: "hasWaitingRoomPermission",
|
|
180
|
+
value: function hasWaitingRoomPermission() {
|
|
181
|
+
return this._securityStore.isWaitingRoomEnabled() && this._securityStore.hasWaitingRoomPermission();
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
key: "_handleReceiveMessage",
|
|
185
|
+
value: function _handleReceiveMessage(noitfyMsgs, type) {
|
|
186
|
+
if (this.activeTabIndex !== type || !this._chatVisible) {
|
|
187
|
+
var _this$chatRoomStores$, _this$chatRoomStores$2;
|
|
188
|
+
(_this$chatRoomStores$ = this.chatRoomStores[type]) === null || _this$chatRoomStores$ === void 0 || _this$chatRoomStores$.setUnReadMsgCount(noitfyMsgs.length + ((_this$chatRoomStores$2 = this.chatRoomStores[type]) === null || _this$chatRoomStores$2 === void 0 ? void 0 : _this$chatRoomStores$2.unReadMsgCount));
|
|
189
|
+
this._uiEventStore.receiveNewChatMessages({
|
|
190
|
+
latestMessage: noitfyMsgs[noitfyMsgs.length - 1],
|
|
191
|
+
count: noitfyMsgs.length,
|
|
192
|
+
type: type
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}, {
|
|
197
|
+
key: "handlerActiveTab",
|
|
198
|
+
value: function handlerActiveTab(key) {
|
|
199
|
+
var _this$chatRoomStores$3, _this$chatRoomStores$4;
|
|
200
|
+
this.activeTabIndex = key;
|
|
201
|
+
(_this$chatRoomStores$3 = this.chatRoomStores[key]) === null || _this$chatRoomStores$3 === void 0 || _this$chatRoomStores$3.setUnReadMsgCount(0);
|
|
202
|
+
(_this$chatRoomStores$4 = this.chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _this$chatRoomStores$4 === void 0 || _this$chatRoomStores$4.setHasNewMsg(false);
|
|
203
|
+
this._uiEventStore.sendEvent(_constant.UIAction.CHAT_ROOM_TAB_CHANGE, key);
|
|
204
|
+
}
|
|
205
|
+
}, {
|
|
206
|
+
key: "_handleEvent",
|
|
207
|
+
value: function _handleEvent(action, payload) {
|
|
208
|
+
if (action === _constant.UIAction.WAITING_ROOM_CREATED) {
|
|
209
|
+
var room = payload.room;
|
|
210
|
+
var userControl = room.getUserControl();
|
|
211
|
+
var chatRoomControl = room.getChatRoomControl();
|
|
212
|
+
this.chatRoomStores[_constant.RoomType.WAITING_ROOM] = new ChatRoomStore({
|
|
213
|
+
chatRoomControl: chatRoomControl,
|
|
214
|
+
userControl: userControl,
|
|
215
|
+
uiEventStore: this._uiEventStore,
|
|
216
|
+
securityStore: payload.securityStore,
|
|
217
|
+
type: _constant.RoomType.WAITING_ROOM,
|
|
218
|
+
chatStoreObservable: this._observable
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
if (action === _constant.UIAction.RECEIVE_NEW_CHAT_MESSAGES_FOR_RED) {
|
|
222
|
+
if (this.activeTabIndex !== payload) {
|
|
223
|
+
var _this$chatRoomStores;
|
|
224
|
+
(_this$chatRoomStores = this.chatRoomStores[payload]) === null || _this$chatRoomStores === void 0 || _this$chatRoomStores.setHasNewMsg(true);
|
|
225
|
+
} else {
|
|
226
|
+
var _this$chatRoomStores2;
|
|
227
|
+
(_this$chatRoomStores2 = this.chatRoomStores[payload]) === null || _this$chatRoomStores2 === void 0 || _this$chatRoomStores2.setHasNewMsg(false);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
if (action === _constant.UIAction.CHAT_ROOM_CLOSED) {
|
|
231
|
+
this.handlerActiveTab(_constant.RoomType.MAIN_ROOM);
|
|
232
|
+
}
|
|
233
|
+
if (action === _constant.UIAction.CHAT_VISIBLE) {
|
|
234
|
+
if (payload === true) {
|
|
235
|
+
var _this$chatRoomStores$5;
|
|
236
|
+
(_this$chatRoomStores$5 = this.chatRoomStores[this.activeTabIndex]) === null || _this$chatRoomStores$5 === void 0 || _this$chatRoomStores$5.setUnReadMsgCount(0);
|
|
237
|
+
}
|
|
238
|
+
this._chatVisible = payload;
|
|
239
|
+
}
|
|
240
|
+
if (action === _constant.UIAction.WAITING_ROOM_DESTROYED) {
|
|
241
|
+
var _this$chatRoomStores$6;
|
|
242
|
+
(_this$chatRoomStores$6 = this.chatRoomStores[_constant.RoomType.WAITING_ROOM]) === null || _this$chatRoomStores$6 === void 0 || _this$chatRoomStores$6.release();
|
|
243
|
+
delete this.chatRoomStores[_constant.RoomType.WAITING_ROOM];
|
|
244
|
+
this.handlerActiveTab(_constant.RoomType.MAIN_ROOM);
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}]);
|
|
248
|
+
}();
|
|
249
|
+
_ChatStore = ChatStore;
|
|
250
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ChatStore, [[_mobx.observable, 1, "chatRoomStores"], [_mobx.observable, 1, "activeTabIndex"], [_decorator.bound, 2, "hasWaitingRoomPermission"], [_handleReceiveMessageDecs, 18, "_handleReceiveMessage"], [_handlerActiveTabDecs, 18, "handlerActiveTab"], [_handleEventDecs, 18, "_handleEvent"]], []).e, 3);
|
|
251
|
+
_init_chatRoomStores = _applyDecs$e[0];
|
|
252
|
+
_init_activeTabIndex = _applyDecs$e[1];
|
|
253
|
+
_initProto = _applyDecs$e[2];
|
|
254
|
+
var _A2 = /*#__PURE__*/new WeakMap();
|
|
255
|
+
var _B2 = /*#__PURE__*/new WeakMap();
|
|
124
256
|
var _C = /*#__PURE__*/new WeakMap();
|
|
125
257
|
var _D = /*#__PURE__*/new WeakMap();
|
|
126
258
|
var _E = /*#__PURE__*/new WeakMap();
|
|
@@ -133,17 +265,22 @@ var _K = /*#__PURE__*/new WeakMap();
|
|
|
133
265
|
var _L = /*#__PURE__*/new WeakMap();
|
|
134
266
|
var _M = /*#__PURE__*/new WeakMap();
|
|
135
267
|
var _N = /*#__PURE__*/new WeakMap();
|
|
136
|
-
|
|
137
|
-
var
|
|
138
|
-
|
|
268
|
+
var _O = /*#__PURE__*/new WeakMap();
|
|
269
|
+
var _P = /*#__PURE__*/new WeakMap();
|
|
270
|
+
var _Q = /*#__PURE__*/new WeakMap();
|
|
271
|
+
_ref3 = (_setLastScrollTopDecs = [_mobx.action, _mobx.action.bound], _setMessageListDecs = [_mobx.action, _mobx.action.bound], _sendMessageDecs = [_mobx.action, _mobx.action.bound], _setUnReadMsgCountDecs = [_mobx.action, _mobx.action.bound], _setHasNewMsgDecs = [_mobx.action, _mobx.action.bound], _handleTextMessageReceivedDecs = [_mobx.action, _mobx.action.bound], _getUserCountDecs = [_mobx.action, _mobx.action.bound], _onRemoteUserUpdateDecs = [_mobx.action, _mobx.action.bound], _refreshUserListDecs = [_mobx.action, _mobx.action.bound], _handleNewMsgDecs = [_mobx.action, _mobx.action.bound], _updateReadMsgIndexDecs = [_mobx.action, _mobx.action.bound], _initReadInfoDecs = [_mobx.action, _mobx.action.bound], _updateHistoryUnreadCntDecs = [_mobx.action, _mobx.action.bound], _updateHasHistoryMsgDecs = [_mobx.action, _mobx.action.bound], _updateScrollInfoDecs = [_mobx.action, _mobx.action.bound], _updateViewIdxDecs = [_mobx.action, _mobx.action.bound], _updateReadIdxDecs = [_mobx.action, _mobx.action.bound], _updateFirstMsgIdDecs = [_mobx.action, _mobx.action.bound], _updateHistoryUnReadCountDecs = [_mobx.action, _mobx.action.bound], _updateListDecs = [_mobx.action, _mobx.action.bound], _updateMostRecentHeightDecs = [_mobx.action, _mobx.action.bound], _updateMostRecentWidthDecs = [_mobx.action, _mobx.action.bound], _patchHandleMsgDecs = [_mobx.action, _mobx.action.bound], _forceNotifyMsgsDecs = [_mobx.action, _mobx.action.bound], _resetComponentCacheDecs = [_mobx.action, _mobx.action.bound], _resetTargetUserDecs = [_mobx.action, _mobx.action.bound], _initChatLevelDecs = [_mobx.action, _mobx.action.bound], _setTargetUserDecs = [_mobx.action, _mobx.action.bound], _updateChatLevelDecs = [_mobx.action, _mobx.action.bound], _updateChatTextMsgDecs = [_mobx.action, _mobx.action.bound], _filterChatMemberDecs = [_mobx.action, _mobx.action.bound], _hasSendMessagePermissionDecs = [_mobx.action, _mobx.action.bound], _permitPrivateChatDecs = [_mobx.action, _mobx.action.bound], _handleToastDecs = [_mobx.action, _mobx.action.bound], _handleConnectionUpdatedDecs = [_mobx.action, _mobx.action.bound], "needCbBottomCount");
|
|
272
|
+
var ChatRoomStore = exports.ChatRoomStore = /*#__PURE__*/function () {
|
|
273
|
+
function ChatRoomStore(_ref4) {
|
|
139
274
|
var _this$_chatRoomContro,
|
|
140
275
|
_this = this;
|
|
141
|
-
var chatRoomControl =
|
|
142
|
-
userControl =
|
|
143
|
-
uiEventStore =
|
|
144
|
-
securityStore =
|
|
145
|
-
|
|
146
|
-
|
|
276
|
+
var chatRoomControl = _ref4.chatRoomControl,
|
|
277
|
+
userControl = _ref4.userControl,
|
|
278
|
+
uiEventStore = _ref4.uiEventStore,
|
|
279
|
+
securityStore = _ref4.securityStore,
|
|
280
|
+
type = _ref4.type,
|
|
281
|
+
chatStoreObservable = _ref4.chatStoreObservable;
|
|
282
|
+
(0, _classCallCheck2["default"])(this, ChatRoomStore);
|
|
283
|
+
(0, _defineProperty2["default"])(this, _ref3, (_initProto2(this), 40));
|
|
147
284
|
(0, _defineProperty2["default"])(this, "mostRecentHeight", 0);
|
|
148
285
|
(0, _defineProperty2["default"])(this, "mostRecentWidth", 0);
|
|
149
286
|
(0, _defineProperty2["default"])(this, "cache", new _reactVirtualized.CellMeasurerCache({}));
|
|
@@ -160,8 +297,8 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
160
297
|
(0, _defineProperty2["default"])(this, "_maxMsgCount", 500);
|
|
161
298
|
(0, _defineProperty2["default"])(this, "_originalMessages", []);
|
|
162
299
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
163
|
-
_classPrivateFieldInitSpec(this,
|
|
164
|
-
_classPrivateFieldInitSpec(this,
|
|
300
|
+
_classPrivateFieldInitSpec(this, _A2, _init__userInfo(this));
|
|
301
|
+
_classPrivateFieldInitSpec(this, _B2, _init_messageList(this, []));
|
|
165
302
|
_classPrivateFieldInitSpec(this, _C, _init_readMsgIndex(this, {
|
|
166
303
|
index: -1,
|
|
167
304
|
msgId: ''
|
|
@@ -179,6 +316,9 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
179
316
|
_classPrivateFieldInitSpec(this, _L, _init_textMsg(this, ''));
|
|
180
317
|
_classPrivateFieldInitSpec(this, _M, _init_privateTargetList(this, []));
|
|
181
318
|
_classPrivateFieldInitSpec(this, _N, _init_chatRoomState(this, _type2.FcrChatRoomConnectionState.Disconnected));
|
|
319
|
+
_classPrivateFieldInitSpec(this, _O, _init_hasNewMsg(this, false));
|
|
320
|
+
_classPrivateFieldInitSpec(this, _P, _init_userCount(this, 0));
|
|
321
|
+
_classPrivateFieldInitSpec(this, _Q, _init_unReadMsgCount(this, 0));
|
|
182
322
|
(0, _defineProperty2["default"])(this, "_chatRoomObserver", {
|
|
183
323
|
onTextMessageReceived: this.messageReceived.bind(this),
|
|
184
324
|
onConnectionStateUpdated: this._handleConnectionUpdated.bind(this),
|
|
@@ -191,12 +331,15 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
191
331
|
onUserPropertiesDeleted: function onUserPropertiesDeleted(roomId, event) {},
|
|
192
332
|
onUserInfoUpdated: this._onUserInfoUpdated.bind(this)
|
|
193
333
|
});
|
|
334
|
+
this._type = type;
|
|
194
335
|
this._uiEventStore = uiEventStore;
|
|
195
336
|
this._securityStore = securityStore;
|
|
337
|
+
this._chatStoreObservable = chatStoreObservable;
|
|
196
338
|
// TODO: 需要查询房间历史消息, 一期预留
|
|
197
339
|
this.messageList = [];
|
|
198
340
|
this._chatRoomControl = chatRoomControl;
|
|
199
341
|
this._userControl = userControl;
|
|
342
|
+
this.userCount = this.getUserCount();
|
|
200
343
|
this._userInfo = userControl.getLocalUser();
|
|
201
344
|
(_this$_chatRoomContro = this._chatRoomControl) === null || _this$_chatRoomContro === void 0 || _this$_chatRoomContro.addObserver(this._chatRoomObserver);
|
|
202
345
|
this._userControl.addObserver(this._userObserver);
|
|
@@ -217,21 +360,21 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
217
360
|
this.initChatLevel();
|
|
218
361
|
this.resetTargetUser();
|
|
219
362
|
}
|
|
220
|
-
return (0, _createClass2["default"])(
|
|
363
|
+
return (0, _createClass2["default"])(ChatRoomStore, [{
|
|
221
364
|
key: "_userInfo",
|
|
222
365
|
get: function get() {
|
|
223
|
-
return _classPrivateFieldGet(
|
|
366
|
+
return _classPrivateFieldGet(_A2, this);
|
|
224
367
|
},
|
|
225
368
|
set: function set(v) {
|
|
226
|
-
_classPrivateFieldSet(
|
|
369
|
+
_classPrivateFieldSet(_A2, this, v);
|
|
227
370
|
}
|
|
228
371
|
}, {
|
|
229
372
|
key: "messageList",
|
|
230
373
|
get: function get() {
|
|
231
|
-
return _classPrivateFieldGet(
|
|
374
|
+
return _classPrivateFieldGet(_B2, this);
|
|
232
375
|
},
|
|
233
376
|
set: function set(v) {
|
|
234
|
-
_classPrivateFieldSet(
|
|
377
|
+
_classPrivateFieldSet(_B2, this, v);
|
|
235
378
|
}
|
|
236
379
|
}, {
|
|
237
380
|
key: "readMsgIndex",
|
|
@@ -329,6 +472,30 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
329
472
|
set: function set(v) {
|
|
330
473
|
_classPrivateFieldSet(_N, this, v);
|
|
331
474
|
}
|
|
475
|
+
}, {
|
|
476
|
+
key: "hasNewMsg",
|
|
477
|
+
get: function get() {
|
|
478
|
+
return _classPrivateFieldGet(_O, this);
|
|
479
|
+
},
|
|
480
|
+
set: function set(v) {
|
|
481
|
+
_classPrivateFieldSet(_O, this, v);
|
|
482
|
+
}
|
|
483
|
+
}, {
|
|
484
|
+
key: "userCount",
|
|
485
|
+
get: function get() {
|
|
486
|
+
return _classPrivateFieldGet(_P, this);
|
|
487
|
+
},
|
|
488
|
+
set: function set(v) {
|
|
489
|
+
_classPrivateFieldSet(_P, this, v);
|
|
490
|
+
}
|
|
491
|
+
}, {
|
|
492
|
+
key: "unReadMsgCount",
|
|
493
|
+
get: function get() {
|
|
494
|
+
return _classPrivateFieldGet(_Q, this);
|
|
495
|
+
},
|
|
496
|
+
set: function set(v) {
|
|
497
|
+
_classPrivateFieldSet(_Q, this, v);
|
|
498
|
+
}
|
|
332
499
|
}, {
|
|
333
500
|
key: "release",
|
|
334
501
|
value: function release() {
|
|
@@ -407,6 +574,17 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
407
574
|
key: "messageReceived",
|
|
408
575
|
value: function messageReceived(_roomId, msg) {
|
|
409
576
|
this._originalMessages.push(msg);
|
|
577
|
+
this._uiEventStore.sendEvent(_constant.UIAction.RECEIVE_NEW_CHAT_MESSAGES_FOR_RED, this._type);
|
|
578
|
+
}
|
|
579
|
+
}, {
|
|
580
|
+
key: "setUnReadMsgCount",
|
|
581
|
+
value: function setUnReadMsgCount(count) {
|
|
582
|
+
this.unReadMsgCount = count;
|
|
583
|
+
}
|
|
584
|
+
}, {
|
|
585
|
+
key: "setHasNewMsg",
|
|
586
|
+
value: function setHasNewMsg(value) {
|
|
587
|
+
this.hasNewMsg = value;
|
|
410
588
|
}
|
|
411
589
|
}, {
|
|
412
590
|
key: "_handleTextMessageReceived",
|
|
@@ -454,12 +632,25 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
454
632
|
img: message.file
|
|
455
633
|
}));
|
|
456
634
|
}
|
|
635
|
+
}, {
|
|
636
|
+
key: "getUserCount",
|
|
637
|
+
value: function getUserCount() {
|
|
638
|
+
return this._userControl.getUserList().filter(function (user) {
|
|
639
|
+
return user.userRole === _type.FcrUserRole.PARTICIPANT;
|
|
640
|
+
}).length;
|
|
641
|
+
}
|
|
457
642
|
}, {
|
|
458
643
|
key: "_onRemoteUserUpdate",
|
|
459
644
|
value: function _onRemoteUserUpdate(roomId, events) {
|
|
460
645
|
console.log({
|
|
461
646
|
events: events
|
|
462
647
|
}, 'remoteUser update');
|
|
648
|
+
if (this._type === _constant.RoomType.WAITING_ROOM) {
|
|
649
|
+
this.userCount = this.getUserCount();
|
|
650
|
+
if (this.userCount === 0) {
|
|
651
|
+
this._uiEventStore.sendEvent(_constant.UIAction.CHAT_ROOM_CLOSED, this._type);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
463
654
|
this._refreshUserList();
|
|
464
655
|
}
|
|
465
656
|
}, {
|
|
@@ -547,6 +738,11 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
547
738
|
get: function get() {
|
|
548
739
|
return this._securityStore.hasChatSendPublicPermission();
|
|
549
740
|
}
|
|
741
|
+
}, {
|
|
742
|
+
key: "hasChatSendPrivatePermission",
|
|
743
|
+
get: function get() {
|
|
744
|
+
return this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.HOST) || this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.COHOST);
|
|
745
|
+
}
|
|
550
746
|
}, {
|
|
551
747
|
key: "isHost",
|
|
552
748
|
get: function get() {
|
|
@@ -682,10 +878,7 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
682
878
|
notifyMsgs.forEach(function (msg) {
|
|
683
879
|
_this3._handleTextMessageReceived(msg);
|
|
684
880
|
});
|
|
685
|
-
notifyMsgs.length > 0 && this.
|
|
686
|
-
latestMessage: notifyMsgs[notifyMsgs.length - 1],
|
|
687
|
-
count: notifyMsgs.length
|
|
688
|
-
});
|
|
881
|
+
notifyMsgs.length > 0 && this._chatStoreObservable.notifyObservers('onReceiveMessage', notifyMsgs, this._type);
|
|
689
882
|
|
|
690
883
|
// TODO: 消息批量更新, 优化
|
|
691
884
|
}
|
|
@@ -765,10 +958,10 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
765
958
|
key: "handleChatPermissionUpdate",
|
|
766
959
|
value: function handleChatPermissionUpdate(chatLevel) {
|
|
767
960
|
var _this$privilegeOperat;
|
|
768
|
-
var
|
|
769
|
-
userId =
|
|
770
|
-
userName =
|
|
771
|
-
userRole =
|
|
961
|
+
var _ref5 = (_this$privilegeOperat = this.privilegeOperator) !== null && _this$privilegeOperat !== void 0 ? _this$privilegeOperat : {},
|
|
962
|
+
userId = _ref5.userId,
|
|
963
|
+
userName = _ref5.userName,
|
|
964
|
+
userRole = _ref5.userRole;
|
|
772
965
|
var msg = {
|
|
773
966
|
id: String(new Date().getTime()),
|
|
774
967
|
role: userRole === _type.FcrUserRole.PARTICIPANT ? 'participant' : userRole === _type.FcrUserRole.COHOST ? 'union-host' : 'host',
|
|
@@ -800,6 +993,23 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
800
993
|
value: function updateChatTextMsg(txt) {
|
|
801
994
|
this.textMsg = txt;
|
|
802
995
|
}
|
|
996
|
+
}, {
|
|
997
|
+
key: "filterChatMember",
|
|
998
|
+
value: function filterChatMember(list) {
|
|
999
|
+
var _this6 = this;
|
|
1000
|
+
var res = list.filter(function (user) {
|
|
1001
|
+
return _this6._securityStore.hasChatSendPublicPermissionByTargetRole(user.userRole) || _this6._securityStore.hasPermissionToSendPrivateMessage(user.userRole) || user.userId === USER_ALL;
|
|
1002
|
+
});
|
|
1003
|
+
if (res.length && _constant.RoomType.WAITING_ROOM === this._type && !this.localIsManager) {
|
|
1004
|
+
this.setTargetUser(res[0]);
|
|
1005
|
+
}
|
|
1006
|
+
return res;
|
|
1007
|
+
}
|
|
1008
|
+
}, {
|
|
1009
|
+
key: "hasSendMessagePermission",
|
|
1010
|
+
value: function hasSendMessagePermission() {
|
|
1011
|
+
return this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.HOST) || this._securityStore.hasPermissionToSendPrivateMessage(_type.FcrUserRole.COHOST) || this._securityStore.hasChatSendPublicPermissionByTargetRole(_type.FcrUserRole.PARTICIPANT) || this._securityStore.hasChatSendPublicPermissionByTargetRole(_type.FcrUserRole.HOST) || this._securityStore.hasChatSendPublicPermissionByTargetRole(_type.FcrUserRole.COHOST);
|
|
1012
|
+
}
|
|
803
1013
|
}, {
|
|
804
1014
|
key: "permitPrivateChat",
|
|
805
1015
|
value: function permitPrivateChat(userId) {
|
|
@@ -852,23 +1062,26 @@ var ChatStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
852
1062
|
}
|
|
853
1063
|
}]);
|
|
854
1064
|
}();
|
|
855
|
-
|
|
856
|
-
var _applyDecs$
|
|
857
|
-
_init__userInfo = _applyDecs$
|
|
858
|
-
_init_messageList = _applyDecs$
|
|
859
|
-
_init_readMsgIndex = _applyDecs$
|
|
860
|
-
_init_readIdx = _applyDecs$
|
|
861
|
-
_init_viewIdx = _applyDecs$
|
|
862
|
-
_init_historyUnreadCount = _applyDecs$
|
|
863
|
-
_init_hasHistoryMsg = _applyDecs$
|
|
864
|
-
_init_newMsgsUnReadCnt = _applyDecs$
|
|
865
|
-
_init_privateTargetUser = _applyDecs$
|
|
866
|
-
_init_chatLevel = _applyDecs$
|
|
867
|
-
_init_currentUserMap = _applyDecs$
|
|
868
|
-
_init_textMsg = _applyDecs$
|
|
869
|
-
_init_privateTargetList = _applyDecs$
|
|
870
|
-
_init_chatRoomState = _applyDecs$
|
|
871
|
-
|
|
1065
|
+
_ChatRoomStore = ChatRoomStore;
|
|
1066
|
+
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs(_ChatRoomStore, [[_mobx.observable, 1, "_userInfo"], [_mobx.observable, 1, "messageList"], [_mobx.observable, 1, "readMsgIndex"], [_mobx.observable, 1, "readIdx"], [_mobx.observable, 1, "viewIdx"], [_mobx.observable, 1, "historyUnreadCount"], [_mobx.observable, 1, "hasHistoryMsg"], [_mobx.observable, 1, "newMsgsUnReadCnt"], [_mobx.observable, 1, "privateTargetUser"], [_mobx.observable, 1, "chatLevel"], [_mobx.observable, 1, "currentUserMap"], [_mobx.observable, 1, "textMsg"], [_mobx.observable, 1, "privateTargetList"], [_mobx.observable, 1, "chatRoomState"], [_mobx.observable, 1, "hasNewMsg"], [_mobx.observable, 1, "userCount"], [_mobx.observable, 1, "unReadMsgCount"], [_setLastScrollTopDecs, 18, "setLastScrollTop"], [_setMessageListDecs, 18, "setMessageList"], [_sendMessageDecs, 18, "sendMessage"], [_setUnReadMsgCountDecs, 18, "setUnReadMsgCount"], [_setHasNewMsgDecs, 18, "setHasNewMsg"], [_handleTextMessageReceivedDecs, 18, "_handleTextMessageReceived"], [_getUserCountDecs, 18, "getUserCount"], [_onRemoteUserUpdateDecs, 18, "_onRemoteUserUpdate"], [_refreshUserListDecs, 18, "_refreshUserList"], [_handleNewMsgDecs, 18, "handleNewMsg"], [_updateReadMsgIndexDecs, 18, "updateReadMsgIndex"], [_mobx.computed, 3, "isHost"], [_mobx.computed, 3, "isCohost"], [_mobx.computed, 3, "localIsManager"], [_initReadInfoDecs, 18, "initReadInfo"], [_updateHistoryUnreadCntDecs, 18, "updateHistoryUnreadCnt"], [_updateHasHistoryMsgDecs, 18, "updateHasHistoryMsg"], [_updateScrollInfoDecs, 18, "updateScrollInfo"], [_updateViewIdxDecs, 18, "updateViewIdx"], [_updateReadIdxDecs, 18, "updateReadIdx"], [_updateFirstMsgIdDecs, 18, "updateFirstMsgId"], [_updateHistoryUnReadCountDecs, 18, "updateHistoryUnReadCount"], [_updateListDecs, 18, "updateList"], [_updateMostRecentHeightDecs, 18, "updateMostRecentHeight"], [_updateMostRecentWidthDecs, 18, "updateMostRecentWidth"], [_patchHandleMsgDecs, 18, "patchHandleMsg"], [_forceNotifyMsgsDecs, 18, "forceNotifyMsgs"], [_resetComponentCacheDecs, 18, "resetComponentCache"], [_resetTargetUserDecs, 18, "resetTargetUser"], [_initChatLevelDecs, 18, "initChatLevel"], [_setTargetUserDecs, 18, "setTargetUser"], [_mobx.computed, 3, "targetUserIsOnline"], [_mobx.computed, 3, "remoteUsers"], [_decorator.bound, 2, "handleChatPermissionUpdate"], [_updateChatLevelDecs, 18, "updateChatLevel"], [_updateChatTextMsgDecs, 18, "updateChatTextMsg"], [_filterChatMemberDecs, 18, "filterChatMember"], [_hasSendMessagePermissionDecs, 18, "hasSendMessagePermission"], [_permitPrivateChatDecs, 18, "permitPrivateChat"], [_handleToastDecs, 18, "handleToast"], [_mobx.computed, 3, "isHostOrCoHost"], [_decorator.bound, 2, "setAllowChat"], [_decorator.bound, 2, "setAllowChatWithPayload"], [_handleConnectionUpdatedDecs, 18, "_handleConnectionUpdated"]], []).e, 18);
|
|
1067
|
+
_init__userInfo = _applyDecs$e2[0];
|
|
1068
|
+
_init_messageList = _applyDecs$e2[1];
|
|
1069
|
+
_init_readMsgIndex = _applyDecs$e2[2];
|
|
1070
|
+
_init_readIdx = _applyDecs$e2[3];
|
|
1071
|
+
_init_viewIdx = _applyDecs$e2[4];
|
|
1072
|
+
_init_historyUnreadCount = _applyDecs$e2[5];
|
|
1073
|
+
_init_hasHistoryMsg = _applyDecs$e2[6];
|
|
1074
|
+
_init_newMsgsUnReadCnt = _applyDecs$e2[7];
|
|
1075
|
+
_init_privateTargetUser = _applyDecs$e2[8];
|
|
1076
|
+
_init_chatLevel = _applyDecs$e2[9];
|
|
1077
|
+
_init_currentUserMap = _applyDecs$e2[10];
|
|
1078
|
+
_init_textMsg = _applyDecs$e2[11];
|
|
1079
|
+
_init_privateTargetList = _applyDecs$e2[12];
|
|
1080
|
+
_init_chatRoomState = _applyDecs$e2[13];
|
|
1081
|
+
_init_hasNewMsg = _applyDecs$e2[14];
|
|
1082
|
+
_init_userCount = _applyDecs$e2[15];
|
|
1083
|
+
_init_unReadMsgCount = _applyDecs$e2[16];
|
|
1084
|
+
_initProto2 = _applyDecs$e2[17];
|
|
872
1085
|
function isManager(role) {
|
|
873
1086
|
return role === _type.FcrUserRole.HOST || role === _type.FcrUserRole.COHOST;
|
|
874
1087
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FcrBaseRoomControl } from 'agora-edu-core';
|
|
1
|
+
import { FcrBaseRoomControl, FcrDesktopMediaControl } from 'agora-edu-core';
|
|
2
2
|
import { UIModule } from '../../base';
|
|
3
3
|
import { FcrUIEventStore } from '../../common/event-store';
|
|
4
4
|
import './index.css';
|
|
@@ -9,6 +9,7 @@ export declare class ConnectionGatewayUIModule extends UIModule {
|
|
|
9
9
|
roomControl: FcrBaseRoomControl;
|
|
10
10
|
uiEventStore: FcrUIEventStore;
|
|
11
11
|
deviceStore: FcrDeviceStore;
|
|
12
|
+
mediaControl: FcrDesktopMediaControl;
|
|
12
13
|
});
|
|
13
14
|
getComponent(): import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
protected onUnload(): void;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { FcrDesktopMediaControl } from 'agora-edu-core';
|
|
1
2
|
import { FcrUIEventStore } from '../../common/event-store';
|
|
2
3
|
import { FcrPhoneConnectorSession, FcrRoomConnectorPhoneInfo, FcrRoomConnectorSessionReason, FcrRoomConnectorSessionState } from 'agora-edu-core/lib/room-control/room-connector-control/type';
|
|
3
4
|
import { FcrDeviceStore } from '../../common/device-store';
|
|
4
|
-
import {
|
|
5
|
+
import { FcrBaseRoomControl } from 'agora-edu-core/lib/room-control/type';
|
|
5
6
|
export declare enum ConnectorRegion {
|
|
6
7
|
CHINA = 1,
|
|
7
8
|
AMERICA = 2
|
|
@@ -22,6 +23,7 @@ export default class ConnectionGatewayStore {
|
|
|
22
23
|
private _uiEventStore;
|
|
23
24
|
private _deviceStore;
|
|
24
25
|
private _streamControl;
|
|
26
|
+
private _mediaControl;
|
|
25
27
|
private _roomOberver;
|
|
26
28
|
private _streamObserver;
|
|
27
29
|
private _failureTimer;
|
|
@@ -44,10 +46,11 @@ export default class ConnectionGatewayStore {
|
|
|
44
46
|
accessor hasPstnStream: boolean;
|
|
45
47
|
accessor hasOwnPstnStream: boolean;
|
|
46
48
|
accessor hasNeedMergedStream: boolean;
|
|
47
|
-
constructor({ roomControl, uiEventStore, deviceStore, }: {
|
|
48
|
-
roomControl:
|
|
49
|
+
constructor({ roomControl, uiEventStore, deviceStore, mediaControl, }: {
|
|
50
|
+
roomControl: FcrBaseRoomControl;
|
|
49
51
|
uiEventStore: FcrUIEventStore;
|
|
50
52
|
deviceStore: FcrDeviceStore;
|
|
53
|
+
mediaControl: FcrDesktopMediaControl;
|
|
51
54
|
});
|
|
52
55
|
joinAudioByComputer(): void;
|
|
53
56
|
stopAudioByComputer(): void;
|
|
@@ -137,7 +137,8 @@ var ConnectionGatewayStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
137
137
|
var _this = this;
|
|
138
138
|
var roomControl = _ref2.roomControl,
|
|
139
139
|
uiEventStore = _ref2.uiEventStore,
|
|
140
|
-
deviceStore = _ref2.deviceStore
|
|
140
|
+
deviceStore = _ref2.deviceStore,
|
|
141
|
+
mediaControl = _ref2.mediaControl;
|
|
141
142
|
(0, _classCallCheck2["default"])(this, ConnectionGatewayStore);
|
|
142
143
|
(0, _defineProperty2["default"])(this, _ref, void _initProto(this));
|
|
143
144
|
(0, _defineProperty2["default"])(this, "_disposers", []);
|
|
@@ -173,6 +174,7 @@ var ConnectionGatewayStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
173
174
|
_classPrivateFieldInitSpec(this, _P, _init_hasOwnPstnStream(this, false));
|
|
174
175
|
_classPrivateFieldInitSpec(this, _Q, _init_hasNeedMergedStream(this, false));
|
|
175
176
|
this._roomControl = roomControl;
|
|
177
|
+
this._mediaControl = mediaControl;
|
|
176
178
|
this._uiEventStore = uiEventStore;
|
|
177
179
|
this._streamControl = roomControl.getStreamControl();
|
|
178
180
|
this._userControl = roomControl.getUserControl();
|
|
@@ -335,6 +337,7 @@ var ConnectionGatewayStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
335
337
|
var list = this._deviceStore.microphoneList;
|
|
336
338
|
if (list.length > 0) {
|
|
337
339
|
this._deviceStore.setMicrophoneId('default');
|
|
340
|
+
this._mediaControl.setSelectedSpeakerVolume(100);
|
|
338
341
|
this.closeConnectionDialog();
|
|
339
342
|
this._uiEventStore.showToast({
|
|
340
343
|
type: 'normal',
|
|
@@ -351,6 +354,7 @@ var ConnectionGatewayStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
351
354
|
}, {
|
|
352
355
|
key: "stopAudioByComputer",
|
|
353
356
|
value: function stopAudioByComputer() {
|
|
357
|
+
this._mediaControl.setSelectedSpeakerVolume(0);
|
|
354
358
|
this._deviceStore.setMicrophoneId('');
|
|
355
359
|
}
|
|
356
360
|
}, {
|
|
@@ -43,7 +43,7 @@ var SpeakerControl = exports.SpeakerControl = (0, _mobxReact.observer)(function
|
|
|
43
43
|
onClick: handleLouderClick,
|
|
44
44
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icon.FcrIcon, {
|
|
45
45
|
type: speakerVolume === 0 ? _type.FcrIconType.FCR_V2_QUITE : _type.FcrIconType.FCR_V2_LOUDER_MIN,
|
|
46
|
-
size:
|
|
46
|
+
size: 30,
|
|
47
47
|
colors: {
|
|
48
48
|
iconPrimary: speakerVolume === 0 ? 'var(--fcr_ui_scene_ramp_red6)' : 'var(--fcr_web_ui_scene_mainicon1)'
|
|
49
49
|
}
|
|
@@ -15,16 +15,17 @@ var _type = require("agora-ui-foundation/lib/components/icon/type");
|
|
|
15
15
|
var _switch = require("agora-ui-foundation/lib/components/switch");
|
|
16
16
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
17
17
|
var _mobxReact = require("mobx-react");
|
|
18
|
+
var _react = require("react");
|
|
18
19
|
var _useNamespace = require("../../setting/common/useNamespace");
|
|
19
20
|
var _store = require("../../setting/store");
|
|
20
21
|
var _i18n = require("agora-ui-foundation/lib/i18n");
|
|
22
|
+
var _tooltip = require("agora-ui-foundation/lib/components/tooltip");
|
|
21
23
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
22
24
|
var BeautyOptionsCard = function BeautyOptionsCard(props) {
|
|
23
25
|
var ns = (0, _useNamespace.useNamespace)('beauty-setting');
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
26
|
+
var transI18n = (0, _i18n.useI18n)();
|
|
27
|
+
var cardContainerEl = (0, _react.useMemo)(function () {
|
|
28
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
28
29
|
className: ns.e('card-container'),
|
|
29
30
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
30
31
|
className: (0, _classnames["default"])(ns.e('card-container__wrapper'), (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, ns.e('card-container__wrapper-highlight'), props.isHightLight), ns.e('card-container__wrapper-disable'), props.isDisabled)),
|
|
@@ -33,7 +34,16 @@ var BeautyOptionsCard = function BeautyOptionsCard(props) {
|
|
|
33
34
|
className: (0, _classnames["default"])(ns.e('card-title'), (0, _defineProperty2["default"])({}, ns.e('card-title-disable'), props.isDisabled)),
|
|
34
35
|
children: props.title
|
|
35
36
|
})]
|
|
36
|
-
})
|
|
37
|
+
});
|
|
38
|
+
}, [props.title, props.isHightLight, props.isDisabled]);
|
|
39
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
40
|
+
className: (0, _classnames["default"])(ns.e('card'), (0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, ns.e('card__content-active'), props.isActive), ns.e('card__content-disable'), props.isDisabled)),
|
|
41
|
+
onClick: props.onCardClick,
|
|
42
|
+
children: props.cardKey === 'none' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_tooltip.FcrToolTip, {
|
|
43
|
+
mouseEnterDelay: 0,
|
|
44
|
+
content: props.isDisabled ? transI18n('fmt_device_options_effects_enable') : transI18n('fmt_device_options_effects_disable'),
|
|
45
|
+
children: cardContainerEl
|
|
46
|
+
}) : cardContainerEl
|
|
37
47
|
});
|
|
38
48
|
};
|
|
39
49
|
var Beauty = exports.Beauty = (0, _mobxReact.observer)(function (_ref) {
|
|
@@ -88,9 +98,10 @@ var Beauty = exports.Beauty = (0, _mobxReact.observer)(function (_ref) {
|
|
|
88
98
|
children: transI18n('fmt_device_tips_videoeffectson')
|
|
89
99
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
90
100
|
className: ns.e('beauty-options'),
|
|
91
|
-
children: beautyOptions.map(function (item
|
|
101
|
+
children: beautyOptions.map(function (item) {
|
|
92
102
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(BeautyOptionsCard, {
|
|
93
103
|
title: item.title,
|
|
104
|
+
cardKey: item.key,
|
|
94
105
|
isDisabled: !enableBeauty,
|
|
95
106
|
card: item.card,
|
|
96
107
|
isActive: item.key === currentBeautyKey,
|