Browse Source

feat(recording): fix ui for live stream screen on mobile (#13123)

* feat(recording): fix ui for live stream screen on mobile
factor2
Calinteodor 2 years ago
parent
commit
fde975ba62
No account linked to committer's email address

+ 11
- 14
react/features/recording/components/LiveStream/native/StreamKeyForm.js View File

@@ -59,25 +59,22 @@ class StreamKeyForm extends AbstractStreamKeyForm<Props> {
59 59
             <>
60 60
                 <View style = { styles.formWrapper }>
61 61
                     <Input
62
-                        customStyles = {{ input: styles.streamKeyInput }}
62
+                        customStyles = {{
63
+                            input: styles.streamKeyInput,
64
+                            container: styles.streamKeyContainer }}
63 65
                         onChange = { this._onInputChange }
64 66
                         placeholder = { t('liveStreaming.enterStreamKey') }
65 67
                         value = { this.props.value } />
66
-                    <View style = { styles.formValidation }>
68
+                    <View style = { styles.formValidationItem }>
67 69
                         {
68
-                            this.state.showValidationError
69
-                                ? <View style = { styles.formValidationItem }>
70
-                                    <Text
71
-                                        style = { [
72
-                                            _dialogStyles.text,
73
-                                            styles.warningText
74
-                                        ] }>
75
-                                        { t('liveStreaming.invalidStreamKey') }
76
-                                    </Text>
77
-                                </View>
78
-                                : null
70
+                            this.state.showValidationError && <Text
71
+                                style = { [
72
+                                    _dialogStyles.text,
73
+                                    styles.warningText
74
+                                ] }>
75
+                                { t('liveStreaming.invalidStreamKey') }
76
+                            </Text>
79 77
                         }
80
-
81 78
                     </View>
82 79
                 </View>
83 80
                 <View style = { styles.formButtonsWrapper }>

+ 16
- 19
react/features/recording/components/LiveStream/native/styles.js View File

@@ -1,6 +1,6 @@
1 1
 // @flow
2 2
 
3
-import { BoxModel, createStyleSheet } from '../../../../base/styles';
3
+import { createStyleSheet } from '../../../../base/styles';
4 4
 import BaseTheme from '../../../../base/ui/components/BaseTheme.native';
5 5
 
6 6
 /**
@@ -24,27 +24,20 @@ export default createStyleSheet({
24 24
     formWrapper: {
25 25
         alignItems: 'stretch',
26 26
         flexDirection: 'column',
27
-        padding: BoxModel.padding
28
-    },
29
-
30
-    /**
31
-     * Wrapper for the last element in the form.
32
-     */
33
-    formValidation: {
34
-        flexDirection: 'row',
35
-        height: BaseTheme.spacing[4]
27
+        paddingHorizontal: BaseTheme.spacing[2]
36 28
     },
37 29
 
38 30
     formValidationItem: {
39 31
         alignSelf: 'flex-start',
40
-        marginVertical: BaseTheme.spacing[1]
32
+        flexDirection: 'row',
33
+        height: BaseTheme.spacing[4],
34
+        marginTop: BaseTheme.spacing[2]
41 35
     },
42 36
 
43 37
     formButtonsWrapper: {
44 38
         alignSelf: 'center',
45 39
         display: 'flex',
46
-        maxWidth: 200,
47
-        width: 'auto'
40
+        maxWidth: 200
48 41
     },
49 42
 
50 43
     buttonLabelStyle: {
@@ -55,7 +48,7 @@ export default createStyleSheet({
55 48
      * Explaining text on the top of the sign in form.
56 49
      */
57 50
     helpText: {
58
-        marginBottom: BoxModel.margin
51
+        marginBottom: BaseTheme.spacing[2]
59 52
     },
60 53
 
61 54
     /**
@@ -68,7 +61,7 @@ export default createStyleSheet({
68 61
         flexDirection: 'column',
69 62
         justifyContent: 'center',
70 63
         paddingHorizontal: BaseTheme.spacing[2],
71
-        paddingTop: BaseTheme.spacing[3]
64
+        paddingVertical: BaseTheme.spacing[3]
72 65
     },
73 66
 
74 67
     /**
@@ -87,6 +80,10 @@ export default createStyleSheet({
87 80
         textAlign: 'left'
88 81
     },
89 82
 
83
+    streamKeyContainer: {
84
+        marginTop: BaseTheme.spacing[3]
85
+    },
86
+
90 87
     /**
91 88
      * Custom component to pick a broadcast from the list fetched from Google.
92 89
      */
@@ -94,7 +91,7 @@ export default createStyleSheet({
94 91
         alignSelf: 'stretch',
95 92
         flex: 1,
96 93
         height: 40,
97
-        marginHorizontal: 4,
94
+        marginHorizontal: BaseTheme.spacing[1],
98 95
         width: 300
99 96
     },
100 97
 
@@ -102,14 +99,14 @@ export default createStyleSheet({
102 99
      * CTA (label) of the picker.
103 100
      */
104 101
     streamKeyPickerCta: {
105
-        marginBottom: 8
102
+        marginBottom: BaseTheme.spacing[2]
106 103
     },
107 104
 
108 105
     /**
109 106
      * Style of a single item in the list.
110 107
      */
111 108
     streamKeyPickerItem: {
112
-        padding: 4
109
+        padding: BaseTheme.spacing[1]
113 110
     },
114 111
 
115 112
     /**
@@ -124,7 +121,7 @@ export default createStyleSheet({
124 121
      */
125 122
     streamKeyPickerWrapper: {
126 123
         borderColor: BaseTheme.palette.ui07,
127
-        borderRadius: 3,
124
+        borderRadius: BaseTheme.shape.borderRadius,
128 125
         borderWidth: 1,
129 126
         flexDirection: 'column'
130 127
     },

Loading…
Cancel
Save