|
@@ -1,11 +1,12 @@
|
1
|
|
-import React, { Component } from 'react';
|
2
|
|
-import { WithTranslation } from 'react-i18next';
|
|
1
|
+/* eslint-disable react/jsx-no-bind */
|
|
2
|
+import React, { useRef, useState } from 'react';
|
|
3
|
+import { useTranslation } from 'react-i18next';
|
3
|
4
|
import { connect } from 'react-redux';
|
|
5
|
+import { makeStyles } from 'tss-react/mui';
|
4
|
6
|
|
5
|
7
|
import { IReduxState } from '../../../app/types';
|
6
|
8
|
import Avatar from '../../../base/avatar/components/Avatar';
|
7
|
9
|
import { isNameReadOnly } from '../../../base/config/functions.web';
|
8
|
|
-import { translate } from '../../../base/i18n/functions';
|
9
|
10
|
import { IconArrowDown, IconArrowUp, IconPhoneRinging, IconVolumeOff } from '../../../base/icons/svg';
|
10
|
11
|
import { isVideoMutedByUser } from '../../../base/media/functions';
|
11
|
12
|
import { getLocalParticipant } from '../../../base/participants/functions';
|
|
@@ -14,6 +15,7 @@ import ActionButton from '../../../base/premeeting/components/web/ActionButton';
|
14
|
15
|
import PreMeetingScreen from '../../../base/premeeting/components/web/PreMeetingScreen';
|
15
|
16
|
import { updateSettings } from '../../../base/settings/actions';
|
16
|
17
|
import { getDisplayName } from '../../../base/settings/functions.web';
|
|
18
|
+import { withPixelLineHeight } from '../../../base/styles/functions.web';
|
17
|
19
|
import { getLocalJitsiVideoTrack } from '../../../base/tracks/functions.web';
|
18
|
20
|
import Button from '../../../base/ui/components/web/Button';
|
19
|
21
|
import Input from '../../../base/ui/components/web/Input';
|
|
@@ -33,7 +35,7 @@ import {
|
33
|
35
|
|
34
|
36
|
import JoinByPhoneDialog from './dialogs/JoinByPhoneDialog';
|
35
|
37
|
|
36
|
|
-interface IProps extends WithTranslation {
|
|
38
|
+interface IProps {
|
37
|
39
|
|
38
|
40
|
/**
|
39
|
41
|
* Indicates whether the display name is editable.
|
|
@@ -116,45 +118,90 @@ interface IProps extends WithTranslation {
|
116
|
118
|
videoTrack?: Object;
|
117
|
119
|
}
|
118
|
120
|
|
119
|
|
-interface IState {
|
120
|
|
-
|
121
|
|
- /**
|
122
|
|
- * Flag controlling the visibility of the 'join by phone' buttons.
|
123
|
|
- */
|
124
|
|
- showJoinByPhoneButtons: boolean;
|
125
|
|
-}
|
126
|
|
-
|
127
|
|
-/**
|
128
|
|
- * This component is displayed before joining a meeting.
|
129
|
|
- */
|
130
|
|
-class Prejoin extends Component<IProps, IState> {
|
131
|
|
- showDisplayNameField: boolean;
|
132
|
|
-
|
133
|
|
- /**
|
134
|
|
- * Initializes a new {@code Prejoin} instance.
|
135
|
|
- *
|
136
|
|
- * @inheritdoc
|
137
|
|
- */
|
138
|
|
- constructor(props: IProps) {
|
139
|
|
- super(props);
|
140
|
|
-
|
141
|
|
- this.state = {
|
142
|
|
- showJoinByPhoneButtons: false
|
143
|
|
- };
|
144
|
|
-
|
145
|
|
- this._closeDialog = this._closeDialog.bind(this);
|
146
|
|
- this._showDialog = this._showDialog.bind(this);
|
147
|
|
- this._onJoinButtonClick = this._onJoinButtonClick.bind(this);
|
148
|
|
- this._onDropdownClose = this._onDropdownClose.bind(this);
|
149
|
|
- this._onOptionsClick = this._onOptionsClick.bind(this);
|
150
|
|
- this._setName = this._setName.bind(this);
|
151
|
|
- this._onJoinConferenceWithoutAudioKeyPress = this._onJoinConferenceWithoutAudioKeyPress.bind(this);
|
152
|
|
- this._showDialogKeyPress = this._showDialogKeyPress.bind(this);
|
153
|
|
- this._getExtraJoinButtons = this._getExtraJoinButtons.bind(this);
|
154
|
|
- this._onInputKeyPress = this._onInputKeyPress.bind(this);
|
155
|
|
-
|
156
|
|
- this.showDisplayNameField = props.canEditDisplayName || props.showErrorOnJoin;
|
157
|
|
- }
|
|
121
|
+const useStyles = makeStyles()(theme => {
|
|
122
|
+ return {
|
|
123
|
+ inputContainer: {
|
|
124
|
+ width: '100%'
|
|
125
|
+ },
|
|
126
|
+
|
|
127
|
+ input: {
|
|
128
|
+ width: '100%',
|
|
129
|
+ marginBottom: theme.spacing(3),
|
|
130
|
+
|
|
131
|
+ '& input': {
|
|
132
|
+ textAlign: 'center'
|
|
133
|
+ }
|
|
134
|
+ },
|
|
135
|
+
|
|
136
|
+ avatarContainer: {
|
|
137
|
+ display: 'flex',
|
|
138
|
+ alignItems: 'center',
|
|
139
|
+ flexDirection: 'column'
|
|
140
|
+ },
|
|
141
|
+
|
|
142
|
+ avatar: {
|
|
143
|
+ margin: `${theme.spacing(2)} auto ${theme.spacing(3)}`
|
|
144
|
+ },
|
|
145
|
+
|
|
146
|
+ avatarName: {
|
|
147
|
+ ...withPixelLineHeight(theme.typography.bodyShortBoldLarge),
|
|
148
|
+ color: theme.palette.text01,
|
|
149
|
+ marginBottom: theme.spacing(5),
|
|
150
|
+ textAlign: 'center'
|
|
151
|
+ },
|
|
152
|
+
|
|
153
|
+ error: {
|
|
154
|
+ backgroundColor: theme.palette.actionDanger,
|
|
155
|
+ color: theme.palette.text01,
|
|
156
|
+ borderRadius: theme.shape.borderRadius,
|
|
157
|
+ width: '100%',
|
|
158
|
+ ...withPixelLineHeight(theme.typography.labelRegular),
|
|
159
|
+ boxSizing: 'border-box',
|
|
160
|
+ padding: theme.spacing(1),
|
|
161
|
+ textAlign: 'center',
|
|
162
|
+ marginTop: `-${theme.spacing(2)}`,
|
|
163
|
+ marginBottom: theme.spacing(3)
|
|
164
|
+ },
|
|
165
|
+
|
|
166
|
+ dropdownContainer: {
|
|
167
|
+ position: 'relative',
|
|
168
|
+ width: '100%'
|
|
169
|
+ },
|
|
170
|
+
|
|
171
|
+ dropdownButtons: {
|
|
172
|
+ width: '300px',
|
|
173
|
+ padding: '8px 0',
|
|
174
|
+ backgroundColor: theme.palette.action02,
|
|
175
|
+ color: theme.palette.text04,
|
|
176
|
+ borderRadius: theme.shape.borderRadius,
|
|
177
|
+ position: 'relative',
|
|
178
|
+ top: `-${theme.spacing(3)}`
|
|
179
|
+ }
|
|
180
|
+ };
|
|
181
|
+});
|
|
182
|
+
|
|
183
|
+const Prejoin = ({
|
|
184
|
+ canEditDisplayName,
|
|
185
|
+ deviceStatusVisible,
|
|
186
|
+ hasJoinByPhoneButton,
|
|
187
|
+ joinConference,
|
|
188
|
+ joinConferenceWithoutAudio,
|
|
189
|
+ joiningInProgress,
|
|
190
|
+ name,
|
|
191
|
+ participantId,
|
|
192
|
+ prejoinConfig,
|
|
193
|
+ readOnlyName,
|
|
194
|
+ setJoinByPhoneDialogVisiblity,
|
|
195
|
+ showCameraPreview,
|
|
196
|
+ showDialog,
|
|
197
|
+ showErrorOnJoin,
|
|
198
|
+ updateSettings: dispatchUpdateSettings,
|
|
199
|
+ videoTrack
|
|
200
|
+}: IProps) => {
|
|
201
|
+ const showDisplayNameField = useRef(canEditDisplayName || showErrorOnJoin);
|
|
202
|
+ const [ showJoinByPhoneButtons, setShowJoinByPhoneButtons ] = useState(false);
|
|
203
|
+ const { classes } = useStyles();
|
|
204
|
+ const { t } = useTranslation();
|
158
|
205
|
|
159
|
206
|
/**
|
160
|
207
|
* Handler for the join button.
|
|
@@ -162,23 +209,21 @@ class Prejoin extends Component<IProps, IState> {
|
162
|
209
|
* @param {Object} e - The synthetic event.
|
163
|
210
|
* @returns {void}
|
164
|
211
|
*/
|
165
|
|
- _onJoinButtonClick() {
|
166
|
|
- if (this.props.showErrorOnJoin) {
|
|
212
|
+ const onJoinButtonClick = () => {
|
|
213
|
+ if (showErrorOnJoin) {
|
167
|
214
|
return;
|
168
|
215
|
}
|
169
|
|
- this.props.joinConference();
|
170
|
|
- }
|
|
216
|
+ joinConference();
|
|
217
|
+ };
|
171
|
218
|
|
172
|
219
|
/**
|
173
|
220
|
* Closes the dropdown.
|
174
|
221
|
*
|
175
|
222
|
* @returns {void}
|
176
|
223
|
*/
|
177
|
|
- _onDropdownClose() {
|
178
|
|
- this.setState({
|
179
|
|
- showJoinByPhoneButtons: false
|
180
|
|
- });
|
181
|
|
- }
|
|
224
|
+ const onDropdownClose = () => {
|
|
225
|
+ setShowJoinByPhoneButtons(false);
|
|
226
|
+ };
|
182
|
227
|
|
183
|
228
|
/**
|
184
|
229
|
* Displays the join by phone buttons dropdown.
|
|
@@ -186,13 +231,11 @@ class Prejoin extends Component<IProps, IState> {
|
186
|
231
|
* @param {Object} e - The synthetic event.
|
187
|
232
|
* @returns {void}
|
188
|
233
|
*/
|
189
|
|
- _onOptionsClick(e?: React.KeyboardEvent | React.MouseEvent | undefined) {
|
|
234
|
+ const onOptionsClick = (e?: React.KeyboardEvent | React.MouseEvent | undefined) => {
|
190
|
235
|
e?.stopPropagation();
|
191
|
236
|
|
192
|
|
- this.setState({
|
193
|
|
- showJoinByPhoneButtons: !this.state.showJoinByPhoneButtons
|
194
|
|
- });
|
195
|
|
- }
|
|
237
|
+ setShowJoinByPhoneButtons(show => !show);
|
|
238
|
+ };
|
196
|
239
|
|
197
|
240
|
/**
|
198
|
241
|
* Sets the guest participant name.
|
|
@@ -200,30 +243,30 @@ class Prejoin extends Component<IProps, IState> {
|
200
|
243
|
* @param {string} displayName - Participant name.
|
201
|
244
|
* @returns {void}
|
202
|
245
|
*/
|
203
|
|
- _setName(displayName: string) {
|
204
|
|
- this.props.updateSettings({
|
|
246
|
+ const setName = (displayName: string) => {
|
|
247
|
+ dispatchUpdateSettings({
|
205
|
248
|
displayName
|
206
|
249
|
});
|
207
|
|
- }
|
|
250
|
+ };
|
208
|
251
|
|
209
|
252
|
/**
|
210
|
253
|
* Closes the join by phone dialog.
|
211
|
254
|
*
|
212
|
255
|
* @returns {undefined}
|
213
|
256
|
*/
|
214
|
|
- _closeDialog() {
|
215
|
|
- this.props.setJoinByPhoneDialogVisiblity(false);
|
216
|
|
- }
|
|
257
|
+ const closeDialog = () => {
|
|
258
|
+ setJoinByPhoneDialogVisiblity(false);
|
|
259
|
+ };
|
217
|
260
|
|
218
|
261
|
/**
|
219
|
262
|
* Displays the dialog for joining a meeting by phone.
|
220
|
263
|
*
|
221
|
264
|
* @returns {undefined}
|
222
|
265
|
*/
|
223
|
|
- _showDialog() {
|
224
|
|
- this.props.setJoinByPhoneDialogVisiblity(true);
|
225
|
|
- this._onDropdownClose();
|
226
|
|
- }
|
|
266
|
+ const doShowDialog = () => {
|
|
267
|
+ setJoinByPhoneDialogVisiblity(true);
|
|
268
|
+ onDropdownClose();
|
|
269
|
+ };
|
227
|
270
|
|
228
|
271
|
/**
|
229
|
272
|
* KeyPress handler for accessibility.
|
|
@@ -232,12 +275,12 @@ class Prejoin extends Component<IProps, IState> {
|
232
|
275
|
*
|
233
|
276
|
* @returns {void}
|
234
|
277
|
*/
|
235
|
|
- _showDialogKeyPress(e: React.KeyboardEvent) {
|
|
278
|
+ const showDialogKeyPress = (e: React.KeyboardEvent) => {
|
236
|
279
|
if (e.key === ' ' || e.key === 'Enter') {
|
237
|
280
|
e.preventDefault();
|
238
|
|
- this._showDialog();
|
|
281
|
+ doShowDialog();
|
239
|
282
|
}
|
240
|
|
- }
|
|
283
|
+ };
|
241
|
284
|
|
242
|
285
|
/**
|
243
|
286
|
* KeyPress handler for accessibility.
|
|
@@ -246,30 +289,28 @@ class Prejoin extends Component<IProps, IState> {
|
246
|
289
|
*
|
247
|
290
|
* @returns {void}
|
248
|
291
|
*/
|
249
|
|
- _onJoinConferenceWithoutAudioKeyPress(e: React.KeyboardEvent) {
|
250
|
|
- if (this.props.joinConferenceWithoutAudio
|
|
292
|
+ const onJoinConferenceWithoutAudioKeyPress = (e: React.KeyboardEvent) => {
|
|
293
|
+ if (joinConferenceWithoutAudio
|
251
|
294
|
&& (e.key === ' '
|
252
|
295
|
|| e.key === 'Enter')) {
|
253
|
296
|
e.preventDefault();
|
254
|
|
- this.props.joinConferenceWithoutAudio();
|
|
297
|
+ joinConferenceWithoutAudio();
|
255
|
298
|
}
|
256
|
|
- }
|
|
299
|
+ };
|
257
|
300
|
|
258
|
301
|
/**
|
259
|
302
|
* Gets the list of extra join buttons.
|
260
|
303
|
*
|
261
|
304
|
* @returns {Object} - The list of extra buttons.
|
262
|
305
|
*/
|
263
|
|
- _getExtraJoinButtons() {
|
264
|
|
- const { joinConferenceWithoutAudio, t } = this.props;
|
265
|
|
-
|
|
306
|
+ const getExtraJoinButtons = () => {
|
266
|
307
|
const noAudio = {
|
267
|
308
|
key: 'no-audio',
|
268
|
309
|
testId: 'prejoin.joinWithoutAudio',
|
269
|
310
|
icon: IconVolumeOff,
|
270
|
311
|
label: t('prejoin.joinWithoutAudio'),
|
271
|
312
|
onClick: joinConferenceWithoutAudio,
|
272
|
|
- onKeyPress: this._onJoinConferenceWithoutAudioKeyPress
|
|
313
|
+ onKeyPress: onJoinConferenceWithoutAudioKeyPress
|
273
|
314
|
};
|
274
|
315
|
|
275
|
316
|
const byPhone = {
|
|
@@ -277,15 +318,15 @@ class Prejoin extends Component<IProps, IState> {
|
277
|
318
|
testId: 'prejoin.joinByPhone',
|
278
|
319
|
icon: IconPhoneRinging,
|
279
|
320
|
label: t('prejoin.joinAudioByPhone'),
|
280
|
|
- onClick: this._showDialog,
|
281
|
|
- onKeyPress: this._showDialogKeyPress
|
|
321
|
+ onClick: doShowDialog,
|
|
322
|
+ onKeyPress: showDialogKeyPress
|
282
|
323
|
};
|
283
|
324
|
|
284
|
325
|
return {
|
285
|
326
|
noAudio,
|
286
|
327
|
byPhone
|
287
|
328
|
};
|
288
|
|
- }
|
|
329
|
+ };
|
289
|
330
|
|
290
|
331
|
/**
|
291
|
332
|
* Handle keypress on input.
|
|
@@ -293,127 +334,99 @@ class Prejoin extends Component<IProps, IState> {
|
293
|
334
|
* @param {KeyboardEvent} e - Keyboard event.
|
294
|
335
|
* @returns {void}
|
295
|
336
|
*/
|
296
|
|
- _onInputKeyPress(e: React.KeyboardEvent) {
|
297
|
|
- const { joinConference } = this.props;
|
298
|
|
-
|
|
337
|
+ const onInputKeyPress = (e: React.KeyboardEvent) => {
|
299
|
338
|
if (e.key === 'Enter') {
|
300
|
339
|
joinConference();
|
301
|
340
|
}
|
302
|
|
- }
|
|
341
|
+ };
|
303
|
342
|
|
304
|
|
- /**
|
305
|
|
- * Implements React's {@link Component#render()}.
|
306
|
|
- *
|
307
|
|
- * @inheritdoc
|
308
|
|
- * @returns {ReactElement}
|
309
|
|
- */
|
310
|
|
- render() {
|
311
|
|
- const {
|
312
|
|
- deviceStatusVisible,
|
313
|
|
- hasJoinByPhoneButton,
|
314
|
|
- joinConferenceWithoutAudio,
|
315
|
|
- joiningInProgress,
|
316
|
|
- name,
|
317
|
|
- participantId,
|
318
|
|
- prejoinConfig,
|
319
|
|
- readOnlyName,
|
320
|
|
- showCameraPreview,
|
321
|
|
- showDialog,
|
322
|
|
- showErrorOnJoin,
|
323
|
|
- t,
|
324
|
|
- videoTrack
|
325
|
|
- } = this.props;
|
326
|
|
- const { _closeDialog, _onDropdownClose, _onJoinButtonClick,
|
327
|
|
- _onOptionsClick, _setName, _onInputKeyPress } = this;
|
328
|
|
-
|
329
|
|
- const extraJoinButtons = this._getExtraJoinButtons();
|
330
|
|
- let extraButtonsToRender = Object.values(extraJoinButtons).filter((val: any) =>
|
331
|
|
- !(prejoinConfig?.hideExtraJoinButtons || []).includes(val.key)
|
332
|
|
- );
|
333
|
|
-
|
334
|
|
- if (!hasJoinByPhoneButton) {
|
335
|
|
- extraButtonsToRender = extraButtonsToRender.filter((btn: any) => btn.key !== 'by-phone');
|
336
|
|
- }
|
337
|
|
- const hasExtraJoinButtons = Boolean(extraButtonsToRender.length);
|
338
|
|
- const { showJoinByPhoneButtons } = this.state;
|
339
|
|
-
|
340
|
|
- return (
|
341
|
|
- <PreMeetingScreen
|
342
|
|
- showDeviceStatus = { deviceStatusVisible }
|
343
|
|
- title = { t('prejoin.joinMeeting') }
|
344
|
|
- videoMuted = { !showCameraPreview }
|
345
|
|
- videoTrack = { videoTrack }>
|
346
|
|
- <div
|
347
|
|
- className = 'prejoin-input-area'
|
348
|
|
- data-testid = 'prejoin.screen'>
|
349
|
|
- {this.showDisplayNameField ? (<Input
|
350
|
|
- autoComplete = { 'name' }
|
351
|
|
- autoFocus = { true }
|
352
|
|
- className = 'prejoin-input'
|
353
|
|
- error = { showErrorOnJoin }
|
354
|
|
- onChange = { _setName }
|
355
|
|
- onKeyPress = { _onInputKeyPress }
|
356
|
|
- placeholder = { t('dialog.enterDisplayName') }
|
357
|
|
- readOnly = { readOnlyName }
|
358
|
|
- value = { name } />
|
359
|
|
- ) : (
|
360
|
|
- <div className = 'prejoin-avatar-container'>
|
361
|
|
- <Avatar
|
362
|
|
- className = 'prejoin-avatar'
|
363
|
|
- displayName = { name }
|
364
|
|
- participantId = { participantId }
|
365
|
|
- size = { 72 } />
|
366
|
|
- <div className = 'prejoin-avatar-name'>{name}</div>
|
367
|
|
- </div>
|
368
|
|
- )}
|
369
|
|
-
|
370
|
|
- {showErrorOnJoin && <div
|
371
|
|
- className = 'prejoin-error'
|
372
|
|
- data-testid = 'prejoin.errorMessage'>{t('prejoin.errorMissingName')}</div>}
|
373
|
|
-
|
374
|
|
- <div className = 'prejoin-preview-dropdown-container'>
|
375
|
|
- <Popover
|
376
|
|
- content = { hasExtraJoinButtons && <div className = 'prejoin-preview-dropdown-btns'>
|
377
|
|
- {extraButtonsToRender.map(({ key, ...rest }) => (
|
378
|
|
- <Button
|
379
|
|
- disabled = { joiningInProgress }
|
380
|
|
- fullWidth = { true }
|
381
|
|
- key = { key }
|
382
|
|
- type = { BUTTON_TYPES.SECONDARY }
|
383
|
|
- { ...rest } />
|
384
|
|
- ))}
|
385
|
|
- </div> }
|
386
|
|
- onPopoverClose = { _onDropdownClose }
|
387
|
|
- position = 'bottom'
|
388
|
|
- trigger = 'click'
|
389
|
|
- visible = { showJoinByPhoneButtons }>
|
390
|
|
- <ActionButton
|
391
|
|
- OptionsIcon = { showJoinByPhoneButtons ? IconArrowUp : IconArrowDown }
|
392
|
|
- ariaDropDownLabel = { t('prejoin.joinWithoutAudio') }
|
393
|
|
- ariaLabel = { t('prejoin.joinMeeting') }
|
394
|
|
- ariaPressed = { showJoinByPhoneButtons }
|
395
|
|
- disabled = { joiningInProgress }
|
396
|
|
- hasOptions = { hasExtraJoinButtons }
|
397
|
|
- onClick = { _onJoinButtonClick }
|
398
|
|
- onOptionsClick = { _onOptionsClick }
|
399
|
|
- role = 'button'
|
400
|
|
- tabIndex = { 0 }
|
401
|
|
- testId = 'prejoin.joinMeeting'
|
402
|
|
- type = 'primary'>
|
403
|
|
- { t('prejoin.joinMeeting') }
|
404
|
|
- </ActionButton>
|
405
|
|
- </Popover>
|
|
343
|
+ const extraJoinButtons = getExtraJoinButtons();
|
|
344
|
+ let extraButtonsToRender = Object.values(extraJoinButtons).filter((val: any) =>
|
|
345
|
+ !(prejoinConfig?.hideExtraJoinButtons || []).includes(val.key)
|
|
346
|
+ );
|
|
347
|
+
|
|
348
|
+ if (!hasJoinByPhoneButton) {
|
|
349
|
+ extraButtonsToRender = extraButtonsToRender.filter((btn: any) => btn.key !== 'by-phone');
|
|
350
|
+ }
|
|
351
|
+ const hasExtraJoinButtons = Boolean(extraButtonsToRender.length);
|
|
352
|
+
|
|
353
|
+ return (
|
|
354
|
+ <PreMeetingScreen
|
|
355
|
+ showDeviceStatus = { deviceStatusVisible }
|
|
356
|
+ title = { t('prejoin.joinMeeting') }
|
|
357
|
+ videoMuted = { !showCameraPreview }
|
|
358
|
+ videoTrack = { videoTrack }>
|
|
359
|
+ <div
|
|
360
|
+ className = { classes.inputContainer }
|
|
361
|
+ data-testid = 'prejoin.screen'>
|
|
362
|
+ {showDisplayNameField.current ? (<Input
|
|
363
|
+ autoComplete = { 'name' }
|
|
364
|
+ autoFocus = { true }
|
|
365
|
+ className = { classes.input }
|
|
366
|
+ error = { showErrorOnJoin }
|
|
367
|
+ onChange = { setName }
|
|
368
|
+ onKeyPress = { onInputKeyPress }
|
|
369
|
+ placeholder = { t('dialog.enterDisplayName') }
|
|
370
|
+ readOnly = { readOnlyName }
|
|
371
|
+ value = { name } />
|
|
372
|
+ ) : (
|
|
373
|
+ <div className = { classes.avatarContainer }>
|
|
374
|
+ <Avatar
|
|
375
|
+ className = { classes.avatar }
|
|
376
|
+ displayName = { name }
|
|
377
|
+ participantId = { participantId }
|
|
378
|
+ size = { 72 } />
|
|
379
|
+ <div className = { classes.avatarName }>{name}</div>
|
406
|
380
|
</div>
|
407
|
|
- </div>
|
408
|
|
- { showDialog && (
|
409
|
|
- <JoinByPhoneDialog // @ts-ignore
|
410
|
|
- joinConferenceWithoutAudio = { joinConferenceWithoutAudio }
|
411
|
|
- onClose = { _closeDialog } />
|
412
|
381
|
)}
|
413
|
|
- </PreMeetingScreen>
|
414
|
|
- );
|
415
|
|
- }
|
416
|
|
-}
|
|
382
|
+
|
|
383
|
+ {showErrorOnJoin && <div
|
|
384
|
+ className = { classes.error }
|
|
385
|
+ data-testid = 'prejoin.errorMessage'>{t('prejoin.errorMissingName')}</div>}
|
|
386
|
+
|
|
387
|
+ <div className = { classes.dropdownContainer }>
|
|
388
|
+ <Popover
|
|
389
|
+ content = { hasExtraJoinButtons && <div className = { classes.dropdownButtons }>
|
|
390
|
+ {extraButtonsToRender.map(({ key, ...rest }) => (
|
|
391
|
+ <Button
|
|
392
|
+ disabled = { joiningInProgress }
|
|
393
|
+ fullWidth = { true }
|
|
394
|
+ key = { key }
|
|
395
|
+ type = { BUTTON_TYPES.SECONDARY }
|
|
396
|
+ { ...rest } />
|
|
397
|
+ ))}
|
|
398
|
+ </div> }
|
|
399
|
+ onPopoverClose = { onDropdownClose }
|
|
400
|
+ position = 'bottom'
|
|
401
|
+ trigger = 'click'
|
|
402
|
+ visible = { showJoinByPhoneButtons }>
|
|
403
|
+ <ActionButton
|
|
404
|
+ OptionsIcon = { showJoinByPhoneButtons ? IconArrowUp : IconArrowDown }
|
|
405
|
+ ariaDropDownLabel = { t('prejoin.joinWithoutAudio') }
|
|
406
|
+ ariaLabel = { t('prejoin.joinMeeting') }
|
|
407
|
+ ariaPressed = { showJoinByPhoneButtons }
|
|
408
|
+ disabled = { joiningInProgress }
|
|
409
|
+ hasOptions = { hasExtraJoinButtons }
|
|
410
|
+ onClick = { onJoinButtonClick }
|
|
411
|
+ onOptionsClick = { onOptionsClick }
|
|
412
|
+ role = 'button'
|
|
413
|
+ tabIndex = { 0 }
|
|
414
|
+ testId = 'prejoin.joinMeeting'
|
|
415
|
+ type = 'primary'>
|
|
416
|
+ {t('prejoin.joinMeeting')}
|
|
417
|
+ </ActionButton>
|
|
418
|
+ </Popover>
|
|
419
|
+ </div>
|
|
420
|
+ </div>
|
|
421
|
+ {showDialog && (
|
|
422
|
+ <JoinByPhoneDialog
|
|
423
|
+ joinConferenceWithoutAudio = { joinConferenceWithoutAudio }
|
|
424
|
+ onClose = { closeDialog } />
|
|
425
|
+ )}
|
|
426
|
+ </PreMeetingScreen>
|
|
427
|
+ );
|
|
428
|
+};
|
|
429
|
+
|
417
|
430
|
|
418
|
431
|
/**
|
419
|
432
|
* Maps (parts of) the redux state to the React {@code Component} props.
|
|
@@ -450,4 +463,4 @@ const mapDispatchToProps = {
|
450
|
463
|
updateSettings
|
451
|
464
|
};
|
452
|
465
|
|
453
|
|
-export default connect(mapStateToProps, mapDispatchToProps)(translate(Prejoin));
|
|
466
|
+export default connect(mapStateToProps, mapDispatchToProps)(Prejoin);
|