소스 검색

fix(mobile-ui) patch for native dialog container, fixed switch track color

master
Calin Chitu 3 년 전
부모
커밋
20fd671b68

+ 22
- 0
patches/react-native-dialog+9.2.1.patch 파일 보기

@@ -0,0 +1,22 @@
1
+diff --git a/node_modules/react-native-dialog/lib/Container.js b/node_modules/react-native-dialog/lib/Container.js
2
+index 69e3764..109126f 100644
3
+--- a/node_modules/react-native-dialog/lib/Container.js
4
++++ b/node_modules/react-native-dialog/lib/Container.js
5
+@@ -82,7 +82,7 @@ DialogContainer.propTypes = {
6
+     useNativeDriver: PropTypes.bool,
7
+     children: PropTypes.node.isRequired,
8
+ };
9
+-const buildStyles = () => StyleSheet.create({
10
++const buildStyles = (isDark) => StyleSheet.create({
11
+     centeredView: {
12
+         marginTop: 22,
13
+     },
14
+@@ -103,7 +103,7 @@ const buildStyles = () => StyleSheet.create({
15
+             overflow: "hidden",
16
+         },
17
+         android: {
18
+-            backgroundColor: PlatformColor("?attr/colorBackgroundFloating"),
19
++            backgroundColor: PlatformColor(`@android:color/${isDark ? "background_dark" : "background_light"}`),
20
+             flexDirection: "column",
21
+             borderRadius: 3,
22
+             padding: 16,

+ 5
- 2
react/features/base/ui/Tokens.js 파일 보기

@@ -266,8 +266,11 @@ export const colorMap = {
266 266
     // Color for disabled tab
267 267
     tab01Disabled: 'disabled01',
268 268
 
269
-    // Color for enabled lobby mode switch
270
-    lobbySwitch01Active: 'success04',
269
+    // Color for enabled switch
270
+    switch01Enabled: 'success04',
271
+
272
+    // Color for disabled switch
273
+    switch01Disabled: 'surface06',
271 274
 
272 275
     // Color for disabled video switch
273 276
     video01Disabled: 'disabled01',

+ 10
- 2
react/features/lobby/components/native/LobbyModeSwitch.js 파일 보기

@@ -5,8 +5,13 @@ import { Switch, View } from 'react-native';
5 5
 
6 6
 import { translate } from '../../../base/i18n';
7 7
 import { connect } from '../../../base/redux';
8
+import {
9
+    DISABLED_TRACK_COLOR,
10
+    ENABLED_TRACK_COLOR,
11
+    THUMB_COLOR
12
+} from '../../../welcome/components/native/settings/components/styles';
8 13
 
9
-import styles, { ENABLED_TRACK_COLOR, THUMB_COLOR } from './styles';
14
+import styles from './styles';
10 15
 
11 16
 /**
12 17
  * The type of the React {@code Component} props of {@link LobbyModeSwitch}.
@@ -41,7 +46,10 @@ function LobbyModeSwitch(
41 46
                 onValueChange = { onToggleLobbyMode }
42 47
                 style = { styles.lobbySwitchIcon }
43 48
                 thumbColor = { THUMB_COLOR }
44
-                trackColor = {{ true: ENABLED_TRACK_COLOR }}
49
+                trackColor = {{
50
+                    true: ENABLED_TRACK_COLOR,
51
+                    false: DISABLED_TRACK_COLOR
52
+                }}
45 53
                 value = { lobbyEnabled } />
46 54
         </View>
47 55
     );

+ 0
- 3
react/features/lobby/components/native/styles.js 파일 보기

@@ -4,9 +4,6 @@ import BaseTheme from '../../../base/ui/components/BaseTheme';
4 4
 
5 5
 const SECONDARY_COLOR = BaseTheme.palette.border04;
6 6
 
7
-export const ENABLED_TRACK_COLOR = BaseTheme.palette.lobbySwitch01Active;
8
-export const THUMB_COLOR = BaseTheme.palette.field02;
9
-
10 7
 export default {
11 8
     button: {
12 9
         alignItems: 'center',

+ 11
- 10
react/features/welcome/components/native/settings/components/SettingsView.js 파일 보기

@@ -258,8 +258,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
258 258
                                 onValueChange = { this._onStartAudioMutedChange }
259 259
                                 thumbColor = { THUMB_COLOR }
260 260
                                 trackColor = {{
261
-                                    false: DISABLED_TRACK_COLOR,
262
-                                    true: ENABLED_TRACK_COLOR
261
+                                    true: ENABLED_TRACK_COLOR,
262
+                                    false: DISABLED_TRACK_COLOR
263 263
                                 }}
264 264
                                 value = { startWithAudioMuted } />
265 265
                         </FormRow>
@@ -269,8 +269,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
269 269
                                 onValueChange = { this._onStartVideoMutedChange }
270 270
                                 thumbColor = { THUMB_COLOR }
271 271
                                 trackColor = {{
272
-                                    false: DISABLED_TRACK_COLOR,
273
-                                    true: ENABLED_TRACK_COLOR
272
+                                    true: ENABLED_TRACK_COLOR,
273
+                                    false: DISABLED_TRACK_COLOR
274 274
                                 }}
275 275
                                 value = { startWithVideoMuted } />
276 276
                         </FormRow>
@@ -298,8 +298,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
298 298
                                         onValueChange = { this._onDisableCallIntegration }
299 299
                                         thumbColor = { THUMB_COLOR }
300 300
                                         trackColor = {{
301
-                                            false: DISABLED_TRACK_COLOR,
302
-                                            true: ENABLED_TRACK_COLOR
301
+                                            true: ENABLED_TRACK_COLOR,
302
+                                            false: DISABLED_TRACK_COLOR
303 303
                                         }}
304 304
                                         value = { disableCallIntegration } />
305 305
                                 </FormRow>
@@ -312,8 +312,9 @@ class SettingsView extends AbstractSettingsView<Props, State> {
312 312
                                 onValueChange = { this._onDisableP2P }
313 313
                                 thumbColor = { THUMB_COLOR }
314 314
                                 trackColor = {{
315
-                                    false: DISABLED_TRACK_COLOR,
316
-                                    true: ENABLED_TRACK_COLOR }}
315
+                                    true: ENABLED_TRACK_COLOR,
316
+                                    false: DISABLED_TRACK_COLOR
317
+                                }}
317 318
                                 value = { disableP2P } />
318 319
                         </FormRow>
319 320
                         <Divider style = { styles.fieldSeparator } />
@@ -325,8 +326,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
325 326
                                     onValueChange = { this._onDisableCrashReporting }
326 327
                                     thumbColor = { THUMB_COLOR }
327 328
                                     trackColor = {{
328
-                                        false: DISABLED_TRACK_COLOR,
329
-                                        true: ENABLED_TRACK_COLOR
329
+                                        true: ENABLED_TRACK_COLOR,
330
+                                        false: DISABLED_TRACK_COLOR
330 331
                                     }}
331 332
                                     value = { disableCrashReporting } />
332 333
                             </FormRow>

+ 2
- 2
react/features/welcome/components/native/settings/components/styles.js 파일 보기

@@ -1,8 +1,8 @@
1 1
 import BaseTheme from '../../../../../base/ui/components/BaseTheme.native';
2 2
 export const ANDROID_UNDERLINE_COLOR = 'transparent';
3 3
 export const PLACEHOLDER_COLOR = BaseTheme.palette.action02Focus;
4
-export const ENABLED_TRACK_COLOR = BaseTheme.palette.lobbySwitch01Active;
5
-export const DISABLED_TRACK_COLOR = BaseTheme.palette.ui02;
4
+export const ENABLED_TRACK_COLOR = BaseTheme.palette.switch01Enabled;
5
+export const DISABLED_TRACK_COLOR = BaseTheme.palette.switch01Disabled;
6 6
 export const THUMB_COLOR = BaseTheme.palette.field02;
7 7
 
8 8
 const TEXT_SIZE = 14;

Loading…
취소
저장