fcr-ui-scene 3.7.7 → 3.7.8
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/icon.png +0 -0
- package/installer/mac/entitlements.mac.plist +5 -1
- package/lib/creator/provider-initializer.browser.js +2 -2
- package/lib/creator/provider-initializer.electron.js +2 -2
- package/lib/electron/bootstrap-sdk.js +70 -33
- package/lib/electron/hang-detection/index.d.ts +3 -0
- package/lib/electron/hang-detection/index.js +15 -0
- package/lib/electron/hang-detection/manager.d.ts +28 -0
- package/lib/electron/hang-detection/manager.js +231 -0
- package/lib/electron/hang-detection/types.d.ts +14 -0
- package/lib/electron/hang-detection/types.js +6 -0
- package/lib/electron/until.d.ts +1 -4
- package/lib/electron/until.js +9 -4
- package/lib/modules/action-bar/components/screen-share/index.electron.js +1 -1
- package/lib/modules/action-bar/index.d.ts +0 -2
- package/lib/modules/action-bar/index.js +1 -2
- package/lib/modules/action-bar/store.d.ts +3 -6
- package/lib/modules/action-bar/store.js +96 -53
- package/lib/modules/annotation/store.js +10 -9
- package/lib/modules/components/control-bar/components/switch-theme/index.js +4 -2
- package/lib/modules/components/control-bar/index.js +1 -3
- package/lib/modules/event-confirm/components/window/index.d.ts +2 -5
- package/lib/modules/event-confirm/components/window/index.js +14 -38
- package/lib/modules/event-confirm/store.d.ts +5 -10
- package/lib/modules/event-confirm/store.js +13 -62
- package/lib/modules/event-confirm/view.js +7 -9
- package/lib/modules/layout/store.js +22 -8
- package/lib/modules/participant/store.base.js +0 -1
- package/lib/modules/participant/store.js +12 -14
- package/lib/modules/share-screen/store.d.ts +1 -1
- package/lib/modules/share-screen/store.electron.js +9 -0
- package/lib/modules/share-screen/store.js +4 -14
- package/lib/modules/state-bar/store.base.electron.js +6 -2
- package/lib/providers/board-share/bar-control/base.d.ts +2 -0
- package/lib/providers/board-share/bar-control/base.js +13 -3
- package/lib/providers/board-share/bar-control/electron.d.ts +1 -0
- package/lib/providers/board-share/bar-control/electron.js +15 -4
- package/lib/providers/board-share/provider.base.d.ts +1 -0
- package/lib/providers/board-share/provider.base.js +3 -1
- package/lib/providers/board-share/provider.electron.d.ts +1 -0
- package/lib/providers/board-share/provider.electron.js +8 -2
- package/lib/providers/board-share/type.d.ts +2 -0
- package/lib/providers/dialog/provider.electron.js +10 -2
- package/lib/providers/screen-share/strategy/browser.js +50 -3
- package/lib/providers/screen-share/strategy/electron.js +77 -8
- package/lib/providers/screen-share/stream-state-sync.d.ts +3 -1
- package/lib/providers/screen-share/stream-state-sync.js +133 -40
- package/lib/providers/screen-share-provider.d.ts +7 -8
- package/lib/providers/screen-share-provider.js +70 -85
- package/lib/providers/sharing-provider.js +0 -7
- package/lib/providers/whiteboard-provider.js +0 -1
- package/lib/shared-data-source/confirm-data.d.ts +0 -19
- package/lib/shared-data-source/confirm-data.js +15 -119
- package/lib/shared-data-source/screen-share-data.d.ts +17 -10
- package/lib/shared-data-source/screen-share-data.js +16 -9
- package/lib/shared-data-source/whiteboard-data.d.ts +5 -7
- package/lib/shared-data-source/whiteboard-data.js +8 -9
- package/package.json +5 -5
|
@@ -72,7 +72,7 @@ var _dialogUtils = require("../../utilities/dialog-utils");
|
|
|
72
72
|
var _env = require("agora-foundation/lib/utilities/env");
|
|
73
73
|
var _imports = require("fcr-core/lib/imports");
|
|
74
74
|
var _ConfirmStore;
|
|
75
|
-
var _initProto, _init_isReplaceShare, _init_calculateMethods, _init_reposition, _init_confirms, _init_screenBounds, _addConfirmDecs,
|
|
75
|
+
var _initProto, _init_isReplaceShare, _init_calculateMethods, _init_reposition, _init_confirms, _init_screenBounds, _addConfirmDecs, _resetIsReplaceDecs, _setMousePositionDecs, _handleConfirmEventDecs, _ref;
|
|
76
76
|
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; }
|
|
77
77
|
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; }
|
|
78
78
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
@@ -90,7 +90,7 @@ var _B = /*#__PURE__*/new WeakMap();
|
|
|
90
90
|
var _C = /*#__PURE__*/new WeakMap();
|
|
91
91
|
var _D = /*#__PURE__*/new WeakMap();
|
|
92
92
|
var _E = /*#__PURE__*/new WeakMap();
|
|
93
|
-
_ref = (_addConfirmDecs = [_mobx.action, _mobx.action.bound],
|
|
93
|
+
_ref = (_addConfirmDecs = [_mobx.action, _mobx.action.bound], _resetIsReplaceDecs = [_mobx.action, _mobx.action.bound], _setMousePositionDecs = [_mobx.action, _mobx.action.bound], _handleConfirmEventDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
94
94
|
var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
95
95
|
function ConfirmStore(_ref2) {
|
|
96
96
|
var _this = this;
|
|
@@ -107,10 +107,6 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
107
107
|
(0, _defineProperty2["default"])(this, "_handleConfirmEventObserver", {
|
|
108
108
|
onEvent: this._handleConfirmEvent.bind(this)
|
|
109
109
|
});
|
|
110
|
-
(0, _defineProperty2["default"])(this, "_handleMousePositionObserver", {
|
|
111
|
-
onMouseOver: this._handleMousePositionObserverMouseOver,
|
|
112
|
-
onMouseOut: this._handleMousePositionObserverMouseOut
|
|
113
|
-
});
|
|
114
110
|
_classPrivateFieldInitSpec(this, _A, _init_isReplaceShare(this, false));
|
|
115
111
|
_classPrivateFieldInitSpec(this, _B, _init_calculateMethods(this, new Map()));
|
|
116
112
|
_classPrivateFieldInitSpec(this, _C, _init_reposition(this, 0));
|
|
@@ -122,7 +118,6 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
122
118
|
this._sharedConfirmDataSource = sharedConfirmDataSource;
|
|
123
119
|
this._uiEventProvider.addObserver(this._handleConfirmEventObserver);
|
|
124
120
|
this._dialogProvider.addObserver(this._handleConfirmEventObserver);
|
|
125
|
-
this._sharedConfirmDataSource.addObserver(this._handleMousePositionObserver);
|
|
126
121
|
this._disposers.push((0, _mobx.reaction)(function () {
|
|
127
122
|
return _this.confirmList;
|
|
128
123
|
}, function () {
|
|
@@ -203,25 +198,22 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
203
198
|
}
|
|
204
199
|
}, {
|
|
205
200
|
key: "screenBounds",
|
|
206
|
-
get:
|
|
207
|
-
// return this._sharedConfirmDataSource.position;
|
|
208
|
-
// }
|
|
209
|
-
function get() {
|
|
201
|
+
get: function get() {
|
|
210
202
|
return _classPrivateFieldGet(_E, this);
|
|
211
203
|
},
|
|
212
204
|
set: function set(v) {
|
|
213
205
|
_classPrivateFieldSet(_E, this, v);
|
|
214
206
|
}
|
|
207
|
+
}, {
|
|
208
|
+
key: "mousePosition",
|
|
209
|
+
get: function get() {
|
|
210
|
+
return this._sharedConfirmDataSource.position;
|
|
211
|
+
}
|
|
215
212
|
}, {
|
|
216
213
|
key: "confirmList",
|
|
217
214
|
get: function get() {
|
|
218
|
-
var result = Array.from(this.confirms.values()).map(function (
|
|
219
|
-
|
|
220
|
-
params = _ref4.params;
|
|
221
|
-
return {
|
|
222
|
-
id: id,
|
|
223
|
-
params: params
|
|
224
|
-
};
|
|
215
|
+
var result = Array.from(this.confirms.values()).map(function (item) {
|
|
216
|
+
return item.params;
|
|
225
217
|
});
|
|
226
218
|
return result;
|
|
227
219
|
}
|
|
@@ -240,17 +232,14 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
240
232
|
var timer = setTimeout(function () {
|
|
241
233
|
(0, _mobx.runInAction)(function () {
|
|
242
234
|
_this2.confirms["delete"](dialogId);
|
|
243
|
-
_this2.removeObserverWindow(dialogId);
|
|
244
235
|
});
|
|
245
236
|
clearTimeout(timer);
|
|
246
237
|
}, params.duration || 3000);
|
|
247
238
|
} : undefined;
|
|
248
239
|
var confirmParams = {
|
|
249
|
-
id: dialogId,
|
|
250
240
|
params: _objectSpread(_objectSpread({}, params), {}, {
|
|
251
241
|
onClose: function onClose() {
|
|
252
242
|
_this2.confirms["delete"](dialogId);
|
|
253
|
-
_this2.removeObserverWindow(dialogId);
|
|
254
243
|
}
|
|
255
244
|
}),
|
|
256
245
|
timer: timer
|
|
@@ -261,12 +250,6 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
261
250
|
});
|
|
262
251
|
} else {
|
|
263
252
|
this.confirms.set(dialogId, confirmParams);
|
|
264
|
-
this.setObserverWindow(dialogId, {
|
|
265
|
-
x: 0,
|
|
266
|
-
y: 0,
|
|
267
|
-
width: confirmParams.params.width || 320,
|
|
268
|
-
height: confirmParams.params.height || 150
|
|
269
|
-
});
|
|
270
253
|
}
|
|
271
254
|
var confirmInstance = this.confirms.get(dialogId);
|
|
272
255
|
if (confirmInstance) {
|
|
@@ -297,16 +280,6 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
297
280
|
}
|
|
298
281
|
}
|
|
299
282
|
}
|
|
300
|
-
}, {
|
|
301
|
-
key: "removeObserverWindow",
|
|
302
|
-
value: function removeObserverWindow(key) {
|
|
303
|
-
this._sharedConfirmDataSource.removeWindowBounds(key);
|
|
304
|
-
}
|
|
305
|
-
}, {
|
|
306
|
-
key: "setObserverWindow",
|
|
307
|
-
value: function setObserverWindow(key, window) {
|
|
308
|
-
this._sharedConfirmDataSource.setWindowBounds(key, window);
|
|
309
|
-
}
|
|
310
283
|
}, {
|
|
311
284
|
key: "resetIsReplace",
|
|
312
285
|
value: function resetIsReplace() {
|
|
@@ -323,7 +296,6 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
323
296
|
}, {
|
|
324
297
|
key: "release",
|
|
325
298
|
value: function release() {
|
|
326
|
-
var _this3 = this;
|
|
327
299
|
this.confirms.clear();
|
|
328
300
|
this.calculateMethods.clear();
|
|
329
301
|
this._disposers.forEach(function (disposer) {
|
|
@@ -331,10 +303,6 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
331
303
|
});
|
|
332
304
|
this._dialogProvider.removeObserver(this._handleConfirmEventObserver);
|
|
333
305
|
this._uiEventProvider.removeObserver(this._handleConfirmEventObserver);
|
|
334
|
-
this.confirms.forEach(function (value, key) {
|
|
335
|
-
_this3.removeObserverWindow(key);
|
|
336
|
-
});
|
|
337
|
-
this._sharedConfirmDataSource.removeObserver(this._handleMousePositionObserver);
|
|
338
306
|
}
|
|
339
307
|
}, {
|
|
340
308
|
key: "log",
|
|
@@ -348,11 +316,11 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
348
316
|
switch (action) {
|
|
349
317
|
case _constant.FcrUIAction.OPEN_DIALOG:
|
|
350
318
|
if ((0, _env.isElectron)()) {
|
|
351
|
-
var
|
|
319
|
+
var _ref5 = (0, _dialogUtils.followCorrectDisplay)({
|
|
352
320
|
dialogKey: _constant.FcrUIDialogKey.CONFIRM,
|
|
353
321
|
alwaysFollowScreen: true
|
|
354
322
|
}),
|
|
355
|
-
nearDisplayBounds =
|
|
323
|
+
nearDisplayBounds = _ref5.nearDisplayBounds;
|
|
356
324
|
this.screenBounds = nearDisplayBounds;
|
|
357
325
|
this.logger.info("open confirm dialog with bounds: ".concat((0, _imports.jsonstring)(nearDisplayBounds)));
|
|
358
326
|
}
|
|
@@ -360,31 +328,14 @@ var ConfirmStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
360
328
|
break;
|
|
361
329
|
case _constant.FcrUIAction.CLOSE_DIALOG:
|
|
362
330
|
this.confirms["delete"](payload.dialogId);
|
|
363
|
-
this.removeObserverWindow(payload.dialogId);
|
|
364
331
|
break;
|
|
365
332
|
}
|
|
366
333
|
}
|
|
367
334
|
}
|
|
368
|
-
}, {
|
|
369
|
-
key: "_handleMousePositionObserverMouseOver",
|
|
370
|
-
value: function _handleMousePositionObserverMouseOver(key) {
|
|
371
|
-
var confirm = this.confirms.get(key);
|
|
372
|
-
if (confirm) {
|
|
373
|
-
confirm.params.className = 'confirm-mouseover';
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
}, {
|
|
377
|
-
key: "_handleMousePositionObserverMouseOut",
|
|
378
|
-
value: function _handleMousePositionObserverMouseOut(key) {
|
|
379
|
-
var confirm = this.confirms.get(key);
|
|
380
|
-
if (confirm) {
|
|
381
|
-
confirm.params.className = '';
|
|
382
|
-
}
|
|
383
|
-
}
|
|
384
335
|
}]);
|
|
385
336
|
}();
|
|
386
337
|
_ConfirmStore = ConfirmStore;
|
|
387
|
-
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ConfirmStore, [[_mobx.observable, 1, "isReplaceShare"], [_mobx.observable, 1, "calculateMethods"], [_mobx.observable, 1, "reposition"], [_mobx.observable, 1, "confirms"], [_mobx.observable, 1, "screenBounds"], [_mobx.computed, 3, "confirmList"], [_addConfirmDecs, 18, "addConfirm"], [
|
|
338
|
+
var _applyDecs$e = (0, _slicedToArray2["default"])(_applyDecs(_ConfirmStore, [[_mobx.observable, 1, "isReplaceShare"], [_mobx.observable, 1, "calculateMethods"], [_mobx.observable, 1, "reposition"], [_mobx.observable, 1, "confirms"], [_mobx.observable, 1, "screenBounds"], [_mobx.computed, 3, "confirmList"], [_addConfirmDecs, 18, "addConfirm"], [_resetIsReplaceDecs, 18, "resetIsReplace"], [_setMousePositionDecs, 18, "setMousePosition"], [_decorator.bound, 2, "log"], [_handleConfirmEventDecs, 18, "_handleConfirmEvent"]], []).e, 6);
|
|
388
339
|
_init_isReplaceShare = _applyDecs$e[0];
|
|
389
340
|
_init_calculateMethods = _applyDecs$e[1];
|
|
390
341
|
_init_reposition = _applyDecs$e[2];
|
|
@@ -27,28 +27,26 @@ var View = exports.View = (0, _mobxReact.observer)(function () {
|
|
|
27
27
|
browserWindow = _ref.browserWindow;
|
|
28
28
|
(0, _react.useEffect)(function () {
|
|
29
29
|
window.addEventListener('mousemove', setMousePosition);
|
|
30
|
-
return function () {
|
|
31
|
-
window.removeEventListener('mousemove', setMousePosition);
|
|
32
|
-
};
|
|
33
|
-
}, []);
|
|
34
|
-
(0, _react.useEffect)(function () {
|
|
35
30
|
if ((0, _toConsumableArray2["default"])(confirmList).length === 0) {
|
|
36
31
|
browserWindow === null || browserWindow === void 0 || browserWindow.setIgnoreMouseEvents(true, {
|
|
37
32
|
forward: true
|
|
38
33
|
});
|
|
39
34
|
browserWindow === null || browserWindow === void 0 || browserWindow.blur();
|
|
40
35
|
} else {
|
|
36
|
+
// browserWindow?.setIgnoreMouseEvents(false);
|
|
41
37
|
browserWindow === null || browserWindow === void 0 || browserWindow.setAlwaysOnTop(true, 'screen-saver');
|
|
42
38
|
}
|
|
43
|
-
|
|
39
|
+
return function () {
|
|
40
|
+
window.removeEventListener('mousemove', setMousePosition);
|
|
41
|
+
};
|
|
42
|
+
}, [confirmList]);
|
|
44
43
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
45
44
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
46
45
|
className: "fcr-event-confirm-wrapper fcr-event-confirm-container",
|
|
47
46
|
children: (0, _toConsumableArray2["default"])(confirmList).map(function (confirm) {
|
|
48
47
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_window.ConfirmWindow, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}, confirm.params.title);
|
|
48
|
+
confirm: confirm
|
|
49
|
+
}, confirm.title);
|
|
52
50
|
})
|
|
53
51
|
})
|
|
54
52
|
});
|
|
@@ -1183,6 +1183,20 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1183
1183
|
}
|
|
1184
1184
|
}, {
|
|
1185
1185
|
fireImmediately: true
|
|
1186
|
+
}), (0, _mobx.reaction)(function () {
|
|
1187
|
+
return {
|
|
1188
|
+
cameraEnabled: _this5._deviceProvider.cameraEnabled,
|
|
1189
|
+
cameraId: _this5._deviceProvider.cameraId
|
|
1190
|
+
};
|
|
1191
|
+
}, function (_ref6) {
|
|
1192
|
+
var cameraEnabled = _ref6.cameraEnabled,
|
|
1193
|
+
cameraId = _ref6.cameraId;
|
|
1194
|
+
if (!cameraEnabled && _this5._localView) {
|
|
1195
|
+
_this5.stopLocalPreview(_this5._localView);
|
|
1196
|
+
}
|
|
1197
|
+
if (cameraEnabled && cameraId && _this5._localView) {
|
|
1198
|
+
_this5.startLocalPreview(_this5._localView);
|
|
1199
|
+
}
|
|
1186
1200
|
}), (0, _mobx.reaction)(function () {
|
|
1187
1201
|
return _this5.barLocked;
|
|
1188
1202
|
}, function (barLocked) {
|
|
@@ -1201,8 +1215,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1201
1215
|
return {
|
|
1202
1216
|
enableSpotlight: _this5.enableSpotlight
|
|
1203
1217
|
};
|
|
1204
|
-
}, function (
|
|
1205
|
-
var enableSpotlight =
|
|
1218
|
+
}, function (_ref7) {
|
|
1219
|
+
var enableSpotlight = _ref7.enableSpotlight;
|
|
1206
1220
|
_this5._videoWindowDataSource.setSpotlightEnabled(enableSpotlight);
|
|
1207
1221
|
}),
|
|
1208
1222
|
// 录制的特殊逻辑:
|
|
@@ -1357,8 +1371,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1357
1371
|
key: "_onStreamsAdded",
|
|
1358
1372
|
value: function _onStreamsAdded(roomId, events) {
|
|
1359
1373
|
var _this8 = this;
|
|
1360
|
-
events.forEach(function (
|
|
1361
|
-
var modifiedStream =
|
|
1374
|
+
events.forEach(function (_ref8) {
|
|
1375
|
+
var modifiedStream = _ref8.modifiedStream;
|
|
1362
1376
|
_this8._handleStreamAdded(modifiedStream);
|
|
1363
1377
|
});
|
|
1364
1378
|
}
|
|
@@ -1366,8 +1380,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1366
1380
|
key: "_onStreamsUpdated",
|
|
1367
1381
|
value: function _onStreamsUpdated(roomId, events) {
|
|
1368
1382
|
var _this9 = this;
|
|
1369
|
-
events.forEach(function (
|
|
1370
|
-
var modifiedStream =
|
|
1383
|
+
events.forEach(function (_ref9) {
|
|
1384
|
+
var modifiedStream = _ref9.modifiedStream;
|
|
1371
1385
|
_this9._videoWindowDataSource.update(modifiedStream);
|
|
1372
1386
|
});
|
|
1373
1387
|
}
|
|
@@ -1375,8 +1389,8 @@ var LayoutStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1375
1389
|
key: "_onStreamsRemoved",
|
|
1376
1390
|
value: function _onStreamsRemoved(roomId, events) {
|
|
1377
1391
|
var _this0 = this;
|
|
1378
|
-
events.forEach(function (
|
|
1379
|
-
var modifiedStream =
|
|
1392
|
+
events.forEach(function (_ref0) {
|
|
1393
|
+
var modifiedStream = _ref0.modifiedStream;
|
|
1380
1394
|
_this0._videoWindowDataSource["delete"](modifiedStream);
|
|
1381
1395
|
});
|
|
1382
1396
|
var hasScreenStream = events === null || events === void 0 ? void 0 : events.find(function (event) {
|
|
@@ -682,7 +682,6 @@ var ParticipantStoreBase = exports.ParticipantStoreBase = /*#__PURE__*/function
|
|
|
682
682
|
}, {
|
|
683
683
|
key: "setChatActiveTab",
|
|
684
684
|
value: function setChatActiveTab(activeTab) {
|
|
685
|
-
console.log('cjtest setChatActiveTab', activeTab);
|
|
686
685
|
this._sharedChatDataSource.activeTab = activeTab;
|
|
687
686
|
}
|
|
688
687
|
}, {
|
|
@@ -1132,7 +1132,7 @@ var ParticipantStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1132
1132
|
case 3:
|
|
1133
1133
|
_context2.prev = 3;
|
|
1134
1134
|
_t = _context2["catch"](1);
|
|
1135
|
-
if (!(_t
|
|
1135
|
+
if (!(_t.code === '732403470')) {
|
|
1136
1136
|
_context2.next = 4;
|
|
1137
1137
|
break;
|
|
1138
1138
|
}
|
|
@@ -1528,19 +1528,17 @@ var ParticipantStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
1528
1528
|
case 3:
|
|
1529
1529
|
_context5.prev = 3;
|
|
1530
1530
|
_t2 = _context5["catch"](1);
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
});
|
|
1543
|
-
}
|
|
1531
|
+
errCode = _t2.code;
|
|
1532
|
+
if (errCode === '700000403') {
|
|
1533
|
+
_this10._messageProvider.showToast({
|
|
1534
|
+
type: 'error',
|
|
1535
|
+
message: (0, _i18n.transI18n)('fmt_attendies_button_revokehost_error')
|
|
1536
|
+
});
|
|
1537
|
+
} else if (errCode === '720403001') {
|
|
1538
|
+
_this10._messageProvider.showToast({
|
|
1539
|
+
type: 'error',
|
|
1540
|
+
message: (0, _i18n.transI18n)('fmt_attendies_toast_cohost_upper_limit')
|
|
1541
|
+
});
|
|
1544
1542
|
}
|
|
1545
1543
|
_this10.logger.error(_t2);
|
|
1546
1544
|
case 4:
|
|
@@ -53,7 +53,7 @@ export default class ShareScreenStore {
|
|
|
53
53
|
private _sharedAnnotationDataSource;
|
|
54
54
|
accessor boardOwnerUser: FcrUserInfo | undefined;
|
|
55
55
|
get cardChooseBounds(): CurrentShareBounds;
|
|
56
|
-
get currentShareStreamId(): string
|
|
56
|
+
get currentShareStreamId(): string;
|
|
57
57
|
get screenTrack(): FcrScreenTrack | null;
|
|
58
58
|
get currentShareType(): FcrScreenCaptureType;
|
|
59
59
|
get isCurrentOriginal(): boolean;
|
|
@@ -43,6 +43,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
43
43
|
});
|
|
44
44
|
exports["default"] = void 0;
|
|
45
45
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
46
|
+
require("core-js/modules/es.date.to-json.js");
|
|
47
|
+
require("core-js/modules/es.json.stringify.js");
|
|
46
48
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
47
49
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
48
50
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
@@ -193,6 +195,13 @@ var ElectronShareScreenStore = exports["default"] = /*#__PURE__*/function (_Shar
|
|
|
193
195
|
this._isSharing = true;
|
|
194
196
|
this._dialogProvider.closeDialog(_constant.FcrUIDialogKey.SHARE_SCREEN_SELECTION);
|
|
195
197
|
var videoWindow = this._windowProvider.getWindowById(_constant.FcrUIDialogKey.VIDEO_WINDOW);
|
|
198
|
+
try {
|
|
199
|
+
if (!videoWindow.isVisible()) {
|
|
200
|
+
videoWindow.show();
|
|
201
|
+
}
|
|
202
|
+
} catch (e) {
|
|
203
|
+
this.logger.warn('share_screen _showControlBar error', JSON.stringify(e));
|
|
204
|
+
}
|
|
196
205
|
videoWindow.setAlwaysOnTop(true, 'screen-saver', _levelConfig.WindowRelativeLevel.VIDEO_WINDOW_LEVEL);
|
|
197
206
|
var isMultiDisplayActive = this._multiDisplayProvider.isActive;
|
|
198
207
|
this._ensureWindowsAreOpenAndPositioned(true, isMultiDisplayActive);
|
|
@@ -615,8 +615,7 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
615
615
|
electronBounds,
|
|
616
616
|
needToReplaceMyself,
|
|
617
617
|
validShareStart,
|
|
618
|
-
_args3 = arguments
|
|
619
|
-
_t;
|
|
618
|
+
_args3 = arguments;
|
|
620
619
|
return _regenerator["default"].wrap(function (_context3) {
|
|
621
620
|
while (1) switch (_context3.prev = _context3.next) {
|
|
622
621
|
case 0:
|
|
@@ -689,22 +688,13 @@ var ShareScreenStore = exports["default"] = /*#__PURE__*/function () {
|
|
|
689
688
|
// 初始化 controlbar 并隐藏, controlbar 不能在 startShareScreen 之后初始化,否则获取不到窗口信息,在屏幕共享时无法排除
|
|
690
689
|
this._initControlbar();
|
|
691
690
|
this._sharedScreenShareSharedDataSource.setCurrentShareIdInfos(id, type, bounds);
|
|
692
|
-
_context3.
|
|
693
|
-
_context3.next = 9;
|
|
691
|
+
_context3.next = 8;
|
|
694
692
|
return this._screenShareProvider.startShareScreen(id, type, withAudio, false);
|
|
695
|
-
case
|
|
696
|
-
_context3.next = 11;
|
|
697
|
-
break;
|
|
698
|
-
case 10:
|
|
699
|
-
_context3.prev = 10;
|
|
700
|
-
_t = _context3["catch"](8);
|
|
701
|
-
this.logger.error('failed to start share screen:', _t);
|
|
702
|
-
this._closeShareScreenComps();
|
|
703
|
-
case 11:
|
|
693
|
+
case 8:
|
|
704
694
|
case "end":
|
|
705
695
|
return _context3.stop();
|
|
706
696
|
}
|
|
707
|
-
}, _callee3, this
|
|
697
|
+
}, _callee3, this);
|
|
708
698
|
}));
|
|
709
699
|
function handleStartShare(_x, _x2, _x3) {
|
|
710
700
|
return _handleStartShare.apply(this, arguments);
|
|
@@ -84,12 +84,16 @@ var StateBarElectronStoreBase = exports["default"] = /*#__PURE__*/function () {
|
|
|
84
84
|
}, {
|
|
85
85
|
key: "enterFullScreen",
|
|
86
86
|
value: function enterFullScreen() {
|
|
87
|
-
this._mainWindow.
|
|
87
|
+
if (!this._mainWindow.isFullScreen()) {
|
|
88
|
+
this._mainWindow.setFullScreen(true);
|
|
89
|
+
}
|
|
88
90
|
}
|
|
89
91
|
}, {
|
|
90
92
|
key: "exitFullScreen",
|
|
91
93
|
value: function exitFullScreen() {
|
|
92
|
-
this._mainWindow.
|
|
94
|
+
if (this._mainWindow.isFullScreen()) {
|
|
95
|
+
this._mainWindow.setFullScreen(false);
|
|
96
|
+
}
|
|
93
97
|
}
|
|
94
98
|
}, {
|
|
95
99
|
key: "addFullScreenChangeEventListener",
|
|
@@ -27,12 +27,14 @@ export declare abstract class FcrUIBoardControlShareProviderBase implements FcrU
|
|
|
27
27
|
constructor(_privilegeProvider: FcrUIPrivilegeProvider, _boardControl: FcrPrivilegedWhiteboardControl);
|
|
28
28
|
setControlEnable(enable: boolean): void;
|
|
29
29
|
setSharingUser(userInfo: FcrUserInfo): void;
|
|
30
|
+
updateSubProcessBackgroundColor(color: string): void;
|
|
30
31
|
setBackgroundColor(color: string): void;
|
|
31
32
|
setWhiteboardTool(tool: {
|
|
32
33
|
action: WhiteboardToolAction;
|
|
33
34
|
tool: FcrBoardToolType | FcrBoardShape | string | number;
|
|
34
35
|
}): void;
|
|
35
36
|
setTheme(theme: WhiteboardThemeType): void;
|
|
37
|
+
setCurrentTheme(theme: Required<WhiteboardThemeType>): void;
|
|
36
38
|
setShowLoading(show: boolean): void;
|
|
37
39
|
setCommonColors(colors: string[]): void;
|
|
38
40
|
saveDraft(): void;
|
|
@@ -62,7 +62,7 @@ var _utils = require("../../../modules/whiteboard/utils");
|
|
|
62
62
|
var _toolbar = require("../../../modules/components/toolbar");
|
|
63
63
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
64
64
|
var _FcrUIBoardControlShareProviderBase;
|
|
65
|
-
var _initProto, _init__showLoading, _init_currentTheme, _init_sharingUserInfo, _init_backgroundColor, _init_hasWriteBoardPermission, _init_connectionState, _init_joinSuccess, _init_toolbarState, _setControlEnableDecs, _setSharingUserDecs, _setBackgroundColorDecs, _setWhiteboardToolDecs, _setThemeDecs, _setShowLoadingDecs, _setCommonColorsDecs, _setProgressDecs, _setJoinSuccessDecs, _handleDraftSavedDecs, _ref;
|
|
65
|
+
var _initProto, _init__showLoading, _init_currentTheme, _init_sharingUserInfo, _init_backgroundColor, _init_hasWriteBoardPermission, _init_connectionState, _init_joinSuccess, _init_toolbarState, _setControlEnableDecs, _setSharingUserDecs, _setBackgroundColorDecs, _setWhiteboardToolDecs, _setThemeDecs, _setCurrentThemeDecs, _setShowLoadingDecs, _setCommonColorsDecs, _setProgressDecs, _setJoinSuccessDecs, _handleDraftSavedDecs, _ref;
|
|
66
66
|
function _classPrivateFieldInitSpec(e, t, a) { _checkPrivateRedeclaration(e, t), t.set(e, a); }
|
|
67
67
|
function _checkPrivateRedeclaration(e, t) { if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object"); }
|
|
68
68
|
function _classPrivateFieldSet(s, a, r) { return s.set(_assertClassBrand(s, a), r), r; }
|
|
@@ -81,7 +81,7 @@ var _E = /*#__PURE__*/new WeakMap();
|
|
|
81
81
|
var _F = /*#__PURE__*/new WeakMap();
|
|
82
82
|
var _G = /*#__PURE__*/new WeakMap();
|
|
83
83
|
var _H = /*#__PURE__*/new WeakMap();
|
|
84
|
-
_ref = (_setControlEnableDecs = [_mobx.action, _mobx.action.bound], _setSharingUserDecs = [_mobx.action, _mobx.action.bound], _setBackgroundColorDecs = [_mobx.action, _mobx.action.bound], _setWhiteboardToolDecs = [_mobx.action, _mobx.action.bound], _setThemeDecs = [_mobx.action, _mobx.action.bound], _setShowLoadingDecs = [_mobx.action, _mobx.action.bound], _setCommonColorsDecs = [_mobx.action, _mobx.action.bound], _setProgressDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessDecs = [_mobx.action, _mobx.action.bound], _handleDraftSavedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
84
|
+
_ref = (_setControlEnableDecs = [_mobx.action, _mobx.action.bound], _setSharingUserDecs = [_mobx.action, _mobx.action.bound], _setBackgroundColorDecs = [_mobx.action, _mobx.action.bound], _setWhiteboardToolDecs = [_mobx.action, _mobx.action.bound], _setThemeDecs = [_mobx.action, _mobx.action.bound], _setCurrentThemeDecs = [_mobx.action, _mobx.action.bound], _setShowLoadingDecs = [_mobx.action, _mobx.action.bound], _setCommonColorsDecs = [_mobx.action, _mobx.action.bound], _setProgressDecs = [_mobx.action, _mobx.action.bound], _setJoinSuccessDecs = [_mobx.action, _mobx.action.bound], _handleDraftSavedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
85
85
|
var FcrUIBoardControlShareProviderBase = exports.FcrUIBoardControlShareProviderBase = /*#__PURE__*/function () {
|
|
86
86
|
function FcrUIBoardControlShareProviderBase(_privilegeProvider, _boardControl) {
|
|
87
87
|
(0, _classCallCheck2["default"])(this, FcrUIBoardControlShareProviderBase);
|
|
@@ -205,6 +205,11 @@ var FcrUIBoardControlShareProviderBase = exports.FcrUIBoardControlShareProviderB
|
|
|
205
205
|
value: function setSharingUser(userInfo) {
|
|
206
206
|
this.sharingUserInfo = userInfo;
|
|
207
207
|
}
|
|
208
|
+
}, {
|
|
209
|
+
key: "updateSubProcessBackgroundColor",
|
|
210
|
+
value: function updateSubProcessBackgroundColor(color) {
|
|
211
|
+
// do nothing in base
|
|
212
|
+
}
|
|
208
213
|
}, {
|
|
209
214
|
key: "setBackgroundColor",
|
|
210
215
|
value: function setBackgroundColor(color) {
|
|
@@ -240,6 +245,11 @@ var FcrUIBoardControlShareProviderBase = exports.FcrUIBoardControlShareProviderB
|
|
|
240
245
|
});
|
|
241
246
|
this._boardControl.setBackgroundColor(theme.background);
|
|
242
247
|
}
|
|
248
|
+
}, {
|
|
249
|
+
key: "setCurrentTheme",
|
|
250
|
+
value: function setCurrentTheme(theme) {
|
|
251
|
+
this.currentTheme = theme;
|
|
252
|
+
}
|
|
243
253
|
}, {
|
|
244
254
|
key: "setShowLoading",
|
|
245
255
|
value: function setShowLoading(show) {
|
|
@@ -301,7 +311,7 @@ var FcrUIBoardControlShareProviderBase = exports.FcrUIBoardControlShareProviderB
|
|
|
301
311
|
}]);
|
|
302
312
|
}();
|
|
303
313
|
_FcrUIBoardControlShareProviderBase = FcrUIBoardControlShareProviderBase;
|
|
304
|
-
var _applyDecs$e = _applyDecs(_FcrUIBoardControlShareProviderBase, [[_mobx.observable, 1, "_showLoading"], [_mobx.observable, 1, "currentTheme"], [_mobx.observable, 1, "sharingUserInfo"], [_mobx.observable, 1, "backgroundColor"], [_mobx.observable, 1, "hasWriteBoardPermission"], [_mobx.observable, 1, "connectionState"], [_mobx.observable, 1, "joinSuccess"], [_mobx.observable, 1, "toolbarState"], [_mobx.computed, 3, "canWriteBoard"], [_setControlEnableDecs, 18, "setControlEnable"], [_setSharingUserDecs, 18, "setSharingUser"], [_setBackgroundColorDecs, 18, "setBackgroundColor"], [_setWhiteboardToolDecs, 18, "setWhiteboardTool"], [_setThemeDecs, 18, "setTheme"], [_setShowLoadingDecs, 18, "setShowLoading"], [_setCommonColorsDecs, 18, "setCommonColors"], [_imports.bound, 2, "saveDraft"], [_setProgressDecs, 18, "setProgress"], [_setJoinSuccessDecs, 18, "setJoinSuccess"], [_imports.bound, 2, "resetWhiteboardTool"], [_handleDraftSavedDecs, 18, "_handleDraftSaved"]], []).e;
|
|
314
|
+
var _applyDecs$e = _applyDecs(_FcrUIBoardControlShareProviderBase, [[_mobx.observable, 1, "_showLoading"], [_mobx.observable, 1, "currentTheme"], [_mobx.observable, 1, "sharingUserInfo"], [_mobx.observable, 1, "backgroundColor"], [_mobx.observable, 1, "hasWriteBoardPermission"], [_mobx.observable, 1, "connectionState"], [_mobx.observable, 1, "joinSuccess"], [_mobx.observable, 1, "toolbarState"], [_mobx.computed, 3, "canWriteBoard"], [_setControlEnableDecs, 18, "setControlEnable"], [_setSharingUserDecs, 18, "setSharingUser"], [_setBackgroundColorDecs, 18, "setBackgroundColor"], [_setWhiteboardToolDecs, 18, "setWhiteboardTool"], [_setThemeDecs, 18, "setTheme"], [_setCurrentThemeDecs, 18, "setCurrentTheme"], [_setShowLoadingDecs, 18, "setShowLoading"], [_setCommonColorsDecs, 18, "setCommonColors"], [_imports.bound, 2, "saveDraft"], [_setProgressDecs, 18, "setProgress"], [_setJoinSuccessDecs, 18, "setJoinSuccess"], [_imports.bound, 2, "resetWhiteboardTool"], [_handleDraftSavedDecs, 18, "_handleDraftSaved"]], []).e;
|
|
305
315
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 9);
|
|
306
316
|
_init__showLoading = _applyDecs$e2[0];
|
|
307
317
|
_init_currentTheme = _applyDecs$e2[1];
|
|
@@ -15,6 +15,7 @@ export declare class FcrUIBoardControlShareProviderImpl extends FcrUIBoardContro
|
|
|
15
15
|
constructor(privilegeProvider: FcrUIPrivilegeProvider, boardControl: FcrPrivilegedWhiteboardControl, _fcrUIMainWindowRenderer: FcrUIMainWindowRenderer);
|
|
16
16
|
setControlEnable(enable: boolean): void;
|
|
17
17
|
setSharingUser(userInfo: FcrUserInfo): void;
|
|
18
|
+
updateSubProcessBackgroundColor(color: string): void;
|
|
18
19
|
setBackgroundColor(color: string): void;
|
|
19
20
|
setWhiteboardTool(tool: {
|
|
20
21
|
action: WhiteboardToolAction;
|
|
@@ -61,7 +61,7 @@ var _type = require("fcr-core/lib/type");
|
|
|
61
61
|
var _mobx = require("mobx");
|
|
62
62
|
var _base = require("./base");
|
|
63
63
|
var _FcrUIBoardControlShareProviderImpl;
|
|
64
|
-
var _initProto, _setControlEnableDecs, _setSharingUserDecs, _setBackgroundColorDecs, _setWhiteboardToolDecs, _setThemeDecs, _setIsDualDisplayModeDecs, _handleSubProcessStateUpdatedDecs, _ref;
|
|
64
|
+
var _initProto, _setControlEnableDecs, _setSharingUserDecs, _updateSubProcessBackgroundColorDecs, _setBackgroundColorDecs, _setWhiteboardToolDecs, _setThemeDecs, _setIsDualDisplayModeDecs, _handleSubProcessStateUpdatedDecs, _ref;
|
|
65
65
|
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
66
66
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
67
67
|
function _superPropGet(t, o, e, r) { var p = (0, _get2["default"])((0, _getPrototypeOf2["default"])(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
@@ -70,7 +70,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
70
70
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
71
71
|
function _setFunctionName(e, t, n) { "symbol" == _typeof(t) && (t = (t = t.description) ? "[" + t + "]" : ""); try { Object.defineProperty(e, "name", { configurable: !0, value: n ? n + " " + t : t }); } catch (e) {} return e; }
|
|
72
72
|
function _checkInRHS(e) { if (Object(e) !== e) throw TypeError("right-hand side of 'in' should be an object, got " + (null !== e ? _typeof(e) : "null")); return e; }
|
|
73
|
-
_ref = (_setControlEnableDecs = [_mobx.action, _mobx.action.bound], _setSharingUserDecs = [_mobx.action, _mobx.action.bound], _setBackgroundColorDecs = [_mobx.action, _mobx.action.bound], _setWhiteboardToolDecs = [_mobx.action, _mobx.action.bound], _setThemeDecs = [_mobx.action, _mobx.action.bound], _setIsDualDisplayModeDecs = [_mobx.action, _mobx.action.bound], _handleSubProcessStateUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
73
|
+
_ref = (_setControlEnableDecs = [_mobx.action, _mobx.action.bound], _setSharingUserDecs = [_mobx.action, _mobx.action.bound], _updateSubProcessBackgroundColorDecs = [_mobx.action, _mobx.action.bound], _setBackgroundColorDecs = [_mobx.action, _mobx.action.bound], _setWhiteboardToolDecs = [_mobx.action, _mobx.action.bound], _setThemeDecs = [_mobx.action, _mobx.action.bound], _setIsDualDisplayModeDecs = [_mobx.action, _mobx.action.bound], _handleSubProcessStateUpdatedDecs = [_mobx.action, _mobx.action.bound], "logger");
|
|
74
74
|
var FcrUIBoardControlShareProviderImpl = exports.FcrUIBoardControlShareProviderImpl = /*#__PURE__*/function (_FcrUIBoardControlSha) {
|
|
75
75
|
function FcrUIBoardControlShareProviderImpl(privilegeProvider, boardControl, _fcrUIMainWindowRenderer) {
|
|
76
76
|
var _this;
|
|
@@ -110,6 +110,13 @@ var FcrUIBoardControlShareProviderImpl = exports.FcrUIBoardControlShareProviderI
|
|
|
110
110
|
value: function setSharingUser(userInfo) {
|
|
111
111
|
this.sharingUserInfo = userInfo;
|
|
112
112
|
}
|
|
113
|
+
}, {
|
|
114
|
+
key: "updateSubProcessBackgroundColor",
|
|
115
|
+
value: function updateSubProcessBackgroundColor(color) {
|
|
116
|
+
if (this._isDualDisplayMode) {
|
|
117
|
+
this._fcrUIMainWindowRenderer.notifyObservers('onBackgroundColorUpdated', color);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
113
120
|
}, {
|
|
114
121
|
key: "setBackgroundColor",
|
|
115
122
|
value: function setBackgroundColor(color) {
|
|
@@ -184,11 +191,15 @@ var FcrUIBoardControlShareProviderImpl = exports.FcrUIBoardControlShareProviderI
|
|
|
184
191
|
}, {
|
|
185
192
|
key: "_handleSubProcessStateUpdated",
|
|
186
193
|
value: function _handleSubProcessStateUpdated(state) {
|
|
194
|
+
var _this3 = this;
|
|
187
195
|
this.connectionState = state;
|
|
188
196
|
if (state === _type.FcrConnectionState.CONNECTED) {
|
|
189
197
|
_superPropGet(FcrUIBoardControlShareProviderImpl, "setShowLoading", this, 3)([false]);
|
|
190
198
|
_superPropGet(FcrUIBoardControlShareProviderImpl, "setJoinSuccess", this, 3)([true]);
|
|
191
|
-
setTimeout(
|
|
199
|
+
setTimeout(function () {
|
|
200
|
+
_this3.updateSubProcessBackgroundColor(_this3.currentTheme.background);
|
|
201
|
+
_this3.resetWhiteboardTool();
|
|
202
|
+
});
|
|
192
203
|
}
|
|
193
204
|
if (state === _type.FcrConnectionState.CONNECTING || state === _type.FcrConnectionState.DISCONNECTED) {
|
|
194
205
|
_superPropGet(FcrUIBoardControlShareProviderImpl, "setShowLoading", this, 3)([true]);
|
|
@@ -199,7 +210,7 @@ var FcrUIBoardControlShareProviderImpl = exports.FcrUIBoardControlShareProviderI
|
|
|
199
210
|
}]);
|
|
200
211
|
}(_base.FcrUIBoardControlShareProviderBase);
|
|
201
212
|
_FcrUIBoardControlShareProviderImpl = FcrUIBoardControlShareProviderImpl;
|
|
202
|
-
var _applyDecs$e = _applyDecs(_FcrUIBoardControlShareProviderImpl, [[_setControlEnableDecs, 18, "setControlEnable"], [_setSharingUserDecs, 18, "setSharingUser"], [_setBackgroundColorDecs, 18, "setBackgroundColor"], [_setWhiteboardToolDecs, 18, "setWhiteboardTool"], [_setThemeDecs, 18, "setTheme"], [_imports.bound, 2, "saveDraft"], [_imports.bound, 2, "inActive"], [_setIsDualDisplayModeDecs, 18, "setIsDualDisplayMode"], [_handleSubProcessStateUpdatedDecs, 18, "_handleSubProcessStateUpdated"]], [], 0, void 0, _base.FcrUIBoardControlShareProviderBase).e;
|
|
213
|
+
var _applyDecs$e = _applyDecs(_FcrUIBoardControlShareProviderImpl, [[_setControlEnableDecs, 18, "setControlEnable"], [_setSharingUserDecs, 18, "setSharingUser"], [_updateSubProcessBackgroundColorDecs, 18, "updateSubProcessBackgroundColor"], [_setBackgroundColorDecs, 18, "setBackgroundColor"], [_setWhiteboardToolDecs, 18, "setWhiteboardTool"], [_setThemeDecs, 18, "setTheme"], [_imports.bound, 2, "saveDraft"], [_imports.bound, 2, "inActive"], [_setIsDualDisplayModeDecs, 18, "setIsDualDisplayMode"], [_handleSubProcessStateUpdatedDecs, 18, "_handleSubProcessStateUpdated"]], [], 0, void 0, _base.FcrUIBoardControlShareProviderBase).e;
|
|
203
214
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 1);
|
|
204
215
|
_initProto = _applyDecs$e2[0];
|
|
205
216
|
_applyDecs$e;
|
|
@@ -18,6 +18,7 @@ export declare abstract class FcrUIBoardShareProviderBase implements FcrUIBoardS
|
|
|
18
18
|
protected _boardMainWindow: FcrBoardMainWindow | undefined;
|
|
19
19
|
private _userControl;
|
|
20
20
|
private _dialogProvider;
|
|
21
|
+
private _userId;
|
|
21
22
|
private _observer;
|
|
22
23
|
private _boardObserver;
|
|
23
24
|
protected get boardMainWindow(): FcrBoardMainWindow;
|
|
@@ -116,6 +116,7 @@ var FcrUIBoardShareProviderBase = exports.FcrUIBoardShareProviderBase = /*#__PUR
|
|
|
116
116
|
this._sharingControl.addObserver(this._observer);
|
|
117
117
|
this._addLogger();
|
|
118
118
|
this.boardState = this._sharingControl.getWhiteboardState();
|
|
119
|
+
this._userId = this._userControl.getLocalUser().userId;
|
|
119
120
|
if (this.isActive) {
|
|
120
121
|
this._boardControl.open();
|
|
121
122
|
}
|
|
@@ -198,7 +199,7 @@ var FcrUIBoardShareProviderBase = exports.FcrUIBoardShareProviderBase = /*#__PUR
|
|
|
198
199
|
key: "isMyBoard",
|
|
199
200
|
get: function get() {
|
|
200
201
|
if (this.isActive) {
|
|
201
|
-
return this.ownerUser.userId === this.
|
|
202
|
+
return this.ownerUser.userId === this._userId;
|
|
202
203
|
} else {
|
|
203
204
|
throw new Error('get isMyBoard failed, no user is sharing board currently');
|
|
204
205
|
}
|
|
@@ -372,6 +373,7 @@ var FcrUIBoardShareProviderBase = exports.FcrUIBoardShareProviderBase = /*#__PUR
|
|
|
372
373
|
});
|
|
373
374
|
if (theme) {
|
|
374
375
|
this.boardBarControl.toolbarState.themeColors = theme.colors;
|
|
376
|
+
this.boardBarControl.setCurrentTheme(theme);
|
|
375
377
|
} else {
|
|
376
378
|
this.logger.warn("setBackgroundColor ".concat(color, " not match in theme"));
|
|
377
379
|
}
|
|
@@ -83,7 +83,8 @@ var FcrUIBoardShareProviderImpl = exports.FcrUIBoardShareProviderImpl = /*#__PUR
|
|
|
83
83
|
onUndoStateUpdated: _this._handleUndoStateUpdated
|
|
84
84
|
});
|
|
85
85
|
(0, _defineProperty2["default"])(_this, "_boardControlObserver", {
|
|
86
|
-
onConnectionStateUpdated: _this._handleStateUpdated
|
|
86
|
+
onConnectionStateUpdated: _this._handleStateUpdated,
|
|
87
|
+
onBackgroundColorUpdated: _this._handleBackgroundColorUpdatedForSubProcess
|
|
87
88
|
});
|
|
88
89
|
_this._objectManager = _objectManager;
|
|
89
90
|
_this._mainWindowRenderer = _mainWindowRenderer;
|
|
@@ -154,10 +155,15 @@ var FcrUIBoardShareProviderImpl = exports.FcrUIBoardShareProviderImpl = /*#__PUR
|
|
|
154
155
|
this.boardMainWindow.setStrokeColor(this._boardBarControl.currentTheme.colors[2]);
|
|
155
156
|
this.boardBarControl.resetWhiteboardTool();
|
|
156
157
|
}
|
|
158
|
+
}, {
|
|
159
|
+
key: "_handleBackgroundColorUpdatedForSubProcess",
|
|
160
|
+
value: function _handleBackgroundColorUpdatedForSubProcess(color) {
|
|
161
|
+
this._boardBarControl.updateSubProcessBackgroundColor(color);
|
|
162
|
+
}
|
|
157
163
|
}]);
|
|
158
164
|
}(_provider.FcrUIBoardShareProviderBase);
|
|
159
165
|
_FcrUIBoardShareProviderImpl = FcrUIBoardShareProviderImpl;
|
|
160
|
-
var _applyDecs$e = _applyDecs(_FcrUIBoardShareProviderImpl, [[_decorator.bound, 2, "captureScreen"], [_handleStateUpdatedDecs, 18, "_handleStateUpdated"], [_handleRedoStateUpdatedDecs, 18, "_handleRedoStateUpdated"], [_handleUndoStateUpdatedDecs, 18, "_handleUndoStateUpdated"], [_decorator.bound, 2, "_resetWhiteboardTool"]], [], 0, void 0, _provider.FcrUIBoardShareProviderBase).e;
|
|
166
|
+
var _applyDecs$e = _applyDecs(_FcrUIBoardShareProviderImpl, [[_decorator.bound, 2, "captureScreen"], [_handleStateUpdatedDecs, 18, "_handleStateUpdated"], [_handleRedoStateUpdatedDecs, 18, "_handleRedoStateUpdated"], [_handleUndoStateUpdatedDecs, 18, "_handleUndoStateUpdated"], [_decorator.bound, 2, "_resetWhiteboardTool"], [_decorator.bound, 2, "_handleBackgroundColorUpdatedForSubProcess"]], [], 0, void 0, _provider.FcrUIBoardShareProviderBase).e;
|
|
161
167
|
var _applyDecs$e2 = (0, _slicedToArray2["default"])(_applyDecs$e, 1);
|
|
162
168
|
_initProto = _applyDecs$e2[0];
|
|
163
169
|
_applyDecs$e;
|