Explorar el Código

feat(prejoin) add room name to premeeting screen (#12049)

factor2
Avram Tudor hace 3 años
padre
commit
f07bd4a0d6
No account linked to committer's email address

+ 1
- 1
css/premeeting/_premeeting-screens.scss Ver fichero

@@ -101,7 +101,7 @@
101 101
                 font-weight: 600;
102 102
                 letter-spacing: -0.015;
103 103
                 line-height: 36px;
104
-                margin-bottom: 32px;
104
+                margin-bottom: 16px;
105 105
                 text-align: center;
106 106
             }
107 107
 

+ 43
- 2
react/features/base/premeeting/components/web/PreMeetingScreen.js Ver fichero

@@ -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));

+ 0
- 7
react/features/prejoin/components/Prejoin.web.js Ver fichero

@@ -5,7 +5,6 @@ import React, { Component } from 'react';
5 5
 
6 6
 import { LoginDialog, WaitForOwnerDialog } from '../../authentication/components';
7 7
 import { Avatar } from '../../base/avatar';
8
-import { getRoomName } from '../../base/conference';
9 8
 import { isNameReadOnly } from '../../base/config';
10 9
 import { isDialogOpen } from '../../base/dialog/functions';
11 10
 import { translate } from '../../base/i18n';
@@ -91,11 +90,6 @@ type Props = {
91 90
      */
92 91
     readOnlyName: boolean,
93 92
 
94
-    /**
95
-     * The name of the meeting that is about to be joined.
96
-     */
97
-    roomName: string,
98
-
99 93
     /**
100 94
      * Sets visibility of the 'JoinByPhoneDialog'.
101 95
      */
@@ -474,7 +468,6 @@ function mapStateToProps(state): Object {
474 468
         participantId,
475 469
         prejoinConfig: state['features/base/config'].prejoinConfig,
476 470
         readOnlyName: isNameReadOnly(state),
477
-        roomName: getRoomName(state),
478 471
         showCameraPreview: !isVideoMutedByUser(state),
479 472
         showDialog: isJoinByPhoneDialogVisible(state),
480 473
         showErrorOnJoin,

Loading…
Cancelar
Guardar