Przeglądaj źródła

fix(lobby/native) style updates and local video fix

master
Calin Chitu 3 lat temu
rodzic
commit
7ea78e9845

+ 18
- 30
react/features/lobby/components/native/LobbyScreen.js Wyświetl plik

@@ -9,8 +9,6 @@ import { LoadingIndicator } from '../../../base/react';
9 9
 import { connect } from '../../../base/redux';
10 10
 import { ASPECT_RATIO_NARROW } from '../../../base/responsive-ui';
11 11
 import BaseTheme from '../../../base/ui/components/BaseTheme';
12
-import InviteButton
13
-    from '../../../invite/components/add-people-dialog/native/InviteButton';
14 12
 import { LargeVideo } from '../../../large-video/components';
15 13
 import HeaderNavigationButton
16 14
     from '../../../mobile/navigation/components/HeaderNavigationButton';
@@ -64,31 +62,29 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
64 62
      */
65 63
     render() {
66 64
         const { _aspectRatio } = this.props;
67
-        let contentStyles;
68
-        let largeVideoContainerStyles;
65
+        let contentWrapperStyles;
69 66
         let contentContainerStyles;
67
+        let largeVideoContainerStyles;
70 68
 
71 69
         if (_aspectRatio === ASPECT_RATIO_NARROW) {
70
+            contentWrapperStyles = styles.contentWrapper;
72 71
             largeVideoContainerStyles = styles.largeVideoContainer;
73 72
             contentContainerStyles = styles.contentContainer;
74 73
         } else {
75
-            contentStyles = styles.contentWide;
74
+            contentWrapperStyles = styles.contentWrapperWide;
76 75
             largeVideoContainerStyles = styles.largeVideoContainerWide;
77 76
             contentContainerStyles = styles.contentContainerWide;
78 77
         }
79 78
 
80 79
         return (
81 80
             <JitsiScreen
82
-                safeAreaInsets = { [ 'right' ] }
83
-                style = { styles.contentWrapper }>
84
-                <View style = { contentStyles }>
85
-                    <View style = { largeVideoContainerStyles }>
86
-                        <LargeVideo />
87
-                    </View>
88
-                    <View style = { contentContainerStyles }>
89
-                        { this._renderContent() }
90
-                        { this._renderToolbarButtons() }
91
-                    </View>
81
+                style = { contentWrapperStyles }>
82
+                <View style = { largeVideoContainerStyles }>
83
+                    <LargeVideo />
84
+                </View>
85
+                <View style = { contentContainerStyles }>
86
+                    { this._renderContent() }
87
+                    { this._renderToolbarButtons() }
92 88
                 </View>
93 89
             </JitsiScreen>
94 90
         );
@@ -137,7 +133,7 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
137 133
      */
138 134
     _renderJoining() {
139 135
         return (
140
-            <View style = { styles.formWrapper }>
136
+            <View>
141 137
                 <LoadingIndicator
142 138
                     color = { BaseTheme.palette.icon01 }
143 139
                     style = { styles.loadingIndicator } />
@@ -159,15 +155,11 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
159 155
         const { displayName } = this.state;
160 156
 
161 157
         return (
162
-            <View style = { styles.formWrapper }>
163
-                <Text style = { styles.fieldLabel }>
164
-                    { t('lobby.nameField') }
165
-                </Text>
166
-                <TextInput
167
-                    onChangeText = { this._onChangeDisplayName }
168
-                    style = { styles.field }
169
-                    value = { displayName } />
170
-            </View>
158
+            <TextInput
159
+                onChangeText = { this._onChangeDisplayName }
160
+                placeholder = { t('lobby.nameField') }
161
+                style = { styles.field }
162
+                value = { displayName } />
171 163
         );
172 164
     }
173 165
 
@@ -190,13 +182,11 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
190 182
 
191 183
         return (
192 184
             <View style = { styles.formWrapper }>
193
-                <Text style = { styles.fieldLabel }>
194
-                    { this.props.t('lobby.passwordField') }
195
-                </Text>
196 185
                 <TextInput
197 186
                     autoCapitalize = 'none'
198 187
                     autoCompleteType = 'off'
199 188
                     onChangeText = { this._onChangePassword }
189
+                    placeholder = { t('lobby.passwordField') }
200 190
                     secureTextEntry = { true }
201 191
                     style = { styles.field }
202 192
                     value = { this.state.password } />
@@ -263,8 +253,6 @@ class LobbyScreen extends AbstractLobbyScreen<Props> {
263 253
                     styles = { styles.buttonStylesBorderless } />
264 254
                 <VideoMuteButton
265 255
                     styles = { styles.buttonStylesBorderless } />
266
-                <InviteButton
267
-                    styles = { styles.buttonStylesBorderless } />
268 256
             </View>
269 257
         );
270 258
     }

+ 25
- 35
react/features/lobby/components/native/styles.js Wyświetl plik

@@ -15,12 +15,12 @@ export default {
15 15
 
16 16
     buttonStylesBorderless: {
17 17
         iconStyle: {
18
-            backgroundColor: BaseTheme.palette.action02Active,
18
+            backgroundColor: 'transparent',
19 19
             color: BaseTheme.palette.icon01,
20 20
             fontSize: 24
21 21
         },
22 22
         style: {
23
-            backgroundColor: BaseTheme.palette.action02Active,
23
+            backgroundColor: 'transparent',
24 24
             flexDirection: 'row',
25 25
             justifyContent: 'center',
26 26
             marginHorizontal: BaseTheme.spacing[3],
@@ -57,24 +57,21 @@ export default {
57 57
     },
58 58
 
59 59
     contentWrapper: {
60
-        backgroundColor: BaseTheme.palette.ui02,
61 60
         flex: 1
62 61
     },
63 62
 
64
-    contentWide: {
65
-        backgroundColor: BaseTheme.palette.ui02,
63
+    contentWrapperWide: {
66 64
         flex: 1,
67 65
         flexDirection: 'row'
68 66
     },
69 67
 
70 68
     largeVideoContainer: {
71
-        alignItems: 'center',
72
-        display: 'flex',
73
-        justifyContent: 'center',
74 69
         minHeight: '50%'
75 70
     },
76 71
 
77 72
     largeVideoContainerWide: {
73
+        position: 'absolute',
74
+        marginRight: 'auto',
78 75
         height: '100%',
79 76
         width: '50%'
80 77
     },
@@ -82,12 +79,17 @@ export default {
82 79
     contentContainer: {
83 80
         display: 'flex',
84 81
         alignItems: 'center',
85
-        justifyContent: 'center'
82
+        justifyContent: 'center',
83
+        minHeight: '50%'
86 84
     },
87 85
 
88 86
     contentContainerWide: {
89 87
         justifyContent: 'center',
90
-        marginHorizontal: BaseTheme.spacing[2],
88
+        marginHorizontal: BaseTheme.spacing[6],
89
+        marginVertical: BaseTheme.spacing[3],
90
+        height: '100%',
91
+        left: '50%',
92
+        position: 'absolute',
91 93
         width: '50%'
92 94
     },
93 95
 
@@ -96,21 +98,13 @@ export default {
96 98
         display: 'flex',
97 99
         flexDirection: 'row',
98 100
         justifyContent: 'center',
99
-        marginTop: BaseTheme.spacing[4]
101
+        marginTop: BaseTheme.spacing[3]
100 102
     },
101 103
 
102 104
     toolboxContainerWide: {
103 105
         flexDirection: 'row',
104 106
         justifyContent: 'center',
105
-        marginTop: BaseTheme.spacing[4]
106
-    },
107
-
108
-    dialogTitle: {
109
-        fontSize: 18,
110
-        fontWeight: 'bold',
111
-        margin: 'auto',
112
-        marginVertical: BaseTheme.spacing[3],
113
-        textAlign: 'center'
107
+        marginTop: BaseTheme.spacing[3]
114 108
     },
115 109
 
116 110
     displayNameText: {
@@ -128,14 +122,21 @@ export default {
128 122
         fontSize: 16
129 123
     },
130 124
 
125
+    formWrapper: {
126
+        alignSelf: 'stretch',
127
+        marginTop: 45
128
+    },
129
+
131 130
     field: {
131
+        alignSelf: 'stretch',
132 132
         backgroundColor: BaseTheme.palette.field02,
133 133
         borderColor: SECONDARY_COLOR,
134 134
         borderRadius: BaseTheme.shape.borderRadius,
135 135
         borderWidth: 2,
136 136
         height: BaseTheme.spacing[7],
137 137
         marginHorizontal: BaseTheme.spacing[3],
138
-        padding: BaseTheme.spacing[2]
138
+        padding: BaseTheme.spacing[2],
139
+        textAlign: 'center'
139 140
     },
140 141
 
141 142
     fieldError: {
@@ -147,28 +148,17 @@ export default {
147 148
     fieldLabel: {
148 149
         ...BaseTheme.typography.heading6,
149 150
         color: BaseTheme.palette.text01,
150
-        marginVertical: BaseTheme.spacing[4],
151 151
         textAlign: 'center'
152 152
     },
153 153
 
154
-    formWrapper: {
155
-        alignSelf: 'stretch'
156
-    },
157
-
158 154
     standardButtonWrapper: {
159 155
         alignSelf: 'stretch',
160
-        marginHorizontal: BaseTheme.spacing[3]
161
-    },
162
-
163
-    joiningContainer: {
164
-        alignItems: 'center',
165
-        display: 'flex',
166
-        justifyContent: 'center'
156
+        marginHorizontal: 12
167 157
     },
168 158
 
169 159
     joiningMessage: {
170 160
         color: BaseTheme.palette.text01,
171
-        marginBottom: BaseTheme.spacing[2],
161
+        marginHorizontal: BaseTheme.spacing[3],
172 162
         textAlign: 'center'
173 163
     },
174 164
 
@@ -179,7 +169,7 @@ export default {
179 169
     },
180 170
 
181 171
     loadingIndicator: {
182
-        marginVertical: BaseTheme.spacing[4]
172
+        marginBottom: BaseTheme.spacing[4]
183 173
     },
184 174
 
185 175
     participantBox: {

Ładowanie…
Anuluj
Zapisz