Explorar el Código

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

master
Saúl Ibarra Corretgé hace 4 años
padre
commit
78d4af6bf2

+ 7
- 3
react/features/conference/components/ConferenceTimer.js Ver fichero

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

+ 4
- 5
react/features/conference/components/native/ConferenceTimerDisplay.js Ver fichero

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

+ 21
- 12
react/features/conference/components/native/NavigationBar.js Ver fichero

@@ -57,18 +57,27 @@ const NavigationBar = (props: Props) => {
57 57
                 styles = { styles.navBarButton } />
58 58
             <View
59 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 81
                 <Labels />
73 82
             </View>
74 83
         </View>

+ 27
- 5
react/features/conference/components/native/styles.js Ver fichero

@@ -103,18 +103,35 @@ export default {
103 103
 
104 104
     roomTimer: {
105 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 119
     roomName: {
111 120
         color: ColorPalette.white,
112
-        fontSize: 17,
121
+        fontSize: 14,
113 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 135
         alignItems: 'center',
119 136
         left: 0,
120 137
         paddingHorizontal: 48,
@@ -122,6 +139,11 @@ export default {
122 139
         right: 0
123 140
     },
124 141
 
142
+    roomNameWrapper: {
143
+        alignItems: 'center',
144
+        flexDirection: 'row'
145
+    },
146
+
125 147
     /**
126 148
      * The style of the {@link View} which expands over the whole
127 149
      * {@link Conference} area and splits it between the {@link Filmstrip} and

+ 4
- 1
react/features/conference/components/web/ConferenceTimerDisplay.js Ver fichero

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

Loading…
Cancelar
Guardar