|
|
@@ -15,7 +15,7 @@ import { connect } from '../../base/redux';
|
|
15
|
15
|
import { getDisplayName, updateSettings } from '../../base/settings';
|
|
16
|
16
|
import ActionButton from './buttons/ActionButton';
|
|
17
|
17
|
import {
|
|
18
|
|
- areJoinByPhoneButtonsVisible,
|
|
|
18
|
+ isJoinByPhoneButtonVisible,
|
|
19
|
19
|
isDeviceStatusVisible,
|
|
20
|
20
|
isJoinByPhoneDialogVisible
|
|
21
|
21
|
} from '../functions';
|
|
|
@@ -35,6 +35,11 @@ type Props = {
|
|
35
|
35
|
*/
|
|
36
|
36
|
deviceStatusVisible: boolean,
|
|
37
|
37
|
|
|
|
38
|
+ /**
|
|
|
39
|
+ * If join by phone button should be visible.
|
|
|
40
|
+ */
|
|
|
41
|
+ hasJoinByPhoneButton: boolean,
|
|
|
42
|
+
|
|
38
|
43
|
/**
|
|
39
|
44
|
* Flag signaling if a user is logged in or not.
|
|
40
|
45
|
*/
|
|
|
@@ -80,11 +85,6 @@ type Props = {
|
|
80
|
85
|
*/
|
|
81
|
86
|
showDialog: boolean,
|
|
82
|
87
|
|
|
83
|
|
- /**
|
|
84
|
|
- * If join by phone buttons should be visible.
|
|
85
|
|
- */
|
|
86
|
|
- hasJoinByPhoneButtons: boolean,
|
|
87
|
|
-
|
|
88
|
88
|
/**
|
|
89
|
89
|
* Used for translation.
|
|
90
|
90
|
*/
|
|
|
@@ -210,11 +210,11 @@ class Prejoin extends Component<Props, State> {
|
|
210
|
210
|
render() {
|
|
211
|
211
|
const {
|
|
212
|
212
|
deviceStatusVisible,
|
|
|
213
|
+ hasJoinByPhoneButton,
|
|
213
|
214
|
isAnonymousUser,
|
|
214
|
215
|
joinConference,
|
|
215
|
216
|
joinConferenceWithoutAudio,
|
|
216
|
217
|
name,
|
|
217
|
|
- hasJoinByPhoneButtons,
|
|
218
|
218
|
showDialog,
|
|
219
|
219
|
t
|
|
220
|
220
|
} = this.props;
|
|
|
@@ -251,7 +251,7 @@ class Prejoin extends Component<Props, State> {
|
|
251
|
251
|
src = { IconVolumeOff } />
|
|
252
|
252
|
{ t('prejoin.joinWithoutAudio') }
|
|
253
|
253
|
</div>
|
|
254
|
|
- <div
|
|
|
254
|
+ {hasJoinByPhoneButton && <div
|
|
255
|
255
|
className = 'prejoin-preview-dropdown-btn'
|
|
256
|
256
|
onClick = { _showDialog }>
|
|
257
|
257
|
<Icon
|
|
|
@@ -259,12 +259,13 @@ class Prejoin extends Component<Props, State> {
|
|
259
|
259
|
size = { 24 }
|
|
260
|
260
|
src = { IconPhone } />
|
|
261
|
261
|
{ t('prejoin.joinAudioByPhone') }
|
|
262
|
|
- </div>
|
|
|
262
|
+ </div>}
|
|
263
|
263
|
</div> }
|
|
264
|
264
|
isOpen = { showJoinByPhoneButtons }
|
|
265
|
265
|
onClose = { _onDropdownClose }>
|
|
266
|
266
|
<ActionButton
|
|
267
|
|
- hasOptions = { hasJoinByPhoneButtons }
|
|
|
267
|
+ disabled = { !name }
|
|
|
268
|
+ hasOptions = { true }
|
|
268
|
269
|
onClick = { joinConference }
|
|
269
|
270
|
onOptionsClick = { _onOptionsClick }
|
|
270
|
271
|
type = 'primary'>
|
|
|
@@ -312,7 +313,7 @@ function mapStateToProps(state): Object {
|
|
312
|
313
|
name: getDisplayName(state),
|
|
313
|
314
|
roomName: getRoomName(state),
|
|
314
|
315
|
showDialog: isJoinByPhoneDialogVisible(state),
|
|
315
|
|
- hasJoinByPhoneButtons: areJoinByPhoneButtonsVisible(state)
|
|
|
316
|
+ hasJoinByPhoneButton: isJoinByPhoneButtonVisible(state)
|
|
316
|
317
|
};
|
|
317
|
318
|
}
|
|
318
|
319
|
|