|
|
@@ -1,12 +1,15 @@
|
|
1
|
1
|
// @flow
|
|
2
|
2
|
|
|
|
3
|
+import { withStyles } from '@material-ui/styles';
|
|
3
|
4
|
import React, { PureComponent } from 'react';
|
|
4
|
5
|
|
|
5
|
6
|
import { connect } from '../../../../base/redux';
|
|
6
|
7
|
import DeviceStatus from '../../../../prejoin/components/preview/DeviceStatus';
|
|
7
|
8
|
import { Toolbox } from '../../../../toolbox/components/web';
|
|
|
9
|
+import { getRoomName } from '../../../conference';
|
|
8
|
10
|
import { PREMEETING_BUTTONS, THIRD_PARTY_PREJOIN_BUTTONS } from '../../../config/constants';
|
|
9
|
11
|
import { getToolbarButtons, isToolbarButtonEnabled } from '../../../config/functions.web';
|
|
|
12
|
+import { withPixelLineHeight } from '../../../styles/functions.web';
|
|
10
|
13
|
|
|
11
|
14
|
import ConnectionStatus from './ConnectionStatus';
|
|
12
|
15
|
import Preview from './Preview';
|
|
|
@@ -23,11 +26,21 @@ type Props = {
|
|
23
|
26
|
*/
|
|
24
|
27
|
_premeetingBackground: string,
|
|
25
|
28
|
|
|
|
29
|
+ /**
|
|
|
30
|
+ * The name of the meeting that is about to be joined.
|
|
|
31
|
+ */
|
|
|
32
|
+ _roomName: string,
|
|
|
33
|
+
|
|
26
|
34
|
/**
|
|
27
|
35
|
* Children component(s) to be rendered on the screen.
|
|
28
|
36
|
*/
|
|
29
|
37
|
children?: React$Node,
|
|
30
|
38
|
|
|
|
39
|
+ /**
|
|
|
40
|
+ * Classes prop injected by withStyles.
|
|
|
41
|
+ */
|
|
|
42
|
+ classes: Object,
|
|
|
43
|
+
|
|
31
|
44
|
/**
|
|
32
|
45
|
* Additional CSS class names to set on the icon container.
|
|
33
|
46
|
*/
|
|
|
@@ -74,6 +87,28 @@ type Props = {
|
|
74
|
87
|
videoTrack?: Object
|
|
75
|
88
|
}
|
|
76
|
89
|
|
|
|
90
|
+/**
|
|
|
91
|
+ * Creates the styles for the component.
|
|
|
92
|
+ *
|
|
|
93
|
+ * @param {Object} theme - The current UI theme.
|
|
|
94
|
+ *
|
|
|
95
|
+ * @returns {Object}
|
|
|
96
|
+ */
|
|
|
97
|
+const styles = theme => {
|
|
|
98
|
+ return {
|
|
|
99
|
+ subtitle: {
|
|
|
100
|
+ ...withPixelLineHeight(theme.typography.heading5),
|
|
|
101
|
+ color: theme.palette.text01,
|
|
|
102
|
+ marginBottom: theme.spacing(4),
|
|
|
103
|
+ overflow: 'hidden',
|
|
|
104
|
+ textAlign: 'center',
|
|
|
105
|
+ textOverflow: 'ellipsis',
|
|
|
106
|
+ whiteSpace: 'nowrap',
|
|
|
107
|
+ width: '100%'
|
|
|
108
|
+ }
|
|
|
109
|
+ };
|
|
|
110
|
+};
|
|
|
111
|
+
|
|
77
|
112
|
/**
|
|
78
|
113
|
* Implements a pre-meeting screen that can be used at various pre-meeting phases, for example
|
|
79
|
114
|
* on the prejoin screen (pre-connection) or lobby (post-connection).
|
|
|
@@ -98,7 +133,9 @@ class PreMeetingScreen extends PureComponent<Props> {
|
|
98
|
133
|
const {
|
|
99
|
134
|
_buttons,
|
|
100
|
135
|
_premeetingBackground,
|
|
|
136
|
+ _roomName,
|
|
101
|
137
|
children,
|
|
|
138
|
+ classes,
|
|
102
|
139
|
className,
|
|
103
|
140
|
showDeviceStatus,
|
|
104
|
141
|
skipPrejoinButton,
|
|
|
@@ -124,6 +161,9 @@ class PreMeetingScreen extends PureComponent<Props> {
|
|
124
|
161
|
<h1 className = 'title'>
|
|
125
|
162
|
{ title }
|
|
126
|
163
|
</h1>
|
|
|
164
|
+ <span className = { classes.subtitle }>
|
|
|
165
|
+ {_roomName}
|
|
|
166
|
+ </span>
|
|
127
|
167
|
{ children }
|
|
128
|
168
|
{ _buttons.length && <Toolbox toolbarButtons = { _buttons } /> }
|
|
129
|
169
|
{ skipPrejoinButton }
|
|
|
@@ -165,8 +205,9 @@ function mapStateToProps(state, ownProps): Object {
|
|
165
|
205
|
_buttons: hiddenPremeetingButtons
|
|
166
|
206
|
? premeetingButtons
|
|
167
|
207
|
: premeetingButtons.filter(b => isToolbarButtonEnabled(b, toolbarButtons)),
|
|
168
|
|
- _premeetingBackground: premeetingBackground
|
|
|
208
|
+ _premeetingBackground: premeetingBackground,
|
|
|
209
|
+ _roomName: getRoomName(state)
|
|
169
|
210
|
};
|
|
170
|
211
|
}
|
|
171
|
212
|
|
|
172
|
|
-export default connect(mapStateToProps)(PreMeetingScreen);
|
|
|
213
|
+export default connect(mapStateToProps)(withStyles(styles)(PreMeetingScreen));
|