|
@@ -4,22 +4,28 @@ import React from 'react';
|
4
|
4
|
|
5
|
5
|
import { translate } from '../../../../base/i18n';
|
6
|
6
|
import { connect } from '../../../../base/redux';
|
7
|
|
-import { getDialInfoPageURL } from '../../../functions';
|
|
7
|
+import { getDialInfoPageURL, hasMultipleNumbers } from '../../../functions';
|
8
|
8
|
|
9
|
9
|
import DialInNumber from './DialInNumber';
|
10
|
10
|
|
11
|
11
|
type Props = {
|
12
|
12
|
|
13
|
13
|
/**
|
14
|
|
- * The object representing the dialIn feature.
|
|
14
|
+ * The numberic identifier for the current conference, used after dialing a
|
|
15
|
+ * the number to join the conference.
|
15
|
16
|
*/
|
16
|
|
- _dialIn: Object,
|
|
17
|
+ _conferenceID: number,
|
17
|
18
|
|
18
|
19
|
/**
|
19
|
20
|
* The url of the page containing the dial-in numbers list.
|
20
|
21
|
*/
|
21
|
22
|
_dialInfoPageUrl: string,
|
22
|
23
|
|
|
24
|
+ /**
|
|
25
|
+ * If multiple dial-in numbers are available
|
|
26
|
+ */
|
|
27
|
+ _hasMultipleNumbers: boolean;
|
|
28
|
+
|
23
|
29
|
/**
|
24
|
30
|
* The phone number to dial to begin the process of dialing into a
|
25
|
31
|
* conference.
|
|
@@ -41,23 +47,24 @@ type Props = {
|
41
|
47
|
* @returns {null|ReactElement}
|
42
|
48
|
*/
|
43
|
49
|
function DialInSection({
|
44
|
|
- _dialIn,
|
|
50
|
+ _conferenceID,
|
45
|
51
|
_dialInfoPageUrl,
|
|
52
|
+ _hasMultipleNumbers,
|
46
|
53
|
phoneNumber,
|
47
|
54
|
t
|
48
|
55
|
}: Props) {
|
49
|
56
|
return (
|
50
|
57
|
<div className = 'invite-more-dialog dial-in-display'>
|
51
|
58
|
<DialInNumber
|
52
|
|
- conferenceID = { _dialIn.conferenceID }
|
|
59
|
+ conferenceID = { _conferenceID }
|
53
|
60
|
phoneNumber = { phoneNumber } />
|
54
|
|
- <a
|
|
61
|
+ {_hasMultipleNumbers ? <a
|
55
|
62
|
className = 'more-numbers'
|
56
|
63
|
href = { _dialInfoPageUrl }
|
57
|
64
|
rel = 'noopener noreferrer'
|
58
|
65
|
target = '_blank'>
|
59
|
66
|
{ t('info.moreNumbers') }
|
60
|
|
- </a>
|
|
67
|
+ </a> : null}
|
61
|
68
|
</div>
|
62
|
69
|
);
|
63
|
70
|
}
|
|
@@ -72,9 +79,12 @@ function DialInSection({
|
72
|
79
|
* @returns {Props}
|
73
|
80
|
*/
|
74
|
81
|
function _mapStateToProps(state) {
|
|
82
|
+ const dialIn = state['features/invite'];
|
|
83
|
+
|
75
|
84
|
return {
|
76
|
|
- _dialIn: state['features/invite'],
|
77
|
|
- _dialInfoPageUrl: getDialInfoPageURL(state)
|
|
85
|
+ _conferenceID: dialIn.conferenceID,
|
|
86
|
+ _dialInfoPageUrl: getDialInfoPageURL(state),
|
|
87
|
+ _hasMultipleNumbers: hasMultipleNumbers(dialIn.numbers)
|
78
|
88
|
};
|
79
|
89
|
}
|
80
|
90
|
|