Quellcode durchsuchen

fix(live-streaming): show stream key validation in mobile

master
Leonard Kim vor 6 Jahren
Ursprung
Commit
5598b8443a

+ 22
- 9
react/features/recording/components/LiveStream/native/StreamKeyForm.js Datei anzeigen

@@ -52,15 +52,28 @@ class StreamKeyForm extends AbstractStreamKeyForm {
52 52
                     placeholderTextColor = { PLACEHOLDER_COLOR }
53 53
                     style = { styles.streamKeyInput }
54 54
                     value = { this.props.value } />
55
-                <TouchableOpacity
56
-                    onPress = { this._onOpenHelp }
57
-                    style = { styles.streamKeyHelp } >
58
-                    <Text style = { styles.text }>
59
-                        {
60
-                            t('liveStreaming.streamIdHelp')
61
-                        }
62
-                    </Text>
63
-                </TouchableOpacity>
55
+                <View style = { styles.formFooter }>
56
+                    {
57
+                        this.state.showValidationError
58
+                            ? <View style = { styles.formFooterItem }>
59
+                                <Text style = { styles.warningText }>
60
+                                    { t('liveStreaming.invalidStreamKey') }
61
+                                </Text>
62
+                            </View>
63
+                            : null
64
+                    }
65
+                    <View style = { styles.formFooterItem }>
66
+                        <TouchableOpacity
67
+                            onPress = { this._onOpenHelp }
68
+                            style = { styles.streamKeyHelp } >
69
+                            <Text style = { styles.text }>
70
+                                {
71
+                                    t('liveStreaming.streamIdHelp')
72
+                                }
73
+                            </Text>
74
+                        </TouchableOpacity>
75
+                    </View>
76
+                </View>
64 77
             </View>
65 78
         );
66 79
     }

+ 21
- 1
react/features/recording/components/LiveStream/native/styles.js Datei anzeigen

@@ -48,6 +48,20 @@ export default createStyleSheet({
48 48
         padding: BoxModel.padding
49 49
     },
50 50
 
51
+    /**
52
+     * Wrapper for the last element in the form.
53
+     */
54
+    formFooter: {
55
+        flexDirection: 'row'
56
+    },
57
+
58
+    /**
59
+     * Wrapper for individual children in the last element of the form.
60
+     */
61
+    formFooterItem: {
62
+        flex: 1
63
+    },
64
+
51 65
     /**
52 66
      * Explaining text on the top of the sign in form.
53 67
      */
@@ -133,6 +147,12 @@ export default createStyleSheet({
133 147
 
134 148
     text: {
135 149
         color: ColorPalette.white
136
-    }
150
+    },
137 151
 
152
+    /**
153
+     * A different colored text to indicate information needing attention.
154
+     */
155
+    warningText: {
156
+        color: ColorPalette.Y200
157
+    }
138 158
 });

+ 6
- 5
react/features/recording/components/LiveStream/web/StreamKeyForm.js Datei anzeigen

@@ -53,11 +53,12 @@ class StreamKeyForm extends AbstractStreamKeyForm {
53 53
                     type = 'text'
54 54
                     value = { this.props.value } />
55 55
                 <div className = 'form-footer'>
56
-                    { this.state.showValidationError
57
-                        ? <span className = 'validation-error'>
58
-                            { t('liveStreaming.invalidStreamKey') }
59
-                        </span>
60
-                        : null
56
+                    {
57
+                        this.state.showValidationError
58
+                            ? <span className = 'validation-error'>
59
+                                { t('liveStreaming.invalidStreamKey') }
60
+                            </span>
61
+                            : null
61 62
                     }
62 63
                     { this.helpURL
63 64
                         ? <a

Laden…
Abbrechen
Speichern