|
@@ -11,6 +11,7 @@ import { ActionButton, InputField, PreMeetingScreen, ToggleButton } from '../../
|
11
|
11
|
import { connect } from '../../base/redux';
|
12
|
12
|
import { getDisplayName, updateSettings } from '../../base/settings';
|
13
|
13
|
import { getLocalJitsiVideoTrack } from '../../base/tracks';
|
|
14
|
+import { isButtonEnabled } from '../../toolbox/functions.web';
|
14
|
15
|
import {
|
15
|
16
|
joinConference as joinConferenceAction,
|
16
|
17
|
joinConferenceWithoutAudio as joinConferenceWithoutAudioAction,
|
|
@@ -28,6 +29,8 @@ import {
|
28
|
29
|
import JoinByPhoneDialog from './dialogs/JoinByPhoneDialog';
|
29
|
30
|
import DeviceStatus from './preview/DeviceStatus';
|
30
|
31
|
|
|
32
|
+declare var interfaceConfig: Object;
|
|
33
|
+
|
31
|
34
|
type Props = {
|
32
|
35
|
|
33
|
36
|
/**
|
|
@@ -100,6 +103,11 @@ type Props = {
|
100
|
103
|
*/
|
101
|
104
|
showJoinActions: boolean,
|
102
|
105
|
|
|
106
|
+ /**
|
|
107
|
+ * Flag signaling the visibility of the conference URL section.
|
|
108
|
+ */
|
|
109
|
+ showConferenceInfo: boolean,
|
|
110
|
+
|
103
|
111
|
/**
|
104
|
112
|
* If 'JoinByPhoneDialog' is visible or not.
|
105
|
113
|
*/
|
|
@@ -139,6 +147,7 @@ class Prejoin extends Component<Props, State> {
|
139
|
147
|
* @static
|
140
|
148
|
*/
|
141
|
149
|
static defaultProps = {
|
|
150
|
+ showConferenceInfo: true,
|
142
|
151
|
showJoinActions: true,
|
143
|
152
|
showSkipPrejoin: true
|
144
|
153
|
};
|
|
@@ -257,6 +266,7 @@ class Prejoin extends Component<Props, State> {
|
257
|
266
|
showAvatar,
|
258
|
267
|
showCameraPreview,
|
259
|
268
|
showDialog,
|
|
269
|
+ showConferenceInfo,
|
260
|
270
|
showJoinActions,
|
261
|
271
|
t,
|
262
|
272
|
videoTrack
|
|
@@ -270,7 +280,7 @@ class Prejoin extends Component<Props, State> {
|
270
|
280
|
footer = { this._renderFooter() }
|
271
|
281
|
name = { name }
|
272
|
282
|
showAvatar = { showAvatar }
|
273
|
|
- showConferenceInfo = { showJoinActions }
|
|
283
|
+ showConferenceInfo = { showConferenceInfo }
|
274
|
284
|
skipPrejoinButton = { this._renderSkipPrejoinButton() }
|
275
|
285
|
title = { t('prejoin.joinMeeting') }
|
276
|
286
|
videoMuted = { !showCameraPreview }
|
|
@@ -368,11 +378,22 @@ class Prejoin extends Component<Props, State> {
|
368
|
378
|
* Maps (parts of) the redux state to the React {@code Component} props.
|
369
|
379
|
*
|
370
|
380
|
* @param {Object} state - The redux state.
|
|
381
|
+ * @param {Object} ownProps - The props passed to the component.
|
371
|
382
|
* @returns {Object}
|
372
|
383
|
*/
|
373
|
|
-function mapStateToProps(state): Object {
|
|
384
|
+function mapStateToProps(state, ownProps): Object {
|
374
|
385
|
const name = getDisplayName(state);
|
375
|
386
|
const joinButtonDisabled = isDisplayNameRequired(state) && !name;
|
|
387
|
+ const { showJoinActions } = ownProps;
|
|
388
|
+ const isInviteButtonEnabled = isButtonEnabled('invite');
|
|
389
|
+
|
|
390
|
+ // Hide conference info when interfaceConfig is available and the invite button is disabled.
|
|
391
|
+ // In all other cases we want to preserve the behaviour and control the the conference info
|
|
392
|
+ // visibility trough showJoinActions.
|
|
393
|
+ const showConferenceInfo
|
|
394
|
+ = typeof isInviteButtonEnabled === 'undefined' || isInviteButtonEnabled === true
|
|
395
|
+ ? showJoinActions
|
|
396
|
+ : false;
|
376
|
397
|
|
377
|
398
|
return {
|
378
|
399
|
buttonIsToggled: isPrejoinSkipped(state),
|
|
@@ -383,6 +404,7 @@ function mapStateToProps(state): Object {
|
383
|
404
|
showDialog: isJoinByPhoneDialogVisible(state),
|
384
|
405
|
hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state),
|
385
|
406
|
showCameraPreview: !isVideoMutedByUser(state),
|
|
407
|
+ showConferenceInfo,
|
386
|
408
|
videoTrack: getLocalJitsiVideoTrack(state)
|
387
|
409
|
};
|
388
|
410
|
}
|