Browse Source

Fixed crash on nightmode toggle and proxiwash category selection + changed brand color

keplyx 5 years ago
parent
commit
3f8a33aced

+ 0
- 1
components/BaseContainer.js View File

@@ -46,7 +46,6 @@ export default class BaseContainer extends React.Component<Props, State> {
46 46
     }
47 47
 
48 48
     render() {
49
-        console.log(this.state.isOpen);
50 49
         return (
51 50
             <CustomSideMenu navigation={this.props.navigation} isOpen={this.state.isOpen}
52 51
                             onChange={(isOpen) => this.updateMenuState(isOpen)}>

+ 0
- 1
components/CustomSideMenu.js View File

@@ -14,7 +14,6 @@ type Props = {
14 14
 
15 15
 export default class CustomSideMenu extends React.Component<Props> {
16 16
     render() {
17
-        console.log(this.props.isOpen);
18 17
         return (
19 18
             <SideMenu menu={<SideBar navigation={this.props.navigation}/>}
20 19
                       isOpen={this.props.isOpen}

+ 10
- 10
native-base-theme/variables/platform.js View File

@@ -101,12 +101,12 @@ export default {
101 101
     CheckboxIconSize: platform === "ios" ? 21 : 16,
102 102
     CheckboxIconMarginTop: platform === "ios" ? undefined : 1,
103 103
     CheckboxFontSize: platform === "ios" ? 23 / 0.9 : 17,
104
-    checkboxBgColor: "#E4202D",
104
+    checkboxBgColor: "#be1522",
105 105
     checkboxSize: 20,
106 106
     checkboxTickColor: "#fff",
107 107
 
108 108
     // Color
109
-    brandPrimary: platform === "ios" ? "#e42612" : "#e42612",
109
+    brandPrimary: platform === "ios" ? "#be1522" : "#be1522",
110 110
     brandInfo: "#62B1F6",
111 111
     brandSuccess: "#5cb85c",
112 112
     brandDanger: "#d9534f",
@@ -149,14 +149,14 @@ export default {
149 149
     tabActiveBgColor: platform === "ios" ? "#cde1f9" : "#3F51B5",
150 150
 
151 151
     // Header
152
-    toolbarBtnColor: platform === "ios" ? "#e42612" : "#fff",
153
-    toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
152
+    toolbarBtnColor: platform === "ios" ? "#be1522" : "#fff",
153
+    toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#be1522",
154 154
     toolbarHeight: platform === "ios" ? 64 : 56,
155 155
     toolbarSearchIconSize: platform === "ios" ? 20 : 23,
156 156
     toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff",
157 157
     searchBarHeight: platform === "ios" ? 30 : 40,
158 158
     searchBarInputHeight: platform === "ios" ? 30 : 50,
159
-    toolbarBtnTextColor: platform === "ios" ? "#e42612" : "#fff",
159
+    toolbarBtnTextColor: platform === "ios" ? "#be1522" : "#fff",
160 160
     toolbarDefaultBorder: platform === "ios" ? "#a7a6ab" : "#ba1f0f",
161 161
     iosStatusbar: platform === "ios" ? "dark-content" : "light-content",
162 162
     get statusBarColor() {
@@ -194,7 +194,7 @@ export default {
194 194
     lineHeightH2: 27,
195 195
     lineHeightH3: 22,
196 196
     lineHeight: platform === "ios" ? 20 : 24,
197
-    listItemSelected: platform === "ios" ? "#e42612" : "#e42612",
197
+    listItemSelected: platform === "ios" ? "#be1522" : "#be1522",
198 198
 
199 199
     // List
200 200
     listBg: "transparent",
@@ -226,15 +226,15 @@ export default {
226 226
     segmentBorderColorMain: platform === "ios" ? "#a7a6ab" : "#3F51B5",
227 227
 
228 228
     // Spinner
229
-    defaultSpinnerColor: "#e42612",
229
+    defaultSpinnerColor: "#be1522",
230 230
     inverseSpinnerColor: "#1A191B",
231 231
 
232 232
     // Tab
233
-    tabDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
233
+    tabDefaultBg: platform === "ios" ? "#F8F8F8" : "#be1522",
234 234
     topTabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9",
235
-    topTabBarActiveTextColor: platform === "ios" ? "#e42612" : "#fff",
235
+    topTabBarActiveTextColor: platform === "ios" ? "#be1522" : "#fff",
236 236
     topTabBarBorderColor: platform === "ios" ? "#a7a6ab" : "#fff",
237
-    topTabBarActiveBorderColor: platform === "ios" ? "#e42612" : "#fff",
237
+    topTabBarActiveBorderColor: platform === "ios" ? "#be1522" : "#fff",
238 238
 
239 239
     // Tabs
240 240
     tabBgColor: "#F8F8F8",

+ 10
- 10
native-base-theme/variables/platformDark.js View File

@@ -106,7 +106,7 @@ export default {
106 106
     checkboxTickColor: "#fff",
107 107
 
108 108
     // Color
109
-    brandPrimary: platform === "ios" ? "#e42612" : "#e42612",
109
+    brandPrimary: platform === "ios" ? "#be1522" : "#be1522",
110 110
     brandInfo: "#62B1F6",
111 111
     brandSuccess: "#5cb85c",
112 112
     brandDanger: "#d9534f",
@@ -149,14 +149,14 @@ export default {
149 149
     tabActiveBgColor: platform === "ios" ? "#cde1f9" : "#3F51B5",
150 150
 
151 151
     // Header
152
-    toolbarBtnColor: platform === "ios" ? "#e42612" : "#fff",
153
-    toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
152
+    toolbarBtnColor: platform === "ios" ? "#be1522" : "#fff",
153
+    toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#be1522",
154 154
     toolbarHeight: platform === "ios" ? 64 : 56,
155 155
     toolbarSearchIconSize: platform === "ios" ? 20 : 23,
156 156
     toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff",
157 157
     searchBarHeight: platform === "ios" ? 30 : 40,
158 158
     searchBarInputHeight: platform === "ios" ? 30 : 50,
159
-    toolbarBtnTextColor: platform === "ios" ? "#e42612" : "#fff",
159
+    toolbarBtnTextColor: platform === "ios" ? "#be1522" : "#fff",
160 160
     toolbarDefaultBorder: platform === "ios" ? "#a7a6ab" : "#ba1f0f",
161 161
     iosStatusbar: platform === "ios" ? "dark-content" : "light-content",
162 162
     get statusBarColor() {
@@ -194,7 +194,7 @@ export default {
194 194
     lineHeightH2: 27,
195 195
     lineHeightH3: 22,
196 196
     lineHeight: platform === "ios" ? 20 : 24,
197
-    listItemSelected: platform === "ios" ? "#e42612" : "#e42612",
197
+    listItemSelected: "#be1522",
198 198
 
199 199
     // List
200 200
     listBg: "transparent",
@@ -214,7 +214,7 @@ export default {
214 214
     radioSelectedColorAndroid: "#E4202D",
215 215
     radioBtnLineHeight: platform === "ios" ? 29 : 24,
216 216
     get radioColor() {
217
-        return this.brandPrimary;
217
+        return "#be1522";
218 218
     },
219 219
 
220 220
     // Segment
@@ -226,15 +226,15 @@ export default {
226 226
     segmentBorderColorMain: platform === "ios" ? "#a7a6ab" : "#3F51B5",
227 227
 
228 228
     // Spinner
229
-    defaultSpinnerColor: "#e42612",
229
+    defaultSpinnerColor: "#be1522",
230 230
     inverseSpinnerColor: "#1A191B",
231 231
 
232 232
     // Tab
233
-    tabDefaultBg: platform === "ios" ? "#2b2b2b" : "#e42612",
233
+    tabDefaultBg: platform === "ios" ? "#2b2b2b" : "#be1522",
234 234
     topTabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9",
235
-    topTabBarActiveTextColor: platform === "ios" ? "#e42612" : "#fff",
235
+    topTabBarActiveTextColor: platform === "ios" ? "#be1522" : "#fff",
236 236
     topTabBarBorderColor: platform === "ios" ? "#a7a6ab" : "#fff",
237
-    topTabBarActiveBorderColor: platform === "ios" ? "#e42612" : "#fff",
237
+    topTabBarActiveBorderColor: platform === "ios" ? "#be1522" : "#fff",
238 238
 
239 239
     // Tabs
240 240
     tabBgColor: "#2b2b2b",

+ 2
- 2
navigation/AppNavigator.js View File

@@ -12,7 +12,7 @@ import AboutDependenciesScreen from '../screens/About/AboutDependenciesScreen';
12 12
  */
13 13
 export default createAppContainer(
14 14
     createStackNavigator({
15
-            Tabs: MainTabNavigator,
15
+            Main: MainTabNavigator,
16 16
             // Drawer: MainDrawerNavigator,
17 17
             ProximoListScreen: {screen: ProximoListScreen},
18 18
             SettingsScreen: {screen: SettingsScreen},
@@ -20,7 +20,7 @@ export default createAppContainer(
20 20
             AboutDependenciesScreen: {screen: AboutDependenciesScreen},
21 21
         },
22 22
         {
23
-            initialRouteName: "Tabs",
23
+            initialRouteName: "Main",
24 24
             mode: 'card',
25 25
             headerMode: "none"
26 26
         })

+ 3
- 2
navigation/MainTabNavigator.js View File

@@ -7,6 +7,7 @@ import ProxiwashScreen from '../screens/ProxiwashScreen';
7 7
 import ProximoMainScreen from '../screens/Proximo/ProximoMainScreen';
8 8
 import PlanexScreen from '../screens/PlanexScreen';
9 9
 import CustomMaterialIcon from "../components/CustomMaterialIcon";
10
+import ThemeManager from "../utils/ThemeManager";
10 11
 
11 12
 const TAB_ICONS = {
12 13
     Home: 'coffee',
@@ -34,7 +35,7 @@ export default createMaterialBottomTabNavigator({
34 35
     order: ['Proximo', 'Planning', 'Home', 'Proxiwash', 'Planex'],
35 36
     initialRouteName: 'Home',
36 37
     activeColor: '#f0edf6',
37
-    inactiveColor: '#7f150a',
38
+    inactiveColor: '#4e1108',
38 39
     backBehavior: 'initialRoute',
39
-    barStyle: {backgroundColor: '#e42612'},
40
+    barStyle: {backgroundColor: ThemeManager.getCurrentThemeVariables().brandPrimary},
40 41
 });

+ 26
- 28
screens/Proximo/ProximoListScreen.js View File

@@ -188,34 +188,32 @@ export default class ProximoListScreen extends React.Component<Props, State> {
188 188
 
189 189
         return (
190 190
             <Container>
191
-                <CustomHeader hasBackButton={true} navigation={nav} title={navType} rightMenu={
192
-                    <Right>
193
-                        <Menu
194
-                            ref={this.setMenuRef}
195
-                            button={
196
-                                <Touchable
197
-                                    style={{padding: 6}}
198
-                                    onPress={() =>
199
-                                        this._menu.show()
200
-                                    }>
201
-                                    <CustomMaterialIcon
202
-                                        color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
203
-                                        icon={'sort'}/>
204
-                                </Touchable>
205
-                            }
206
-                        >
207
-                            <MenuItem
208
-                                onPress={() => this.sortModeSelected(sortMode.name)}>
209
-                                {this.state.sortNameIcon}
210
-                                {i18n.t('proximoScreen.sortName')}
211
-                            </MenuItem>
212
-                            <MenuItem
213
-                                onPress={() => this.sortModeSelected(sortMode.price)}>
214
-                                {this.state.sortPriceIcon}
215
-                                {i18n.t('proximoScreen.sortPrice')}
216
-                            </MenuItem>
217
-                        </Menu>
218
-                    </Right>
191
+                <CustomHeader hasBackButton={true} navigation={nav} title={navType} rightButton={
192
+                    <Menu
193
+                        ref={this.setMenuRef}
194
+                        button={
195
+                            <Touchable
196
+                                style={{padding: 6}}
197
+                                onPress={() =>
198
+                                    this._menu.show()
199
+                                }>
200
+                                <CustomMaterialIcon
201
+                                    color={Platform.OS === 'ios' ? ThemeManager.getCurrentThemeVariables().brandPrimary : "#fff"}
202
+                                    icon={'sort'}/>
203
+                            </Touchable>
204
+                        }
205
+                    >
206
+                        <MenuItem
207
+                            onPress={() => this.sortModeSelected(sortMode.name)}>
208
+                            {this.state.sortNameIcon}
209
+                            {i18n.t('proximoScreen.sortName')}
210
+                        </MenuItem>
211
+                        <MenuItem
212
+                            onPress={() => this.sortModeSelected(sortMode.price)}>
213
+                            {this.state.sortPriceIcon}
214
+                            {i18n.t('proximoScreen.sortPrice')}
215
+                        </MenuItem>
216
+                    </Menu>
219 217
                 }/>
220 218
 
221 219
                 <Content>

+ 1
- 1
screens/SettingsScreen.js View File

@@ -101,7 +101,7 @@ export default class SettingsScreen extends React.Component<Props, State> {
101 101
             actions: [NavigationActions.navigate({routeName: 'Main'})],
102 102
         });
103 103
         this.props.navigation.dispatch(resetAction);
104
-        this.props.navigation.navigate('Settings');
104
+        // this.props.navigation.navigate('SettingsScreen');
105 105
     }
106 106
 
107 107
     /**

Loading…
Cancel
Save