瀏覽代碼

[RN] Add color scheme support - Components

j8
Bettenbuk Zoltan 6 年之前
父節點
當前提交
e094b6516a
共有 31 個文件被更改,包括 556 次插入303 次删除
  1. 12
    2
      react/features/authentication/components/LoginDialog.native.js
  2. 30
    1
      react/features/base/color-scheme/defaultScheme.js
  3. 9
    3
      react/features/base/dialog/components/native/BaseDialog.js
  4. 9
    2
      react/features/base/dialog/components/native/BaseSubmitDialog.js
  5. 28
    2
      react/features/base/dialog/components/native/BottomSheet.js
  6. 14
    6
      react/features/base/dialog/components/native/ConfirmDialog.js
  7. 3
    1
      react/features/base/dialog/components/native/CustomDialog.js
  8. 4
    1
      react/features/base/dialog/components/native/CustomSubmitDialog.js
  9. 13
    5
      react/features/base/dialog/components/native/InputDialog.js
  10. 103
    96
      react/features/base/dialog/components/native/styles.js
  11. 15
    0
      react/features/base/dialog/functions.js
  12. 15
    5
      react/features/base/participants/components/ParticipantView.native.js
  13. 4
    26
      react/features/base/react/components/native/TintedView.js
  14. 5
    0
      react/features/base/react/components/native/styles.js
  15. 1
    0
      react/features/base/styles/components/styles/ColorPalette.js
  16. 13
    1
      react/features/filmstrip/components/native/Thumbnail.js
  17. 36
    13
      react/features/filmstrip/components/styles.js
  18. 20
    10
      react/features/large-video/components/LargeVideo.native.js
  19. 6
    3
      react/features/large-video/components/styles.js
  20. 4
    3
      react/features/recording/components/LiveStream/AbstractStreamKeyForm.js
  21. 14
    2
      react/features/recording/components/LiveStream/native/GoogleSigninForm.js
  22. 31
    7
      react/features/recording/components/LiveStream/native/StreamKeyForm.js
  23. 26
    5
      react/features/recording/components/LiveStream/native/StreamKeyPicker.js
  24. 3
    3
      react/features/recording/components/LiveStream/native/styles.js
  25. 1
    1
      react/features/recording/components/LiveStream/web/StreamKeyForm.js
  26. 18
    5
      react/features/recording/components/Recording/StartRecordingDialogContent.js
  27. 0
    5
      react/features/recording/components/Recording/styles.native.js
  28. 12
    3
      react/features/remote-video-menu/components/native/RemoteVideoMenu.js
  29. 26
    4
      react/features/toolbox/components/native/OverflowMenu.js
  30. 23
    14
      react/features/toolbox/components/native/Toolbox.js
  31. 58
    74
      react/features/toolbox/components/native/styles.js

+ 12
- 2
react/features/authentication/components/LoginDialog.native.js 查看文件

@@ -9,10 +9,12 @@ import {
9 9
     CustomSubmitDialog,
10 10
     FIELD_UNDERLINE,
11 11
     PLACEHOLDER_COLOR,
12
+    _abstractMapStateToProps,
12 13
     inputDialog as inputDialogStyle
13 14
 } from '../../base/dialog';
14 15
 import { translate } from '../../base/i18n';
15 16
 import { JitsiConnectionErrors } from '../../base/lib-jitsi-meet';
17
+import { StyleType } from '../../base/styles';
16 18
 
17 19
 import { authenticateAndUpgradeRole, cancelLogin } from '../actions';
18 20
 import styles from './styles';
