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

pull/11011/head
Calin Chitu 3 years ago committed by Saúl Ibarra Corretgé
parent fd9d19a951
commit 20fd671b68
  1. 22
      patches/react-native-dialog+9.2.1.patch
  2. 7
      react/features/base/ui/Tokens.js
  3. 12
      react/features/lobby/components/native/LobbyModeSwitch.js
  4. 3
      react/features/lobby/components/native/styles.js
  5. 21
      react/features/welcome/components/native/settings/components/SettingsView.js
  6. 4
      react/features/welcome/components/native/settings/components/styles.js

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

@ -266,8 +266,11 @@ export const colorMap = {
// Color for disabled tab
tab01Disabled: 'disabled01',
// Color for enabled lobby mode switch
lobbySwitch01Active: 'success04',
// Color for enabled switch
switch01Enabled: 'success04',
// Color for disabled switch
switch01Disabled: 'surface06',
// Color for disabled video switch
video01Disabled: 'disabled01',

@ -5,8 +5,13 @@ import { Switch, View } from 'react-native';
import { translate } from '../../../base/i18n';
import { connect } from '../../../base/redux';
import {
DISABLED_TRACK_COLOR,
ENABLED_TRACK_COLOR,
THUMB_COLOR
} from '../../../welcome/components/native/settings/components/styles';
import styles, { ENABLED_TRACK_COLOR, THUMB_COLOR } from './styles';
import styles from './styles';
/**
* The type of the React {@code Component} props of {@link LobbyModeSwitch}.
@ -41,7 +46,10 @@ function LobbyModeSwitch(
onValueChange = { onToggleLobbyMode }
style = { styles.lobbySwitchIcon }
thumbColor = { THUMB_COLOR }
trackColor = {{ true: ENABLED_TRACK_COLOR }}
trackColor = {{
true: ENABLED_TRACK_COLOR,
false: DISABLED_TRACK_COLOR
}}
value = { lobbyEnabled } />
</View>
);

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

@ -258,8 +258,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
onValueChange = { this._onStartAudioMutedChange }
thumbColor = { THUMB_COLOR }
trackColor = {{
false: DISABLED_TRACK_COLOR,
true: ENABLED_TRACK_COLOR
true: ENABLED_TRACK_COLOR,
false: DISABLED_TRACK_COLOR
}}
value = { startWithAudioMuted } />
</FormRow>
@ -269,8 +269,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
onValueChange = { this._onStartVideoMutedChange }
thumbColor = { THUMB_COLOR }
trackColor = {{
false: DISABLED_TRACK_COLOR,
true: ENABLED_TRACK_COLOR
true: ENABLED_TRACK_COLOR,
false: DISABLED_TRACK_COLOR
}}
value = { startWithVideoMuted } />
</FormRow>
@ -298,8 +298,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
onValueChange = { this._onDisableCallIntegration }
thumbColor = { THUMB_COLOR }
trackColor = {{
false: DISABLED_TRACK_COLOR,
true: ENABLED_TRACK_COLOR
true: ENABLED_TRACK_COLOR,
false: DISABLED_TRACK_COLOR
}}
value = { disableCallIntegration } />
</FormRow>
@ -312,8 +312,9 @@ class SettingsView extends AbstractSettingsView<Props, State> {
onValueChange = { this._onDisableP2P }
thumbColor = { THUMB_COLOR }
trackColor = {{
false: DISABLED_TRACK_COLOR,
true: ENABLED_TRACK_COLOR }}
true: ENABLED_TRACK_COLOR,
false: DISABLED_TRACK_COLOR
}}
value = { disableP2P } />
</FormRow>
<Divider style = { styles.fieldSeparator } />
@ -325,8 +326,8 @@ class SettingsView extends AbstractSettingsView<Props, State> {
onValueChange = { this._onDisableCrashReporting }
thumbColor = { THUMB_COLOR }
trackColor = {{
false: DISABLED_TRACK_COLOR,
true: ENABLED_TRACK_COLOR
true: ENABLED_TRACK_COLOR,
false: DISABLED_TRACK_COLOR
}}
value = { disableCrashReporting } />
</FormRow>

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

Loading…
Cancel
Save