Browse Source

feat(rn,conference) new UI for conference name duration

master
Saúl Ibarra Corretgé 4 years ago
parent
commit
78d4af6bf2

+ 7
- 3
react/features/conference/components/ConferenceTimer.js View File

17
      */
17
      */
18
     _startTimestamp: ?number,
18
     _startTimestamp: ?number,
19
 
19
 
20
+    /**
21
+     * Style to be applied to the rendered text.
22
+     */
23
+    textStyle: ?Object,
24
+
20
     /**
25
     /**
21
      * The redux {@code dispatch} function.
26
      * The redux {@code dispatch} function.
22
      */
27
      */
89
      */
94
      */
90
     render() {
95
     render() {
91
         const { timerValue } = this.state;
96
         const { timerValue } = this.state;
92
-        const { _startTimestamp } = this.props;
97
+        const { _startTimestamp, textStyle } = this.props;
93
 
98
 
94
         if (!_startTimestamp) {
99
         if (!_startTimestamp) {
95
             return null;
100
             return null;
96
         }
101
         }
97
 
102
 
98
-        return renderConferenceTimer(timerValue);
103
+        return renderConferenceTimer(timerValue, textStyle);
99
     }
104
     }
100
 
105
 
101
     /**
106
     /**
107
      * @returns {void}
112
      * @returns {void}
108
      */
113
      */