@@ -38,6 +40,11 @@ type Props = {
38 40
      */
39 41
     _connecting: boolean,
40 42
 
43
+    /**
44
+     * The color-schemed stylesheet of the base/dialog feature.
45
+     */
46
+    _dialogStyles: StyleType,
47
+
41 48
     /**
42 49
      * The error which occurred during login/authentication.
43 50
      */
@@ -134,6 +141,7 @@ class LoginDialog extends Component<Props, State> {
134 141
     render() {
135 142
         const {
136 143
             _connecting: connecting,
144
+            _dialogStyles,
137 145
             _error: error,
138 146
             _progress: progress,
139 147
             t
@@ -186,7 +194,7 @@ class LoginDialog extends Component<Props, State> {
186 194
                         onChangeText = { this._onUsernameChange }
187 195
                         placeholder = { 'user@domain.com' }
188 196
                         placeholderTextColor = { PLACEHOLDER_COLOR }
189
-                        style = { inputDialogStyle.field }
197
+                        style = { _dialogStyles.field }
190 198
                         underlineColorAndroid = { FIELD_UNDERLINE }
191 199
                         value = { this.state.username } />
192 200
                     <TextInput
@@ -195,7 +203,7 @@ class LoginDialog extends Component<Props, State> {
195 203
                         placeholderTextColor = { PLACEHOLDER_COLOR }
196 204
                         secureTextEntry = { true }
197 205
                         style = { [
198
-                            inputDialogStyle.field,
206
+                            _dialogStyles.field,
199 207
                             inputDialogStyle.bottomField
200 208
                         ] }
201 209
                         underlineColorAndroid = { FIELD_UNDERLINE }
@@ -289,6 +297,7 @@ class LoginDialog extends Component<Props, State> {
289 297
  *     _conference: JitsiConference,
290 298
  *     _configHosts: Object,
291 299
  *     _connecting: boolean,
300
+ *     _dialogStyles: StyleType,
292 301
  *     _error: Object,
293 302
  *     _progress: number
294 303
  * }}
@@ -307,6 +316,7 @@ function _mapStateToProps(state) {
307 316
     } = state['features/base/connection'];
308 317
 
309 318
     return {
319
+        ..._abstractMapStateToProps(state),
310 320
         _conference: authRequired,
311 321
         _configHosts: configHosts,
312 322
         _connecting: Boolean(connecting) || Boolean(thenableWithCancel),

+ 30
- 1
react/features/base/color-scheme/defaultScheme.js 查看文件

@@ -1,6 +1,35 @@
1 1
 // @flow
2 2
 
3
+import { ColorPalette, getRGBAFormat } from '../styles';
4
+
3 5
 /**
4 6
  * The default color scheme of the application.
5 7
  */
6
-export default {};
8
+export default {
9
+    'BottomSheet': {
10
+        background: ColorPalette.blackBlue,
11
+        icon: ColorPalette.white,
12
+        label: ColorPalette.white
13
+    },
14
+    'Dialog': {
15
+        background: ColorPalette.blackBlue,
16
+        border: getRGBAFormat(ColorPalette.white, 0.2),
17
+        icon: ColorPalette.white,
18
+        text: ColorPalette.white
19
+    },
20
+    'LargeVideo': {
21
+        background: ColorPalette.black
22
+    },
23
+    'Thumbnail': {
24
+        activeParticipantHighlight: ColorPalette.blue,
25
+        activeParticipantTint: ColorPalette.black,
26
+        background: ColorPalette.black
27
+    },
28
+    'Toolbox': {
29
+        button: getRGBAFormat(ColorPalette.white, 0.7),
30
+        buttonToggled: getRGBAFormat(ColorPalette.buttonUnderlay, 0.7),
31
+        buttonToggledBorder:
32
+            getRGBAFormat(ColorPalette.buttonUnderlay, 0.7),
33
+        hangup: ColorPalette.red
34
+    }
35
+};

+ 9
- 3
react/features/base/dialog/components/native/BaseDialog.js 查看文件

@@ -8,6 +8,7 @@ import {
8 8
 } from 'react-native';
9 9
 
10 10
 import { Icon } from '../../../font-icons';
11
+import { StyleType } from '../../../styles';
11 12
 
12 13
 import AbstractDialog, {
13 14
     type Props as AbstractProps,
@@ -18,6 +19,11 @@ import { brandedDialog as styles } from './styles';
18 19
 export type Props = {
19 20
     ...AbstractProps,
20 21
 
22
+    /**
23
+     * The color-schemed stylesheet of the feature.
24
+     */
25
+    _dialogStyles: StyleType,
26
+
21 27
     t: Function
22 28
 }
23 29
 
@@ -43,7 +49,7 @@ class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
43 49
      * @returns {ReactElement}
44 50
      */
45 51
     render() {
46
-        const { style } = this.props;
52
+        const { _dialogStyles, style } = this.props;
47 53
 
48 54
         return (
49 55
             <View
@@ -55,7 +61,7 @@ class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
55 61
                 <View
56 62
                     pointerEvents = 'box-none'
57 63
                     style = { [
58
-                        styles.dialog,
64
+                        _dialogStyles.dialog,
59 65
                         this.props.style
60 66
                     ] }>
61 67
                     <TouchableOpacity
@@ -63,7 +69,7 @@ class BaseDialog<P: Props, S: State> extends AbstractDialog<P, S> {
63 69
                         style = { styles.closeWrapper }>
64 70
                         <Icon
65 71
                             name = 'close'
66
-                            style = { styles.closeStyle } />
72
+                            style = { _dialogStyles.closeStyle } />
67 73
                     </TouchableOpacity>
68 74
                     { this._renderContent() }
69 75
                 </View>

+ 9
- 2
react/features/base/dialog/components/native/BaseSubmitDialog.js 查看文件

@@ -3,6 +3,8 @@
3 3
 import React from 'react';
4 4
 import { View, Text, TouchableOpacity } from 'react-native';
5 5
 
6
+import { StyleType } from '../../../styles';
7
+
6 8
 import BaseDialog, { type Props as BaseProps } from './BaseDialog';
7 9
 import {
8 10
     brandedDialog
@@ -11,6 +13,11 @@ import {
11 13
 type Props = {
12 14
     ...BaseProps,
13 15
 
16
+    /**
17
+     * The color-schemed stylesheet of the feature.
18
+     */
19
+    _dialogStyles: StyleType,
20
+
14 21
     t: Function
15 22
 }
16 23
 
@@ -46,7 +53,7 @@ class BaseSubmitDialog<P: Props, S: *> extends BaseDialog<P, S> {
46 53
      * @inheritdoc
47 54
      */
48 55
     _renderContent() {
49
-        const { t } = this.props;
56
+        const { _dialogStyles, t } = this.props;
50 57
         const additionalButtons = this._renderAdditionalButtons();
51 58
 
52 59
         return (
@@ -65,7 +72,7 @@ class BaseSubmitDialog<P: Props, S: *> extends BaseDialog<P, S> {
65 72
                                 ? null : brandedDialog.buttonFarLeft,
66 73
                             brandedDialog.buttonFarRight
67 74
                         ] }>
68
-                        <Text style = { brandedDialog.text }>
75
+                        <Text style = { _dialogStyles.text }>
69 76
                             { t(this._getSubmitButtonKey()) }
70 77
                         </Text>
71 78
                     </TouchableOpacity>

+ 28
- 2
react/features/base/dialog/components/native/BottomSheet.js 查看文件

@@ -2,8 +2,11 @@
2 2
 
3 3
 import React, { Component, type Node } from 'react';
4 4
 import { TouchableWithoutFeedback, View } from 'react-native';
5
+import { connect } from 'react-redux';
5 6
 
7
+import { ColorSchemeRegistry } from '../../../color-scheme';
6 8
 import { Modal } from '../../../react';
9
+import { StyleType } from '../../../styles';
7 10
 
8 11
 import { bottomSheetStyles as styles } from './styles';
9 12
 
@@ -12,6 +15,11 @@ import { bottomSheetStyles as styles } from './styles';
12 15
  */
13 16
 type Props = {
14 17
 
18
+    /**
19
+     * The color-schemed stylesheet of the feature.
20
+     */
21
+    _styles: StyleType,
22
+
15 23
     /**
16 24
      * The children to be displayed within this component.
17 25
      */
@@ -28,7 +36,7 @@ type Props = {
28 36
  * A component emulating Android's BottomSheet. For all intents and purposes,
29 37
  * this component has been designed to work and behave as a {@code Dialog}.
30 38
  */
31
-export default class BottomSheet extends Component<Props> {
39
+class BottomSheet extends Component<Props> {
32 40
     /**
33 41
      * Initializes a new {@code BottomSheet} instance.
34 42
      *
@@ -47,6 +55,8 @@ export default class BottomSheet extends Component<Props> {
47 55
      * @returns {ReactElement}
48 56
      */
49 57
     render() {
58
+        const { _styles } = this.props;
59
+
50 60
         return [
51 61
             <View
52 62
                 key = 'overlay'
@@ -60,7 +70,7 @@ export default class BottomSheet extends Component<Props> {
60 70
                         onPress = { this._onCancel } >
61 71
                         <View style = { styles.backdrop } />
62 72
                     </TouchableWithoutFeedback>
63
-                    <View style = { styles.sheet }>
73
+                    <View style = { _styles.sheet }>
64 74
                         { this.props.children }
65 75
                     </View>
66 76
                 </View>
@@ -82,3 +92,19 @@ export default class BottomSheet extends Component<Props> {
82 92
         onCancel && onCancel();
83 93
     }
84 94
 }
95
+
96
+/**
97
+ * Maps part of the Redux state to the props of this component.
98
+ *
99
+ * @param {Object} state - The Redux state.
100
+ * @returns {{
101
+ *     _styles: StyleType
102
+ * }}
103
+ */
104
+function _mapStateToProps(state) {
105
+    return {
106
+        _styles: ColorSchemeRegistry.get(state, 'BottomSheet')
107
+    };
108
+}
109
+
110
+export default connect(_mapStateToProps)(BottomSheet);

+ 14
- 6
react/features/base/dialog/components/native/ConfirmDialog.js 查看文件

@@ -5,6 +5,9 @@ import { Text, TouchableOpacity } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7 7
 import { translate } from '../../../i18n';
8
+import { StyleType } from '../../../styles';
9
+
10
+import { _abstractMapStateToProps } from '../../functions';
8 11
 
9 12
 import { type Props as BaseProps } from './BaseDialog';
10 13
 import BaseSubmitDialog from './BaseSubmitDialog';
@@ -13,6 +16,11 @@ import { brandedDialog } from './styles';
13 16
 type Props = {
14 17
     ...BaseProps,
15 18
 
19
+    /**
20
+     * The color-schemed stylesheet of the feature.
21
+     */
22
+    _dialogStyles: StyleType,
23
+
16 24
     /**
17 25
      * Untranslated i18n key of the content to be displayed.
18 26
      *
@@ -49,7 +57,7 @@ class ConfirmDialog extends BaseSubmitDialog<Props, *> {
49 57
      * @inheritdoc
50 58
      */
51 59
     _renderAdditionalButtons() {
52
-        const { t } = this.props;
60
+        const { _dialogStyles, t } = this.props;
53 61
 
54 62
         return (
55 63
             <TouchableOpacity
@@ -57,9 +65,9 @@ class ConfirmDialog extends BaseSubmitDialog<Props, *> {
57 65
                 style = { [
58 66
                     brandedDialog.button,
59 67
                     brandedDialog.buttonFarLeft,
60
-                    brandedDialog.buttonSeparator
68
+                    _dialogStyles.buttonSeparator
61 69
                 ] }>
62
-                <Text style = { brandedDialog.text }>
70
+                <Text style = { _dialogStyles.text }>
63 71
                     { t('dialog.confirmNo') }
64 72
                 </Text>
65 73
             </TouchableOpacity>
@@ -72,14 +80,14 @@ class ConfirmDialog extends BaseSubmitDialog<Props, *> {
72 80
      * @inheritdoc
73 81
      */
74 82
     _renderSubmittable() {
75
-        const { contentKey, t } = this.props;
83
+        const { _dialogStyles, contentKey, t } = this.props;
76 84
         const content
77 85
             = typeof contentKey === 'string'
78 86
                 ? t(contentKey)
79 87
                 : this._renderHTML(t(contentKey.key, contentKey.params));
80 88
 
81 89
         return (
82
-            <Text style = { brandedDialog.text }>
90
+            <Text style = { _dialogStyles.text }>
83 91
                 { content }
84 92
             </Text>
85 93
         );
@@ -88,4 +96,4 @@ class ConfirmDialog extends BaseSubmitDialog<Props, *> {
88 96
     _renderHTML: string => Object | string
89 97
 }
90 98
 
91
-export default translate(connect()(ConfirmDialog));
99
+export default translate(connect(_abstractMapStateToProps)(ConfirmDialog));

+ 3
- 1
react/features/base/dialog/components/native/CustomDialog.js 查看文件

@@ -2,6 +2,8 @@
2 2
 
3 3
 import { connect } from 'react-redux';
4 4
 
5
+import { _abstractMapStateToProps } from '../../functions';
6
+
5 7
 import BaseDialog, { type Props } from './BaseDialog';
6 8
 
7 9
 /**
@@ -19,4 +21,4 @@ class CustomDialog extends BaseDialog<Props, *> {
19 21
     }
20 22
 }
21 23
 
22
-export default connect()(CustomDialog);
24
+export default connect(_abstractMapStateToProps)(CustomDialog);

+ 4
- 1
react/features/base/dialog/components/native/CustomSubmitDialog.js 查看文件

@@ -4,6 +4,8 @@ import { connect } from 'react-redux';
4 4
 
5 5
 import { translate } from '../../../i18n';
6 6
 
7
+import { _abstractMapStateToProps } from '../../functions';
8
+
7 9
 import { type Props as BaseProps } from './BaseDialog';
8 10
 import BaseSubmitDialog from './BaseSubmitDialog';
9 11
 
@@ -27,4 +29,5 @@ class CustomSubmitDialog extends BaseSubmitDialog<Props, *> {
27 29
     }
28 30
 }
29 31
 
30
-export default translate(connect()(CustomSubmitDialog));
32
+export default translate(
33
+    connect(_abstractMapStateToProps)(CustomSubmitDialog));

+ 13
- 5
react/features/base/dialog/components/native/InputDialog.js 查看文件

@@ -5,6 +5,9 @@ import { View, Text, TextInput, TouchableOpacity } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7 7
 import { translate } from '../../../i18n';
8
+import { StyleType } from '../../../styles';
9
+
10
+import { _abstractMapStateToProps } from '../../functions';
8 11
 
9 12
 import { type State as AbstractState } from '../AbstractDialog';
10 13
 
@@ -18,6 +21,11 @@ import {
18 21
 type Props = {
19 22
     ...BaseProps,
20 23
 
24
+    /**
25
+     * The color-schemed stylesheet of the feature.
26
+     */
27
+    _dialogStyles: StyleType,
28
+
21 29
     /**
22 30
      * The untranslated i18n key for the field label on the dialog.
23 31
      */
@@ -63,7 +71,7 @@ class InputDialog extends BaseDialog<Props, State> {
63 71
      * @inheritdoc
64 72
      */
65 73
     _renderContent() {
66
-        const { okDisabled, t } = this.props;
74
+        const { _dialogStyles, okDisabled, t } = this.props;
67 75
 
68 76
         return (
69 77
             <View>
@@ -72,12 +80,12 @@ class InputDialog extends BaseDialog<Props, State> {
72 80
                         brandedDialog.mainWrapper,
73 81
                         styles.fieldWrapper
74 82
                     ] }>
75
-                    <Text style = { styles.fieldLabel }>
83
+                    <Text style = { _dialogStyles.fieldLabel }>
76 84
                         { t(this.props.contentKey) }
77 85
                     </Text>
78 86
                     <TextInput
79 87
                         onChangeText = { this._onChangeText }
80
-                        style = { styles.field }
88
+                        style = { _dialogStyles.field }
81 89
                         underlineColorAndroid = { FIELD_UNDERLINE }
82 90
                         value = { this.state.fieldValue }
83 91
                         { ...this.props.textInputProps } />
@@ -91,7 +99,7 @@ class InputDialog extends BaseDialog<Props, State> {
91 99
                             brandedDialog.buttonFarLeft,
92 100
                             brandedDialog.buttonFarRight
93 101
                         ] }>
94
-                        <Text style = { brandedDialog.text }>
102
+                        <Text style = { _dialogStyles.text }>
95 103
                             { t('dialog.Ok') }
96 104
                         </Text>
97 105
                     </TouchableOpacity>
@@ -130,4 +138,4 @@ class InputDialog extends BaseDialog<Props, State> {
130 138
     }
131 139
 }
132 140
 
133
-export default translate(connect()(InputDialog));
141
+export default translate(connect(_abstractMapStateToProps)(InputDialog));

+ 103
- 96
react/features/base/dialog/components/native/styles.js 查看文件

@@ -2,12 +2,12 @@
2 2
 
3 3
 import { StyleSheet } from 'react-native';
4 4
 
5
+import { ColorSchemeRegistry, schemeColor } from '../../../color-scheme';
5 6
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../styles';
6 7
 
7 8
 import { PREFERRED_DIALOG_SIZE } from '../../constants';
8 9
 
9 10
 const BORDER_RADIUS = 5;
10
-const DIALOG_BORDER_COLOR = 'rgba(255, 255, 255, 0.2)';
11 11
 
12 12
 export const FIELD_UNDERLINE = ColorPalette.transparent;
13 13
 
@@ -22,47 +22,6 @@ export const MD_ITEM_MARGIN_PADDING = 16;
22 22
 
23 23
 export const PLACEHOLDER_COLOR = ColorPalette.lightGrey;
24 24
 
25
-/**
26
- * Default styles for the items of a {@code BottomSheet}-based menu.
27
- *
28
- * These have been implemented as per the Material Design guidelines:
29
- * {@link https://material.io/guidelines/components/bottom-sheets.html}.
30
- */
31
-const bottomSheetItemStyles = createStyleSheet({
32
-    /**
33
-     * Container style for a generic item rendered in the menu.
34
-     */
35
-    style: {
36
-        alignItems: 'center',
37
-        flexDirection: 'row',
38
-        height: MD_ITEM_HEIGHT
39
-    },
40
-
41
-    /**
42
-     * Style for the {@code Icon} element in a generic item of the menu.
43
-     */
44
-    iconStyle: {
45
-        color: ColorPalette.white,
46
-        fontSize: 24
47
-    },
48
-
49
-    /**
50
-     * Style for the label in a generic item rendered in the menu.
51
-     */
52
-    labelStyle: {
53
-        color: ColorPalette.white,
54
-        flexShrink: 1,
55
-        fontSize: MD_FONT_SIZE,
56
-        marginLeft: 32,
57
-        opacity: 0.90
58
-    }
59
-});
60
-
61
-export const bottomSheetItemStylesCombined = {
62
-    ...bottomSheetItemStyles,
63
-    underlayColor: ColorPalette.overflowMenuItemUnderlay
64
-};
65
-
66 25
 /**
67 26
  * The React {@code Component} styles of {@code BottomSheet}. These have
68 27
  * been implemented as per the Material Design guidelines:
@@ -94,16 +53,6 @@ export const bottomSheetStyles = createStyleSheet({
94 53
     overlay: {
95 54
         ...StyleSheet.absoluteFillObject,
96 55
         backgroundColor: 'rgba(127, 127, 127, 0.6)'
97
-    },
98
-
99
-    /**
100
-     * Bottom sheet's base style.
101
-     */
102
-    sheet: {
103
-        backgroundColor: 'rgb(0, 3, 6)',
104
-        flex: 1,
105
-        paddingHorizontal: MD_ITEM_MARGIN_PADDING,
106
-        paddingVertical: 8
107 56
     }
108 57
 });
109 58
 
@@ -131,38 +80,17 @@ export const brandedDialog = createStyleSheet({
131 80
         borderBottomRightRadius: BORDER_RADIUS
132 81
     },
133 82
 
134
-    buttonSeparator: {
135
-        borderRightColor: DIALOG_BORDER_COLOR,
136
-        borderRightWidth: 1
137
-    },
138
-
139 83
     buttonWrapper: {
140 84
         alignItems: 'stretch',
141 85
         borderRadius: BORDER_RADIUS,
142 86
         flexDirection: 'row'
143 87
     },
144 88
 
145
-    closeStyle: {
146
-        color: ColorPalette.white,
147
-        fontSize: MD_FONT_SIZE
148
-    },
149
-
150 89
     closeWrapper: {
151 90
         alignSelf: 'flex-end',
152 91
         padding: BoxModel.padding
153 92
     },
154 93
 
155
-    dialog: {
156
-        alignItems: 'stretch',
157
-        backgroundColor: 'rgb(0, 3, 6)',
158
-        borderColor: DIALOG_BORDER_COLOR,
159
-        borderRadius: BORDER_RADIUS,
160
-        borderWidth: 1,
161
-        flex: 1,
162
-        flexDirection: 'column',
163
-        maxWidth: PREFERRED_DIALOG_SIZE
164
-    },
165
-
166 94
     mainWrapper: {
167 95
         alignSelf: 'stretch',
168 96
         padding: BoxModel.padding * 2,
@@ -179,56 +107,135 @@ export const brandedDialog = createStyleSheet({
179 107
         flexDirection: 'row',
180 108
         justifyContent: 'center',
181 109
         padding: 30
110
+    }
111
+});
112
+
113
+/**
114
+ * Reusable (colored) style for text in any branded dialogs.
115
+ */
116
+const brandedDialogText = {
117
+    color: schemeColor('text'),
118
+    fontSize: MD_FONT_SIZE,
119
+    textAlign: 'center'
120
+};
121
+
122
+export const inputDialog = createStyleSheet({
123
+    bottomField: {
124
+        marginBottom: 0
182 125
     },
183 126
 
184
-    text: {
185
-        color: ColorPalette.white,
186
-        fontSize: MD_FONT_SIZE,
187
-        textAlign: 'center'
127
+    fieldWrapper: {
128
+        ...brandedDialog.mainWrapper,
129
+        paddingBottom: BoxModel.padding * 2
188 130
     }
189 131
 });
190 132
 
191 133
 /**
192
- * The React {@code Component} styles of {@code Dialog}.
134
+ * Default styles for the items of a {@code BottomSheet}-based menu.
135
+ *
136
+ * These have been implemented as per the Material Design guidelines:
137
+ * {@link https://material.io/guidelines/components/bottom-sheets.html}.
193 138
  */
194
-export const dialog = createStyleSheet({
139
+ColorSchemeRegistry.register('BottomSheet', {
195 140
     /**
196
-     * The style of the {@code Text} in a {@code Dialog} button.
141
+     * Style for the {@code Icon} element in a generic item of the menu.
197 142
      */
198
-    buttonText: {
199
-        color: ColorPalette.blue
143
+    iconStyle: {
144
+        color: schemeColor('icon'),
145
+        fontSize: 24
200 146
     },
201 147
 
202 148
     /**
203
-     * The style of the {@code Text} in a {@code Dialog} button which is
204
-     * disabled.
149
+     * Style for the label in a generic item rendered in the menu.
205 150
      */
206
-    disabledButtonText: {
207
-        color: ColorPalette.darkGrey
208
-    }
151
+    labelStyle: {
152
+        color: schemeColor('label'),
153
+        flexShrink: 1,
154
+        fontSize: MD_FONT_SIZE,
155
+        marginLeft: 32,
156
+        opacity: 0.90
157
+    },
158
+
159
+    /**
160
+     * Bottom sheet's base style.
161
+     */
162
+    sheet: {
163
+        backgroundColor: schemeColor('background'),
164
+        flex: 1,
165
+        paddingHorizontal: MD_ITEM_MARGIN_PADDING,
166
+        paddingVertical: 8
167
+    },
168
+
169
+    /**
170
+     * Container style for a generic item rendered in the menu.
171
+     */
172
+    style: {
173
+        alignItems: 'center',
174
+        flexDirection: 'row',
175
+        height: MD_ITEM_HEIGHT
176
+    },
177
+
178
+    /**
179
+     * Additional style that is not directly used as a style object.
180
+     */
181
+    underlayColor: ColorPalette.overflowMenuItemUnderlay
209 182
 });
210 183
 
211
-export const inputDialog = createStyleSheet({
212
-    bottomField: {
213
-        marginBottom: 0
184
+/**
185
+ * Color schemed styles for all the component based on the abstract dialog.
186
+ */
187
+ColorSchemeRegistry.register('Dialog', {
188
+    /**
189
+     * Separator line for the buttons in a dialog.
190
+     */
191
+    buttonSeparator: {
192
+        borderRightColor: schemeColor('border'),
193
+        borderRightWidth: 1
214 194
     },
215 195
 
196
+    /**
197
+     * Style of the close icon on a dialog.
198
+     */
199
+    closeStyle: {
200
+        color: schemeColor('icon'),
201
+        fontSize: MD_FONT_SIZE
202
+    },
203
+
204
+    /**
205
+     * Base style of the dialogs.
206
+     */
207
+    dialog: {
208
+        alignItems: 'stretch',
209
+        backgroundColor: schemeColor('background'),
210
+        borderColor: schemeColor('border'),
211
+        borderRadius: BORDER_RADIUS,
212
+        borderWidth: 1,
213
+        flex: 1,
214
+        flexDirection: 'column',
215
+        maxWidth: PREFERRED_DIALOG_SIZE
216
+    },
217
+
218
+    /**
219
+     * Field on an input dialog.
220
+     */
216 221
     field: {
217
-        ...brandedDialog.text,
222
+        ...brandedDialogText,
218 223
         borderBottomWidth: 1,
219
-        borderColor: DIALOG_BORDER_COLOR,
224
+        borderColor: schemeColor('border'),
220 225
         margin: BoxModel.margin,
221 226
         textAlign: 'left'
222 227
     },
223 228
 
229
+    /**
230
+     * Style for the field label on an input dialog.
231
+     */
224 232
     fieldLabel: {
225
-        ...brandedDialog.text,
233
+        ...brandedDialogText,
226 234
         margin: BoxModel.margin,
227 235
         textAlign: 'left'
228 236
     },
229 237
 
230
-    fieldWrapper: {
231
-        ...brandedDialog.mainWrapper,
232
-        paddingBottom: BoxModel.padding * 2
238
+    text: {
239
+        ...brandedDialogText
233 240
     }
234 241
 });

+ 15
- 0
react/features/base/dialog/functions.js 查看文件

@@ -1,5 +1,6 @@
1 1
 /* @flow */
2 2
 
3
+import { ColorSchemeRegistry } from '../color-scheme';
3 4
 import { toState } from '../redux';
4 5
 
5 6
 /**
@@ -15,3 +16,17 @@ import { toState } from '../redux';
15 16
 export function isDialogOpen(stateful: Function | Object, component: Object) {
16 17
     return toState(stateful)['features/base/dialog'].component === component;
17 18
 }
19
+
20
+/**
21
+ * Maps part of the Redux state to the props of any Dialog based component.
22
+ *
23
+ * @param {Object} state - The Redux state.
24
+ * @returns {{
25
+ *     _dialogStyles: StyleType
26
+ * }}
27
+ */
28
+export function _abstractMapStateToProps(state: Object): Object {
29
+    return {
30
+        _dialogStyles: ColorSchemeRegistry.get(state, 'Dialog')
31
+    };
32
+}

+ 15
- 5
react/features/base/participants/components/ParticipantView.native.js 查看文件

@@ -12,6 +12,7 @@ import {
12 12
     VideoTrack
13 13
 } from '../../media';
14 14
 import { Container, TintedView } from '../../react';
15
+import { StyleType } from '../../styles';
15 16
 import { TestHint } from '../../testing/components';
16 17
 import { getTrackByMediaTypeAndParticipant } from '../../tracks';
17 18
 
@@ -97,6 +98,11 @@ type Props = {
97 98
      */
98 99
     tintEnabled: boolean,
99 100
 
101
+    /**
102
+     * The style of the tinting when applied.
103
+     */
104
+    tintStyle: StyleType,
105
+
100 106
     /**
101 107
      * The test hint id which can be used to locate the {@code ParticipantView}
102 108
      * on the jitsi-meet-torture side. If not provided, the
@@ -186,11 +192,12 @@ class ParticipantView extends Component<Props> {
186 192
      */
187 193
     render() {
188 194
         const {
189
-            onPress,
190 195
             _avatar: avatar,
191 196
             _connectionStatus: connectionStatus,
192 197
             _renderVideo: renderVideo,
193
-            _videoTrack: videoTrack
198
+            _videoTrack: videoTrack,
199
+            onPress,
200
+            tintStyle
194 201
         } = this.props;
195 202
 
196 203
         const waitForVideoStarted = false;
@@ -199,9 +206,10 @@ class ParticipantView extends Component<Props> {
199 206
         const renderAvatar = Boolean(!renderVideo && avatar);
200 207
 
201 208
         // If the connection has problems, we will "tint" the video / avatar.
209
+        const connectionProblem
210
+            = connectionStatus !== JitsiParticipantConnectionStatus.ACTIVE;
202 211
         const useTint
203
-            = connectionStatus !== JitsiParticipantConnectionStatus.ACTIVE
204
-                || this.props.tintEnabled;
212
+            = connectionProblem || this.props.tintEnabled;
205 213
 
206 214
         const testHintId
207 215
             = this.props.testHintId
@@ -238,7 +246,9 @@ class ParticipantView extends Component<Props> {
238 246
                 { useTint
239 247
 
240 248
                     // If the connection has problems, tint the video / avatar.
241
-                    && <TintedView /> }
249
+                    && <TintedView
250
+                        style = {
251
+                            connectionProblem ? undefined : tintStyle } /> }
242 252
 
243 253
                 { this.props.useConnectivityInfoLabel
244 254
                     && this._renderConnectionInfo(connectionStatus) }

+ 4
- 26
react/features/base/react/components/native/TintedView.js 查看文件

@@ -3,7 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 import { StyleSheet, View } from 'react-native';
5 5
 
6
-import { ColorPalette } from '../../../styles';
6
+import { TINTED_VIEW_DEFAULT } from './styles';
7 7
 
8 8
 /**
9 9
  * Base style for the {@code TintedView} component.
@@ -24,16 +24,6 @@ type Props = {
24 24
      */
25 25
     children?: React$Node,
26 26
 
27
-    /**
28
-     * Color used as the background of the view. Defaults to
29
-     */
30
-    color: string,
31
-
32
-    /**
33
-     * Opacity for the
34
-     */
35
-    opacity: number,
36
-
37 27
     /**
38 28
      * Style to override the base style.
39 29
      */
@@ -45,15 +35,6 @@ type Props = {
45 35
  * the given color and opacity.
46 36
  */
47 37
 export default class TintedView extends Component<Props> {
48
-    /**
49
-     * Default values for the component's props.
50
-     */
51
-    static defaultProps = {
52
-        color: ColorPalette.appBackground,
53
-        opacity: 0.8,
54
-        style: {}
55
-    };
56
-
57 38
     /**
58 39
      * Implements React's {@link Component#render()}.
59 40
      *
@@ -61,7 +42,7 @@ export default class TintedView extends Component<Props> {
61 42
      * @returns {ReactElement}
62 43
      */
63 44
     render() {
64
-        const { children, color, opacity, style } = this.props;
45
+        const { children, style } = this.props;
65 46
 
66 47
         // XXX Don't tint the children, tint the background only.
67 48
         return (
@@ -72,11 +53,8 @@ export default class TintedView extends Component<Props> {
72 53
                     pointerEvents = 'none'
73 54
                     style = { [
74 55
                         BASE_STYLE,
75
-                        style,
76
-                        {
77
-                            backgroundColor: color,
78
-                            opacity
79
-                        }
56
+                        TINTED_VIEW_DEFAULT,
57
+                        style
80 58
                     ] } />
81 59
                 <View
82 60
                     pointerEvents = 'box-none'

+ 5
- 0
react/features/base/react/components/native/styles.js 查看文件

@@ -324,6 +324,11 @@ const SIDEBAR_STYLES = {
324 324
     }
325 325
 };
326 326
 
327
+export const TINTED_VIEW_DEFAULT = {
328
+    backgroundColor: ColorPalette.appBackground,
329
+    opacity: 0.8
330
+};
331
+
327 332
 /**
328 333
  * The styles of the generic React {@code Component}s implemented by the feature
329 334
  * base/react.

+ 1
- 0
react/features/base/styles/components/styles/ColorPalette.js 查看文件

@@ -18,6 +18,7 @@ export const ColorPalette = {
18 18
      * the sake of consistency.
19 19
      */
20 20
     black: BLACK,
21
+    blackBlue: 'rgb(0, 3, 6)',
21 22
     blue: '#17A0DB',
22 23
     blueHighlight: '#1081b2',
23 24
     buttonUnderlay: '#495258',

+ 13
- 1
react/features/filmstrip/components/native/Thumbnail.js 查看文件

@@ -3,6 +3,7 @@
3 3
 import React, { Component } from 'react';
4 4
 import { connect } from 'react-redux';
5 5
 
6
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
6 7
 import { openDialog } from '../../../base/dialog';
7 8
 import { Audio, MEDIA_TYPE } from '../../../base/media';
8 9
 import {
@@ -12,6 +13,7 @@ import {
12 13
     pinParticipant
13 14
 } from '../../../base/participants';
14 15
 import { Container } from '../../../base/react';
16
+import { StyleType } from '../../../base/styles';
15 17
 import { getTrackByMediaTypeAndParticipant } from '../../../base/tracks';
16 18
 
17 19
 import { RemoteVideoMenu } from '../../../remote-video-menu';
@@ -53,6 +55,11 @@ type Props = {
53 55
      */
54 56
     _onShowRemoteVideoMenu: ?Function,
55 57
 
58
+    /**
59
+     * The color-schemed stylesheet of the feature.
60
+     */
61
+    _styles: StyleType,
62
+
56 63
     /**
57 64
      * The Redux representation of the participant's video track.
58 65
      */
@@ -106,6 +113,7 @@ class Thumbnail extends Component<Props> {
106 113
             _largeVideo: largeVideo,
107 114
             _onClick,
108 115
             _onShowRemoteVideoMenu,
116
+            _styles,
109 117
             _videoTrack: videoTrack,
110 118
             disablePin,
111 119
             disableTint,
@@ -135,7 +143,7 @@ class Thumbnail extends Component<Props> {
135 143
                 style = { [
136 144
                     styles.thumbnail,
137 145
                     participant.pinned && !disablePin
138
-                        ? styles.thumbnailPinned : null,
146
+                        ? _styles.thumbnailPinned : null,
139 147
                     this.props.styleOverrides || null
140 148
                 ] }
141 149
                 touchFeedback = { false }>
@@ -148,7 +156,9 @@ class Thumbnail extends Component<Props> {
148 156
                 <ParticipantView
149 157
                     avatarSize = { AVATAR_SIZE }
150 158
                     participantId = { participantId }
159
+                    style = { _styles.participantViewStyle }
151 160
                     tintEnabled = { participantInLargeVideo && !disableTint }
161
+                    tintStyle = { _styles.activeThumbnailTint }
152 162
                     zOrder = { 1 } />
153 163
 
154 164
                 { participant.role === PARTICIPANT_ROLE.MODERATOR
@@ -219,6 +229,7 @@ function _mapDispatchToProps(dispatch: Function, ownProps): Object {
219 229
  *      _audioTrack: Track,
220 230
  *      _isModerator: boolean,
221 231
  *      _largeVideo: Object,
232
+ *      _styles: StyleType,
222 233
  *      _videoTrack: Track
223 234
  *  }}
224 235
  */
@@ -238,6 +249,7 @@ function _mapStateToProps(state, ownProps) {
238 249
         _audioTrack: audioTrack,
239 250
         _isModerator: isLocalParticipantModerator(state),
240 251
         _largeVideo: largeVideo,
252
+        _styles: ColorSchemeRegistry.get(state, 'Thumbnail'),
241 253
         _videoTrack: videoTrack
242 254
     };
243 255
 }

+ 36
- 13
react/features/filmstrip/components/styles.js 查看文件

@@ -1,3 +1,6 @@
1
+// @flow
2
+
3
+import { ColorSchemeRegistry, schemeColor } from '../../base/color-scheme';
1 4
 import { ColorPalette } from '../../base/styles';
2 5
 import { FILMSTRIP_SIZE } from '../constants';
3 6
 
@@ -134,19 +137,6 @@ export default {
134 137
         position: 'absolute'
135 138
     },
136 139
 
137
-    /**
138
-     * Pinned video thumbnail style.
139
-     */
140
-    thumbnailPinned: {
141
-        borderColor: ColorPalette.blue,
142
-        shadowColor: ColorPalette.black,
143
-        shadowOffset: {
144
-            height: 5,
145
-            width: 5
146
-        },
147
-        shadowRadius: 5
148
-    },
149
-
150 140
     tileView: {
151 141
         alignSelf: 'center'
152 142
     },
@@ -160,3 +150,36 @@ export default {
160 150
         justifyContent: 'center'
161 151
     }
162 152
 };
153
+
154
+/**
155
+ * Color schemed styles for the @{code Thumbnail} component.
156
+ */
157
+ColorSchemeRegistry.register('Thumbnail', {
158
+
159
+    /**
160
+     * Tinting style of the on-stage participant thumbnail.
161
+     */
162
+    activeThumbnailTint: {
163
+        backgroundColor: schemeColor('activeParticipantTint')
164
+    },
165
+
166
+    /**
167
+     * Coloring if the thumbnail background.
168
+     */
169
+    participantViewStyle: {
170
+        backgroundColor: schemeColor('background')
171
+    },
172
+
173
+    /**
174
+     * Pinned video thumbnail style.
175
+     */
176
+    thumbnailPinned: {
177
+        borderColor: schemeColor('activeParticipantHighlight'),
178
+        shadowColor: schemeColor('activeParticipantHighlight'),
179
+        shadowOffset: {
180
+            height: 5,
181
+            width: 5
182
+        },
183
+        shadowRadius: 5
184
+    }
185
+});

+ 20
- 10
react/features/large-video/components/LargeVideo.native.js 查看文件

@@ -3,27 +3,34 @@
3 3
 import React, { Component } from 'react';
4 4
 import { connect } from 'react-redux';
5 5
 
6
+import { ColorSchemeRegistry } from '../../base/color-scheme';
6 7
 import { ParticipantView } from '../../base/participants';
7 8
 import { DimensionsDetector } from '../../base/responsive-ui';
9
+import { StyleType } from '../../base/styles';
8 10
 
9
-import styles, { AVATAR_SIZE } from './styles';
11
+import { AVATAR_SIZE } from './styles';
10 12
 
11 13
 /**
12 14
  * The type of the React {@link Component} props of {@link LargeVideo}.
13 15
  */
14 16
 type Props = {
15 17
 
16
-    /**
17
-     * Callback to invoke when the {@code LargeVideo} is clicked/pressed.
18
-     */
19
-    onClick: Function,
20
-
21 18
     /**
22 19
      * The ID of the participant (to be) depicted by LargeVideo.
23 20
      *
24 21
      * @private
25 22
      */
26
-    _participantId: string
23
+    _participantId: string,
24
+
25
+    /**
26
+     * The color-schemed stylesheet of the feature.
27
+     */
28
+    _styles: StyleType,
29
+
30
+    /**
31
+     * Callback to invoke when the {@code LargeVideo} is clicked/pressed.
32
+     */
33
+    onClick: Function,
27 34
 };
28 35
 
29 36
 /**
@@ -114,6 +121,7 @@ class LargeVideo extends Component<Props, State> {
114 121
         } = this.state;
115 122
         const {
116 123
             _participantId,
124
+            _styles,
117 125
             onClick
118 126
         } = this.props;
119 127
 
@@ -124,7 +132,7 @@ class LargeVideo extends Component<Props, State> {
124 132
                     avatarSize = { avatarSize }
125 133
                     onPress = { onClick }
126 134
                     participantId = { _participantId }
127
-                    style = { styles.largeVideo }
135
+                    style = { _styles.largeVideo }
128 136
                     testHintId = 'org.jitsi.meet.LargeVideo'
129 137
                     useConnectivityInfoLabel = { useConnectivityInfoLabel }
130 138
                     zOrder = { 0 }
@@ -140,12 +148,14 @@ class LargeVideo extends Component<Props, State> {
140 148
  * @param {Object} state - Redux state.
141 149
  * @private
142 150
  * @returns {{
143
- *     _participantId: string
151
+ *     _participantId: string,
152
+ *     _styles: StyleType
144 153
  * }}
145 154
  */
146 155
 function _mapStateToProps(state) {
147 156
     return {
148
-        _participantId: state['features/large-video'].participantId
157
+        _participantId: state['features/large-video'].participantId,
158
+        _styles: ColorSchemeRegistry.get(state, 'LargeVideo')
149 159
     };
150 160
 }
151 161
 

+ 6
- 3
react/features/large-video/components/styles.js 查看文件

@@ -1,13 +1,16 @@
1 1
 import { StyleSheet } from 'react-native';
2 2
 
3
-import { ColorPalette, createStyleSheet } from '../../base/styles';
3
+import { ColorSchemeRegistry, schemeColor } from '../../base/color-scheme';
4 4
 
5 5
 /**
6 6
  * Size for the Avatar.
7 7
  */
8 8
 export const AVATAR_SIZE = 200;
9 9
 
10
-export default createStyleSheet({
10
+/**
11
+ * Color schemed styles for the @{LargeVideo} component.
12
+ */
13
+ColorSchemeRegistry.register('LargeVideo', {
11 14
 
12 15
     /**
13 16
      * Large video container style.
@@ -15,7 +18,7 @@ export default createStyleSheet({
15 18
     largeVideo: {
16 19
         ...StyleSheet.absoluteFillObject,
17 20
         alignItems: 'stretch',
18
-        backgroundColor: ColorPalette.appBackground,
21
+        backgroundColor: schemeColor('background'),
19 22
         flex: 1,
20 23
         justifyContent: 'center'
21 24
     }

+ 4
- 3
react/features/recording/components/LiveStream/AbstractStreamKeyForm.js 查看文件

@@ -52,7 +52,8 @@ type State = {
52 52
  *
53 53
  * @extends Component
54 54
  */
55
-export default class AbstractStreamKeyForm extends Component<Props, State> {
55
+export default class AbstractStreamKeyForm<P: Props>
56
+    extends Component<P, State> {
56 57
     helpURL: string;
57 58
     _debouncedUpdateValidationErrorVisibility: Function;
58 59
 
@@ -61,7 +62,7 @@ export default class AbstractStreamKeyForm extends Component<Props, State> {
61 62
      *
62 63
      * @inheritdoc
63 64
      */
64
-    constructor(props: Props) {
65
+    constructor(props: P) {
65 66
         super(props);
66 67
 
67 68
         this.state = {
@@ -88,7 +89,7 @@ export default class AbstractStreamKeyForm extends Component<Props, State> {
88 89
      *
89 90
      * @inheritdoc
90 91
      */
91
-    componentDidUpdate(prevProps: Props) {
92
+    componentDidUpdate(prevProps: P) {
92 93
         if (this.props.value !== prevProps.value) {
93 94
             this._debouncedUpdateValidationErrorVisibility();
94 95
         }

+ 14
- 2
react/features/recording/components/LiveStream/native/GoogleSigninForm.js 查看文件

@@ -4,7 +4,9 @@ import React, { Component } from 'react';
4 4
 import { Text, View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
+import { _abstractMapStateToProps } from '../../../../base/dialog';
7 8
 import { translate } from '../../../../base/i18n';
9
+import { StyleType } from '../../../../base/styles';
8 10
 
9 11
 import {
10 12
     GOOGLE_API_STATES,
@@ -23,6 +25,11 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);
23 25
  */
24 26
 type Props = {
25 27
 
28
+    /**
29
+     * Style of the dialogs feature.
30
+     */
31
+    _dialogStyles: StyleType,
32
+
26 33
     /**
27 34
      * The Redux dispatch Function.
28 35
      */
@@ -102,7 +109,7 @@ class GoogleSigninForm extends Component<Props> {
102 109
      * @inheritdoc
103 110
      */
104 111
     render() {
105
-        const { t } = this.props;
112
+        const { _dialogStyles, t } = this.props;
106 113
         const { googleAPIState, googleResponse } = this.props;
107 114
         const signedInUser = googleResponse
108 115
             && googleResponse.user
@@ -121,7 +128,11 @@ class GoogleSigninForm extends Component<Props> {
121 128
         return (
122 129
             <View style = { styles.formWrapper }>
123 130
                 <View style = { styles.helpText }>
124
-                    <Text style = { styles.text }>
131
+                    <Text
132
+                        style = { [
133
+                            _dialogStyles.text,
134
+                            styles.text
135
+                        ] }>
125 136
                         { userInfo }
126 137
                     </Text>
127 138
                 </View>
@@ -225,6 +236,7 @@ function _mapStateToProps(state: Object) {
225 236
     const { googleAPIState, googleResponse } = state['features/google-api'];
226 237
 
227 238
     return {
239
+        ..._abstractMapStateToProps(state),
228 240
         googleAPIState,
229 241
         googleResponse
230 242
     };

+ 31
- 7
react/features/recording/components/LiveStream/native/StreamKeyForm.js 查看文件

@@ -2,13 +2,24 @@
2 2
 
3 3
 import React from 'react';
4 4
 import { Linking, Text, TextInput, TouchableOpacity, View } from 'react-native';
5
+import { connect } from 'react-redux';
5 6
 
7
+import { _abstractMapStateToProps } from '../../../../base/dialog';
6 8
 import { translate } from '../../../../base/i18n';
9
+import { StyleType } from '../../../../base/styles';
7 10
 
8 11
 import AbstractStreamKeyForm, {
9
-    type Props
12
+    type Props as AbstractProps
10 13
 } from '../AbstractStreamKeyForm';
11 14
 
15
+type Props = AbstractProps & {
16
+
17
+    /**
18
+     * Style of the dialogs feature.
19
+     */
20
+    _dialogStyles: StyleType
21
+};
22
+
12 23
 import styles, { PLACEHOLDER_COLOR } from './styles';
13 24
 
14 25
 /**
@@ -16,7 +27,7 @@ import styles, { PLACEHOLDER_COLOR } from './styles';
16 27
  *
17 28
  * @extends Component
18 29
  */
19
-class StreamKeyForm extends AbstractStreamKeyForm {
30
+class StreamKeyForm extends AbstractStreamKeyForm<Props> {
20 31
     /**
21 32
      * Initializes a new {@code StreamKeyForm} instance.
22 33
      *
@@ -37,11 +48,16 @@ class StreamKeyForm extends AbstractStreamKeyForm {
37 48
      * @returns {ReactElement}
38 49
      */
39 50
     render() {
40
-        const { t } = this.props;
51
+        const { _dialogStyles, t } = this.props;
41 52
 
42 53
         return (
43 54
             <View style = { styles.formWrapper }>
44
-                <Text style = { styles.streamKeyInputLabel }>
55
+                <Text
56
+                    style = { [
57
+                        _dialogStyles.text,
58
+                        styles.text,
59
+                        styles.streamKeyInputLabel
60
+                    ] }>
45 61
                     {
46 62
                         t('dialog.streamKey')
47 63
                     }
@@ -56,7 +72,11 @@ class StreamKeyForm extends AbstractStreamKeyForm {
56 72
                     {
57 73
                         this.state.showValidationError
58 74
                             ? <View style = { styles.formFooterItem }>
59
-                                <Text style = { styles.warningText }>
75
+                                <Text
76
+                                    style = { [
77
+                                        _dialogStyles.text,
78
+                                        styles.warningText
79
+                                    ] }>
60 80
                                     { t('liveStreaming.invalidStreamKey') }
61 81
                                 </Text>
62 82
                             </View>
@@ -66,7 +86,11 @@ class StreamKeyForm extends AbstractStreamKeyForm {
66 86
                         <TouchableOpacity
67 87
                             onPress = { this._onOpenHelp }
68 88
                             style = { styles.streamKeyHelp } >
69
-                            <Text style = { styles.text }>
89
+                            <Text
90
+                                style = { [
91
+                                    _dialogStyles.text,
92
+                                    styles.text
93
+                                ] }>
70 94
                                 {
71 95
                                     t('liveStreaming.streamIdHelp')
72 96
                                 }
@@ -98,4 +122,4 @@ class StreamKeyForm extends AbstractStreamKeyForm {
98 122
     }
99 123
 }
100 124
 
101
-export default translate(StreamKeyForm);
125
+export default translate(connect(_abstractMapStateToProps)(StreamKeyForm));

+ 26
- 5
react/features/recording/components/LiveStream/native/StreamKeyPicker.js 查看文件

@@ -8,8 +8,11 @@ import {
8 8
     TouchableOpacity,
9 9
     View
10 10
 } from 'react-native';
11
+import { connect } from 'react-redux';
11 12
 
13
+import { _abstractMapStateToProps } from '../../../../base/dialog';
12 14
 import { translate } from '../../../../base/i18n';
15
+import { StyleType } from '../../../../base/styles';
13 16
 
14 17
 import { YOUTUBE_LIVE_DASHBOARD_URL } from '../constants';
15 18
 
@@ -17,6 +20,11 @@ import styles, { ACTIVE_OPACITY, TOUCHABLE_UNDERLAY } from './styles';
17 20
 
18 21
 type Props = {
19 22
 
23
+    /**
24
+     * Style of the dialogs feature.
25
+     */
26
+    _dialogStyles: StyleType,
27
+
20 28
     /**
21 29
      * The list of broadcasts the user can pick from.
22 30
      */
@@ -74,7 +82,7 @@ class StreamKeyPicker extends Component<Props, State> {
74 82
      * @inheritdoc
75 83
      */
76 84
     render() {
77
-        const { broadcasts } = this.props;
85
+        const { _dialogStyles, broadcasts } = this.props;
78 86
 
79 87
         if (!broadcasts) {
80 88
             return null;
@@ -85,7 +93,11 @@ class StreamKeyPicker extends Component<Props, State> {
85 93
                 <View style = { styles.formWrapper }>
86 94
                     <TouchableOpacity
87 95
                         onPress = { this._onOpenYoutubeDashboard }>
88
-                        <Text style = { styles.warningText }>
96
+                        <Text
97
+                            style = { [
98
+                                _dialogStyles.text,
99
+                                styles.warningText
100
+                            ] }>
89 101
                             { this.props.t(
90 102
                                 'liveStreaming.getStreamKeyManually') }
91 103
                         </Text>
@@ -97,7 +109,11 @@ class StreamKeyPicker extends Component<Props, State> {
97 109
         return (
98 110
             <View style = { styles.formWrapper }>
99 111
                 <View style = { styles.streamKeyPickerCta }>
100
-                    <Text style = { styles.text }>
112
+                    <Text
113
+                        style = { [
114
+                            _dialogStyles.text,
115
+                            styles.text
116
+                        ] }>
101 117
                         { this.props.t('liveStreaming.choose') }
102 118
                     </Text>
103 119
                 </View>
@@ -113,7 +129,11 @@ class StreamKeyPicker extends Component<Props, State> {
113 129
                                     ? styles.streamKeyPickerItemHighlight : null
114 130
                             ] }
115 131
                             underlayColor = { TOUCHABLE_UNDERLAY }>
116
-                            <Text style = { styles.text }>
132
+                            <Text
133
+                                style = { [
134
+                                    _dialogStyles.text,
135
+                                    styles.text
136
+                                ] }>
117 137
                                 { broadcast.title }
118 138
                             </Text>
119 139
                         </TouchableHighlight>))
@@ -155,4 +175,5 @@ class StreamKeyPicker extends Component<Props, State> {
155 175
     }
156 176
 }
157 177
 
158
-export default translate(StreamKeyPicker);
178
+export default translate(
179
+    connect(_abstractMapStateToProps)(StreamKeyPicker));

+ 3
- 3
react/features/recording/components/LiveStream/native/styles.js 查看文件

@@ -99,8 +99,7 @@ export default createStyleSheet({
99 99
      * Label for the previous field.
100 100
      */
101 101
     streamKeyInputLabel: {
102
-        alignSelf: 'flex-start',
103
-        color: ColorPalette.white
102
+        alignSelf: 'flex-start'
104 103
     },
105 104
 
106 105
     /**
@@ -146,7 +145,8 @@ export default createStyleSheet({
146 145
     },
147 146
 
148 147
     text: {
149
-        color: ColorPalette.white
148
+        fontSize: 14,
149
+        textAlign: 'left'
150 150
     },
151 151
 
152 152
     /**

+ 1
- 1
react/features/recording/components/LiveStream/web/StreamKeyForm.js 查看文件

@@ -14,7 +14,7 @@ import AbstractStreamKeyForm, {
14 14
  *
15 15
  * @extends Component
16 16
  */
17
-class StreamKeyForm extends AbstractStreamKeyForm {
17
+class StreamKeyForm extends AbstractStreamKeyForm<Props> {
18 18
 
19 19
     /**
20 20
      * Initializes a new {@code StreamKeyForm} instance.

+ 18
- 5
react/features/recording/components/Recording/StartRecordingDialogContent.js 查看文件

@@ -7,7 +7,10 @@ import {
7 7
     createRecordingDialogEvent,
8 8
     sendAnalytics
9 9
 } from '../../../analytics';
10
-import { DialogContent } from '../../../base/dialog';
10
+import {
11
+    DialogContent,
12
+    _abstractMapStateToProps
13
+} from '../../../base/dialog';
11 14
 import { translate } from '../../../base/i18n';
12 15
 import {
13 16
     Container,
@@ -15,6 +18,7 @@ import {
15 18
     Switch,
16 19
     Text
17 20
 } from '../../../base/react';
21
+import { StyleType } from '../../../base/styles';
18 22
 import { authorizeDropbox, updateDropboxToken } from '../../../dropbox';
19 23
 
20 24
 import styles from './styles';
@@ -22,6 +26,11 @@ import { getRecordingDurationEstimation } from '../../functions';
22 26
 
23 27
 type Props = {
24 28
 
29
+    /**
30
+     * Style of the dialogs feature.
31
+     */
32
+    _dialogStyles: StyleType,
33
+
25 34
     /**
26 35
      * The redux dispatch function.
27 36
      */
@@ -99,7 +108,7 @@ class StartRecordingDialogContent extends Component<Props> {
99 108
      */
100 109
     _renderNoIntegrationsContent() {
101 110
         return (
102
-            <DialogContent style = { styles.noIntegrationContent }>
111
+            <DialogContent style = { this.props._dialogStyles.text }>
103 112
                 { this.props.t('recording.startRecordingBody') }
104 113
             </DialogContent>
105 114
         );
@@ -112,7 +121,7 @@ class StartRecordingDialogContent extends Component<Props> {
112 121
      * @returns {React$Component}
113 122
      */
114 123
     _renderIntegrationsContent() {
115
-        const { isTokenValid, isValidating, t } = this.props;
124
+        const { _dialogStyles, isTokenValid, isValidating, t } = this.props;
116 125
 
117 126
         let content = null;
118 127
 
@@ -135,7 +144,10 @@ class StartRecordingDialogContent extends Component<Props> {
135 144
                     style = { styles.header }>
136 145
                     <Text
137 146
                         className = 'recording-title'
138
-                        style = { styles.title }>
147
+                        style = { [
148
+                            _dialogStyles.text,
149
+                            styles.title
150
+                        ] }>
139 151
                         { t('recording.authDropboxText') }
140 152
                     </Text>
141 153
                     <Switch
@@ -248,4 +260,5 @@ class StartRecordingDialogContent extends Component<Props> {
248 260
     }
249 261
 }
250 262
 
251
-export default translate(connect()(StartRecordingDialogContent));
263
+export default translate(
264
+    connect(_abstractMapStateToProps)(StartRecordingDialogContent));

+ 0
- 5
react/features/recording/components/Recording/styles.native.js 查看文件

@@ -28,10 +28,6 @@ export default createStyleSheet({
28 28
         paddingBottom: _PADDING
29 29
     },
30 30
 
31
-    noIntegrationContent: {
32
-        color: ColorPalette.white
33
-    },
34
-
35 31
     startRecordingText: {
36 32
         paddingBottom: _PADDING
37 33
     },
@@ -42,7 +38,6 @@ export default createStyleSheet({
42 38
     },
43 39
 
44 40
     title: {
45
-        color: ColorPalette.white,
46 41
         fontSize: 16,
47 42
         fontWeight: 'bold'
48 43
     },

+ 12
- 3
react/features/remote-video-menu/components/native/RemoteVideoMenu.js 查看文件

@@ -4,15 +4,16 @@ import React, { Component } from 'react';
4 4
 import { Text, View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
7 8
 import {
8
-    BottomSheet,
9
-    bottomSheetItemStylesCombined
9
+    BottomSheet
10 10
 } from '../../../base/dialog';
11 11
 import {
12 12
     Avatar,
13 13
     getAvatarURL,
14 14
     getParticipantDisplayName
15 15
 } from '../../../base/participants';
16
+import { StyleType } from '../../../base/styles';
16 17
 
17 18
 import { hideRemoteVideoMenu } from '../../actions';
18 19
 
@@ -42,6 +43,11 @@ type Props = {
42 43
      */
43 44
     _avatarURL: string,
44 45
 
46
+    /**
47
+     * The color-schemed stylesheet of the BottomSheet.
48
+     */
49
+    _bottomSheetStyles: StyleType,
50
+
45 51
     /**
46 52
      * Display name of the participant retreived from Redux.
47 53
      */
@@ -73,7 +79,7 @@ class RemoteVideoMenu extends Component<Props> {
73 79
             afterClick: this._onCancel,
74 80
             showLabel: true,
75 81
             participantID: this.props.participant.id,
76
-            styles: bottomSheetItemStylesCombined
82
+            styles: this.props._bottomSheetStyles
77 83
         };
78 84
 
79 85
         return (
@@ -113,6 +119,7 @@ class RemoteVideoMenu extends Component<Props> {
113 119
  * @private
114 120
  * @returns {{
115 121
  *      _avatarURL: string,
122
+ *      _bottomSheetStyles: StyleType,
116 123
  *      _participantDisplayName: string
117 124
  *  }}
118 125
  */
@@ -121,6 +128,8 @@ function _mapStateToProps(state, ownProps) {
121 128
 
122 129
     return {
123 130
         _avatarURL: getAvatarURL(participant),
131
+        _bottomSheetStyles:
132
+            ColorSchemeRegistry.get(state, 'BottomSheet'),
124 133
         _participantDisplayName: getParticipantDisplayName(
125 134
             state, participant.id)
126 135
     };

+ 26
- 4
react/features/toolbox/components/native/OverflowMenu.js 查看文件

@@ -4,11 +4,12 @@ import React, { Component } from 'react';
4 4
 import { Platform } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
7 8
 import {
8 9
     BottomSheet,
9
-    bottomSheetItemStylesCombined,
10 10
     hideDialog
11 11
 } from '../../../base/dialog';
12
+import { StyleType } from '../../../base/styles';
12 13
 import { InviteButton } from '../../../invite';
13 14
 import { AudioRouteButton } from '../../../mobile/audio-mode';
14 15
 import { LiveStreamButton, RecordButton } from '../../../recording';
@@ -26,10 +27,15 @@ declare var __DEV__;
26 27
  */
27 28
 type Props = {
28 29
 
30
+    /**
31
+     * The color-schemed stylesheet of the dialog feature.
32
+     */
33
+    _bottomSheetStyles: StyleType,
34
+
29 35
     /**
30 36
      * Used for hiding the dialog when the selection was completed.
31 37
      */
32
-    dispatch: Function,
38
+    dispatch: Function
33 39
 };
34 40
 
35 41
 /**
@@ -68,7 +74,7 @@ class OverflowMenu extends Component<Props> {
68 74
         const buttonProps = {
69 75
             afterClick: this._onCancel,
70 76
             showLabel: true,
71
-            styles: bottomSheetItemStylesCombined
77
+            styles: this.props._bottomSheetStyles
72 78
         };
73 79
 
74 80
         return (
@@ -106,6 +112,22 @@ class OverflowMenu extends Component<Props> {
106 112
     }
107 113
 }
108 114
 
109
-OverflowMenu_ = connect()(OverflowMenu);
115
+/**
116
+ * Function that maps parts of Redux state tree into component props.
117
+ *
118
+ * @param {Object} state - Redux state.
119
+ * @private
120
+ * @returns {{
121
+ *      _bottomSheetStyles: StyleType
122
+ *  }}
123
+ */
124
+function _mapStateToProps(state) {
125
+    return {
126
+        _bottomSheetStyles:
127
+            ColorSchemeRegistry.get(state, 'BottomSheet')
128
+    };
129
+}
130
+
131
+OverflowMenu_ = connect(_mapStateToProps)(OverflowMenu);
110 132
 
111 133
 export default OverflowMenu_;

+ 23
- 14
react/features/toolbox/components/native/Toolbox.js 查看文件

@@ -5,21 +5,19 @@ import { View } from 'react-native';
5 5
 import { connect } from 'react-redux';
6 6
 
7 7
 import { Container } from '../../../base/react';
8
+import { ColorSchemeRegistry } from '../../../base/color-scheme';
9
+import { StyleType } from '../../../base/styles';
8 10
 import { ChatButton } from '../../../chat';
9 11
 
10 12
 import { isToolboxVisible } from '../../functions';
13
+import { HANGUP_BUTTON_SIZE } from '../../constants';
11 14
 
12 15
 import AudioMuteButton from '../AudioMuteButton';
13 16
 import HangupButton from '../HangupButton';
14
-import VideoMuteButton from '../VideoMuteButton';
15 17
 
16 18
 import OverflowMenuButton from './OverflowMenuButton';
17
-import styles, {
18
-    chatButtonOverride,
19
-    hangupButtonStyles,
20
-    toolbarButtonStyles,
21
-    toolbarToggledButtonStyles
22
-} from './styles';
19
+import styles from './styles';
20
+import VideoMuteButton from '../VideoMuteButton';
23 21
 
24 22
 /**
25 23
  * The number of buttons other than {@link HangupButton} to render in
@@ -43,6 +41,11 @@ const _BUTTON_SIZE_FACTOR = 0.85;
43 41
  */
44 42
 type Props = {
45 43
 
44
+    /**
45
+     * The color-schemed stylesheet of the feature.
46
+     */
47
+    _styles: StyleType,
48
+
46 49
     /**
47 50
      * The indicator which determines whether the toolbox is visible.
48 51
      */
@@ -111,6 +114,7 @@ class Toolbox extends Component<Props, State> {
111 114
      * @returns {number}
112 115
      */
113 116
     _calculateButtonSize() {
117
+        const { _styles } = this.props;
114 118
         const { width } = this.state;
115 119
 
116 120
         if (width <= 0) {
@@ -118,8 +122,8 @@ class Toolbox extends Component<Props, State> {
118 122
             return width;
119 123
         }
120 124
 
121
-        const hangupButtonSize = styles.hangupButton.width;
122
-        const { style } = toolbarButtonStyles;
125
+        const hangupButtonSize = HANGUP_BUTTON_SIZE;
126
+        const { style } = _styles.buttonStyles;
123 127
         let buttonSize
124 128
             = (width
125 129
 
@@ -155,12 +159,14 @@ class Toolbox extends Component<Props, State> {
155 159
      * @returns {Object | Array}
156 160
      */
157 161
     _getChatButtonToggledStyle(baseStyle) {
162
+        const { _styles } = this.props;
163
+
158 164
         if (Array.isArray(baseStyle.style)) {
159 165
             return {
160 166
                 ...baseStyle,
161 167
                 style: [
162 168
                     ...baseStyle.style,
163
-                    chatButtonOverride.toggled
169
+                    _styles.chatButtonOverride.toggled
164 170
                 ]
165 171
             };
166 172
         }
@@ -169,7 +175,7 @@ class Toolbox extends Component<Props, State> {
169 175
             ...baseStyle,
170 176
             style: [
171 177
                 baseStyle.style,
172
-                chatButtonOverride.toggled
178
+                _styles.chatButtonOverride.toggled
173 179
             ]
174 180
         };
175 181
     }
@@ -196,9 +202,9 @@ class Toolbox extends Component<Props, State> {
196 202
      * @returns {React$Node}
197 203
      */
198 204
     _renderToolbar() {
205
+        const { _styles } = this.props;
199 206
         const buttonSize = this._calculateButtonSize();
200
-        let buttonStyles = toolbarButtonStyles;
201
-        let toggledButtonStyles = toolbarToggledButtonStyles;
207
+        let { buttonStyles, toggledButtonStyles } = _styles;
202 208
 
203 209
         if (buttonSize > 0) {
204 210
             const extraButtonStyle = {
@@ -241,7 +247,8 @@ class Toolbox extends Component<Props, State> {
241 247
                 <AudioMuteButton
242 248
                     styles = { buttonStyles }
243 249
                     toggledStyles = { toggledButtonStyles } />
244
-                <HangupButton styles = { hangupButtonStyles } />
250
+                <HangupButton
251
+                    styles = { _styles.hangupButtonStyles } />
245 252
                 <VideoMuteButton
246 253
                     styles = { buttonStyles }
247 254
                     toggledStyles = { toggledButtonStyles } />
@@ -261,11 +268,13 @@ class Toolbox extends Component<Props, State> {
261 268
  * {@code Toolbox} props.
262 269
  * @private
263 270
  * @returns {{
271
+ *     _styles: StyleType,
264 272
  *     _visible: boolean
265 273
  * }}
266 274
  */
267 275
 function _mapStateToProps(state: Object): Object {
268 276
     return {
277
+        _styles: ColorSchemeRegistry.get(state, 'Toolbox'),
269 278
         _visible: isToolboxVisible(state)
270 279
     };
271 280
 }

+ 58
- 74
react/features/toolbox/components/native/styles.js 查看文件

@@ -1,4 +1,6 @@
1 1
 // @flow
2
+
3
+import { ColorSchemeRegistry, schemeColor } from '../../../base/color-scheme';
2 4
 import { BoxModel, ColorPalette, createStyleSheet } from '../../../base/styles';
3 5
 
4 6
 import { HANGUP_BUTTON_SIZE } from '../../constants';
@@ -9,7 +11,7 @@ import { HANGUP_BUTTON_SIZE } from '../../constants';
9 11
  * The style of toolbar buttons.
10 12
  */
11 13
 const toolbarButton = {
12
-    backgroundColor: ColorPalette.white,
14
+    backgroundColor: schemeColor('button'),
13 15
     borderRadius: 20,
14 16
     borderWidth: 0,
15 17
     flex: 0,
@@ -20,7 +22,6 @@ const toolbarButton = {
20 22
     // XXX We probably tested BoxModel.margin and discovered it to be too small
21 23
     // for our taste.
22 24
     marginHorizontal: 7,
23
-    opacity: 0.7,
24 25
     width: 40
25 26
 };
26 27
 
@@ -33,29 +34,26 @@ const toolbarButtonIcon = {
33 34
     fontSize: 22
34 35
 };
35 36
 
37
+/**
38
+ * The style of toolbar buttons which display white icons.
39
+ */
40
+const whiteToolbarButton = {
41
+    ...toolbarButton,
42
+    backgroundColor: schemeColor('buttonToggled')
43
+};
44
+
45
+/**
46
+ * The icon style of toolbar buttons which display white icons.
47
+ */
48
+const whiteToolbarButtonIcon = {
49
+    ...toolbarButtonIcon,
50
+    color: ColorPalette.white
51
+};
52
+
36 53
 /**
37 54
  * The Toolbox and toolbar related styles.
38 55
  */
39 56
 const styles = createStyleSheet({
40
-    /**
41
-     * The style of the toolbar button which hangs the current conference up.
42
-     */
43
-    hangupButton: {
44
-        ...toolbarButton,
45
-        backgroundColor: ColorPalette.red,
46
-        borderRadius: 30,
47
-        height: HANGUP_BUTTON_SIZE,
48
-        width: HANGUP_BUTTON_SIZE
49
-    },
50
-
51
-    /**
52
-     * The icon style of toolbar buttons which hangs the current conference up.
53
-     */
54
-    hangupButtonIcon: {
55
-        ...toolbarButtonIcon,
56
-        color: ColorPalette.white,
57
-        fontSize: 24
58
-    },
59 57
 
60 58
     /**
61 59
      * The style of the toolbar.
@@ -69,74 +67,60 @@ const styles = createStyleSheet({
69 67
         paddingHorizontal: BoxModel.margin
70 68
     },
71 69
 
72
-    /**
73
-     * The style of toolbar buttons.
74
-     */
75
-    toolbarButton,
76
-
77
-    /**
78
-     * The icon style of the toolbar buttons.
79
-     */
80
-    toolbarButtonIcon,
81
-
82 70
     /**
83 71
      * The style of the root/top-level {@link Container} of {@link Toolbox}.
84 72
      */
85 73
     toolbox: {
86 74
         flexDirection: 'column',
87 75
         flexGrow: 0
88
-    },
89
-
90
-    /**
91
-     * The style of toolbar buttons which display white icons.
92
-     */
93
-    whiteToolbarButton: {
94
-        ...toolbarButton,
95
-        backgroundColor: ColorPalette.buttonUnderlay
96
-    },
97
-
98
-    /**
99
-     * The icon style of toolbar buttons which display white icons.
100
-     */
101
-    whiteToolbarButtonIcon: {
102
-        ...toolbarButtonIcon,
103
-        color: ColorPalette.white
104 76
     }
105 77
 });
106 78
 
107 79
 export default styles;
108 80
 
109 81
 /**
110
- * Styles for the hangup button.
82
+ * Color schemed styles for the @{Toolbox} component.
111 83
  */
112
-export const hangupButtonStyles = {
113
-    iconStyle: styles.whiteToolbarButtonIcon,
114
-    style: styles.hangupButton,
115
-    underlayColor: ColorPalette.buttonUnderlay
116
-};
84
+ColorSchemeRegistry.register('Toolbox', {
85
+    /**
86
+     * Styles for buttons in the toolbar.
87
+     */
88
+    buttonStyles: {
89
+        iconStyle: toolbarButtonIcon,
90
+        style: toolbarButton
91
+    },
117 92
 
118
-/**
119
- * Styles for buttons in the toolbar.
120
- */
121
-export const toolbarButtonStyles = {
122
-    iconStyle: styles.toolbarButtonIcon,
123
-    style: styles.toolbarButton
124
-};
93
+    /**
94
+     * Overrides to the standard styles that we apply to the chat button, as
95
+     * that behaves slightly differently to other buttons.
96
+     */
97
+    chatButtonOverride: {
98
+        toggled: {
99
+            backgroundColor: ColorPalette.blue
100
+        }
101
+    },
125 102
 
126
-/**
127
- * Styles for toggled buttons in the toolbar.
128
- */
129
-export const toolbarToggledButtonStyles = {
130
-    iconStyle: styles.whiteToolbarButtonIcon,
131
-    style: styles.whiteToolbarButton
132
-};
103
+    hangupButtonStyles: {
104
+        iconStyle: whiteToolbarButtonIcon,
105
+        style: {
106
+            ...toolbarButton,
107
+            backgroundColor: schemeColor('hangup'),
108
+            borderRadius: HANGUP_BUTTON_SIZE / 2,
109
+            height: HANGUP_BUTTON_SIZE,
110
+            width: HANGUP_BUTTON_SIZE
111
+        },
112
+        underlayColor: ColorPalette.buttonUnderlay
113
+    },
133 114
 
134
-/**
135
- * Overrides to the standard styles that we apply to the chat button, as that
136
- * behaves slightly differently to other buttons.
137
- */
138
-export const chatButtonOverride = createStyleSheet({
139
-    toggled: {
140
-        backgroundColor: ColorPalette.blue
115
+    /**
116
+     * Styles for toggled buttons in the toolbar.
117
+     */
118
+    toggledButtonStyles: {
119
+        iconStyle: whiteToolbarButtonIcon,
120
+        style: {
121
+            ...whiteToolbarButton,
122
+            borderColor: schemeColor('buttonToggledBorder'),
123
+            borderWidth: 1
124
+        }
141 125
     }
142 126
 });

Loading…
取消
儲存