Przeglądaj źródła

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

master
Leonard Kim 6 lat temu
rodzic
commit
5598b8443a

+ 22
- 9
react/features/recording/components/LiveStream/native/StreamKeyForm.js Wyświetl plik

52
                     placeholderTextColor = { PLACEHOLDER_COLOR }
52
                     placeholderTextColor = { PLACEHOLDER_COLOR }
53
                     style = { styles.streamKeyInput }
53
                     style = { styles.streamKeyInput }
54
                     value = { this.props.value } />
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
             </View>
77
             </View>
65
         );
78
         );
66
     }
79
     }

+ 21
- 1
react/features/recording/components/LiveStream/native/styles.js Wyświetl plik

48
         padding: BoxModel.padding
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
      * Explaining text on the top of the sign in form.
66
      * Explaining text on the top of the sign in form.
53
      */
67
      */
133
 
147
 
134
     text: {
148
     text: {
135
         color: ColorPalette.white
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 Wyświetl plik

53
                     type = 'text'
53
                     type = 'text'
54
                     value = { this.props.value } />
54
                     value = { this.props.value } />
55
                 <div className = 'form-footer'>
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
                     { this.helpURL
63
                     { this.helpURL
63
                         ? <a
64
                         ? <a

Ładowanie…
Anuluj
Zapisz