109
     _setStateFromUTC(refValueUTC, currentValueUTC) {
114
     _setStateFromUTC(refValueUTC, currentValueUTC) {
110
-
111
         if (!refValueUTC || !currentValueUTC) {
115
         if (!refValueUTC || !currentValueUTC) {
112
             return;
116
             return;
113
         }
117
         }

+ 4
- 5
react/features/conference/components/native/ConferenceTimerDisplay.js View File

3
 import React from 'react';
3
 import React from 'react';
4
 import { Text } from 'react-native';
4
 import { Text } from 'react-native';
5
 
5
 
6
-import styles from './styles';
7
-
8
 /**
6
 /**
9
  * Returns native element to be rendered.
7
  * Returns native element to be rendered.
10
  *
8
  *
11
  * @param {string} timerValue - String to display as time.
9
  * @param {string} timerValue - String to display as time.
10
+ * @param {Object} textStyle - Style to be applied to the text.
12
  *
11
  *
13
  * @returns {ReactElement}
12
  * @returns {ReactElement}
14
  */
13
  */
15
-export default function renderConferenceTimer(timerValue: string) {
14
+export default function renderConferenceTimer(timerValue: string, textStyle: Object) {
16
     return (
15
     return (
17
         <Text
16
         <Text
18
-            numberOfLines = { 4 }
19
-            style = { styles.roomTimer }>
17
+            numberOfLines = { 1 }
18
+            style = { textStyle }>
20
             { timerValue }
19
             { timerValue }
21
         </Text>
20
         </Text>
22
     );
21
     );

+ 21
- 12
react/features/conference/components/native/NavigationBar.js View File

57
                 styles = { styles.navBarButton } />
57
                 styles = { styles.navBarButton } />
58
             <View
58
             <View
59
                 pointerEvents = 'box-none'
59
                 pointerEvents = 'box-none'
60
-                style = { styles.roomNameWrapper }>
61
-                {
62
-                    props._meetingNameEnabled
63
-                    && <Text
64
-                        numberOfLines = { 1 }
65
-                        style = { styles.roomName }>
66
-                        { props._meetingName }
67
-                    </Text>
68
-                }
69
-                {
70
-                    props._conferenceTimerEnabled && <ConferenceTimer />
71
-                }
60
+                style = { styles.roomNameContainer }>
61
+                <View
62
+                    pointerEvents = 'box-none'
63
+                    style = { styles.roomNameWrapper }>
64
+                    {
65
+                        props._meetingNameEnabled
66
+                        && <View style = { styles.roomNameView }>
67
+                            <Text
68
+                                numberOfLines = { 1 }
69
+                                style = { styles.roomName }>
70
+                                { props._meetingName }
71
+                            </Text>
72
+                        </View>
73
+                    }
74
+                    {
75
+                        props._conferenceTimerEnabled
76
+                            && <View style = { styles.roomTimerView }>
77
+                                <ConferenceTimer textStyle = { styles.roomTimer } />
78
+                            </View>
79
+                    }
80
+                </View>
72
                 <Labels />
81
                 <Labels />
73
             </View>
82
             </View>
74
         </View>
83
         </View>

+ 27
- 5
react/features/conference/components/native/styles.js View File

103
 
103
 
104
     roomTimer: {
104
     roomTimer: {
105
         color: ColorPalette.white,
105
         color: ColorPalette.white,
106
-        fontSize: 15,
107
-        opacity: 0.6
106
+        fontSize: 12,
107
+        fontWeight: '400'
108
+    },
109
+
110
+    roomTimerView: {
111
+        backgroundColor: 'rgba(0,0,0,0.8)',
112
+        borderBottomRightRadius: 3,
113
+        borderTopRightRadius: 3,
114
+        height: 28,
115
+        justifyContent: 'center',
116
+        paddingHorizontal: 10
108
     },
117
     },
109
 
118
 
110
     roomName: {
119
     roomName: {
111
         color: ColorPalette.white,
120
         color: ColorPalette.white,
112
-        fontSize: 17,
121
+        fontSize: 14,
113
         fontWeight: '400'
122
         fontWeight: '400'
114
     },
123
     },
115
 
124
 
116
-    roomNameWrapper: {
117
-        flexDirection: 'column',
125
+    roomNameView: {
126
+        backgroundColor: 'rgba(0,0,0,0.6)',
127
+        borderBottomLeftRadius: 3,
128
+        borderTopLeftRadius: 3,
129
+        height: 28,
130
+        justifyContent: 'center',
131
+        paddingHorizontal: 10
132
+    },
133
+
134
+    roomNameContainer: {
118
         alignItems: 'center',
135
         alignItems: 'center',
119
         left: 0,
136
         left: 0,
120
         paddingHorizontal: 48,
137
         paddingHorizontal: 48,
122
         right: 0
139
         right: 0
123
     },
140
     },
124
 
141
 
142
+    roomNameWrapper: {
143
+        alignItems: 'center',
144
+        flexDirection: 'row'
145
+    },
146
+
125
     /**
147
     /**
126
      * The style of the {@link View} which expands over the whole
148
      * The style of the {@link View} which expands over the whole
127
      * {@link Conference} area and splits it between the {@link Filmstrip} and
149
      * {@link Conference} area and splits it between the {@link Filmstrip} and

+ 4
- 1
react/features/conference/components/web/ConferenceTimerDisplay.js View File

1
 // @flow
1
 // @flow
2
 
2
 
3
+/* eslint-disable no-unused-vars */
4
+
3
 import React from 'react';
5
 import React from 'react';
4
 
6
 
5
 /**
7
 /**
6
  * Returns web element to be rendered.
8
  * Returns web element to be rendered.
7
  *
9
  *
8
  * @param {string} timerValue - String to display as time.
10
  * @param {string} timerValue - String to display as time.
11
+ * @param {Object} textStyle - Unused on web.
9
  *
12
  *
10
  * @returns {ReactElement}
13
  * @returns {ReactElement}
11
  */
14
  */
12
-export default function renderConferenceTimer(timerValue: string) {
15
+export default function renderConferenceTimer(timerValue: string, textStyle: Object) {
13
     return (
16
     return (
14
         <span className = 'subject-conference-timer' >{ timerValue }</span>
17
         <span className = 'subject-conference-timer' >{ timerValue }</span>
15
     );
18
     );

Loading…
Cancel
Save