Browse Source

Added spinner on first load

keplyx 4 years ago
parent
commit
c60fb5291c

+ 14
- 9
components/FetchedDataSectionList.js View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 import * as React from 'react';
4 4
 import WebDataManager from "../utils/WebDataManager";
5
-import {Container, H3, Tab, TabHeading, Tabs, Text} from "native-base";
5
+import {Container, H3, Spinner, Tab, TabHeading, Tabs, Text} from "native-base";
6 6
 import CustomHeader from "./CustomHeader";
7 7
 import {RefreshControl, SectionList, View} from "react-native";
8 8
 import CustomMaterialIcon from "./CustomMaterialIcon";
@@ -50,7 +50,7 @@ export default class FetchedDataSectionList extends React.Component<Props, State
50 50
      * Get the translation for the header in the current language
51 51
      * @return {string}
52 52
      */
53
-    getHeaderTranslation() : string {
53
+    getHeaderTranslation(): string {
54 54
         return "Header";
55 55
     }
56 56
 
@@ -152,10 +152,11 @@ export default class FetchedDataSectionList extends React.Component<Props, State
152 152
      * No need to be overridden, has good defaults.
153 153
      *
154 154
      * @param text
155
+     * @param isSpinner
155 156
      * @param icon
156 157
      * @return {*}
157 158
      */
158
-    getEmptyRenderItem(text: string, icon: string) {
159
+    getEmptyRenderItem(text: string, isSpinner: boolean, icon: string) {
159 160
         return (
160 161
             <View>
161 162
                 <View style={{
@@ -165,11 +166,14 @@ export default class FetchedDataSectionList extends React.Component<Props, State
165 166
                     height: 100,
166 167
                     marginBottom: 20
167 168
                 }}>
168
-                    <CustomMaterialIcon
169
-                        icon={icon}
170
-                        fontSize={100}
171
-                        width={100}
172
-                        color={ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText}/>
169
+                    {isSpinner ?
170
+                        <Spinner/>
171
+                        :
172
+                        <CustomMaterialIcon
173
+                            icon={icon}
174
+                            fontSize={100}
175
+                            width={100}
176
+                            color={ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText}/>}
173 177
                 </View>
174 178
 
175 179
                 <H3 style={{
@@ -209,6 +213,7 @@ export default class FetchedDataSectionList extends React.Component<Props, State
209 213
                         text: this.state.refreshing ?
210 214
                             i18n.t('general.loading') :
211 215
                             i18n.t('general.networkError'),
216
+                        isSpinner: this.state.refreshing,
212 217
                         icon: this.state.refreshing ?
213 218
                             'refresh' :
214 219
                             'access-point-network-off'
@@ -256,7 +261,7 @@ export default class FetchedDataSectionList extends React.Component<Props, State
256 261
                 }
257 262
                 renderItem={({item, section}) =>
258 263
                     isEmpty ?
259
-                        this.getEmptyRenderItem(item.text, item.icon) :
264
+                        this.getEmptyRenderItem(item.text, item.isSpinner, item.icon) :
260 265
                         this.getRenderItem(item, section, dataset)
261 266
                 }
262 267
                 style={{minHeight: 300, width: '100%'}}

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

@@ -2,295 +2,295 @@
2 2
 
3 3
 import color from "color";
4 4
 
5
-import { Platform, Dimensions, PixelRatio } from "react-native";
5
+import {Dimensions, PixelRatio, Platform} from "react-native";
6 6
 
7 7
 const deviceHeight = Dimensions.get("window").height;
8 8
 const deviceWidth = Dimensions.get("window").width;
9 9
 const platform = Platform.OS;
10 10
 const platformStyle = undefined;
11 11
 const isIphoneX =
12
-platform === "ios" && (deviceHeight === 812 || deviceWidth === 812 || deviceHeight === 896 || deviceWidth === 896);
12
+    platform === "ios" && (deviceHeight === 812 || deviceWidth === 812 || deviceHeight === 896 || deviceWidth === 896);
13 13
 
14 14
 export default {
15
-  platformStyle,
16
-  platform,
17
-
18
-  //Accordion
19
-  headerStyle: "#edebed",
20
-  iconStyle: "#000",
21
-  contentStyle: "#f5f4f5",
22
-  expandedIconStyle: "#000",
23
-  accordionBorderColor: "#d3d3d3",
24
-
25
-  // Android
26
-  androidRipple: true,
27
-  androidRippleColor: "rgba(256, 256, 256, 0.3)",
28
-  androidRippleColorDark: "rgba(0, 0, 0, 0.15)",
29
-  btnUppercaseAndroidText: true,
30
-
31
-  // Badge
32
-  badgeBg: "#ED1727",
33
-  badgeColor: "#fff",
34
-  badgePadding: platform === "ios" ? 3 : 0,
35
-
36
-  // Button
37
-  btnFontFamily: platform === "ios" ? "System" : "Roboto_medium",
38
-  btnTextColor: '#fff',
39
-  btnDisabledBg: "#b5b5b5",
40
-  buttonPadding: 6,
41
-  get btnPrimaryBg() {
42
-    return this.brandPrimary;
43
-  },
44
-  get btnPrimaryColor() {
45
-    return this.inverseTextColor;
46
-  },
47
-  get btnInfoBg() {
48
-    return this.brandInfo;
49
-  },
50
-  get btnInfoColor() {
51
-    return this.inverseTextColor;
52
-  },
53
-  get btnSuccessBg() {
54
-    return this.brandSuccess;
55
-  },
56
-  get btnSuccessColor() {
57
-    return this.inverseTextColor;
58
-  },
59
-  get btnDangerBg() {
60
-    return this.brandDanger;
61
-  },
62
-  get btnDangerColor() {
63
-    return this.inverseTextColor;
64
-  },
65
-  get btnWarningBg() {
66
-    return this.brandWarning;
67
-  },
68
-  get btnWarningColor() {
69
-    return this.inverseTextColor;
70
-  },
71
-  get btnTextSize() {
72
-    return platform === "ios" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1;
73
-  },
74
-  get btnTextSizeLarge() {
75
-    return this.fontSizeBase * 1.5;
76
-  },
77
-  get btnTextSizeSmall() {
78
-    return this.fontSizeBase * 0.8;
79
-  },
80
-  get borderRadiusLarge() {
81
-    return this.fontSizeBase * 3.8;
82
-  },
83
-  get iconSizeLarge() {
84
-    return this.iconFontSize * 1.5;
85
-  },
86
-  get iconSizeSmall() {
87
-    return this.iconFontSize * 0.6;
88
-  },
89
-
90
-  // Card
91
-  cardDefaultBg: "#fff",
92
-  cardBorderColor: "#ccc",
93
-  cardBorderRadius: 2,
94
-  cardItemPadding: platform === "ios" ? 10 : 12,
95
-
96
-  // CheckBox
97
-  CheckboxRadius: platform === "ios" ? 13 : 0,
98
-  CheckboxBorderWidth: platform === "ios" ? 1 : 2,
99
-  CheckboxPaddingLeft: platform === "ios" ? 4 : 2,
100
-  CheckboxPaddingBottom: platform === "ios" ? 0 : 5,
101
-  CheckboxIconSize: platform === "ios" ? 21 : 16,
102
-  CheckboxIconMarginTop: platform === "ios" ? undefined : 1,
103
-  CheckboxFontSize: platform === "ios" ? 23 / 0.9 : 17,
104
-  checkboxBgColor: "#E4202D",
105
-  checkboxSize: 20,
106
-  checkboxTickColor: "#fff",
107
-
108
-  // Color
109
-  brandPrimary: platform === "ios" ? "#e42612" : "#e42612",
110
-  brandInfo: "#62B1F6",
111
-  brandSuccess: "#5cb85c",
112
-  brandDanger: "#d9534f",
113
-  brandWarning: "#f0ad4e",
114
-  brandDark: "#000",
115
-  brandLight: "#f4f4f4",
116
-
117
-  //Container
118
-  containerBgColor: "#fff",
119
-
120
-  //Date Picker
121
-  datePickerTextColor: "#000",
122
-  datePickerBg: "transparent",
123
-
124
-  // Font
125
-  DefaultFontSize: 16,
126
-  fontFamily: platform === "ios" ? "System" : "Roboto",
127
-  fontSizeBase: 15,
128
-  get fontSizeH1() {
129
-    return this.fontSizeBase * 1.8;
130
-  },
131
-  get fontSizeH2() {
132
-    return this.fontSizeBase * 1.6;
133
-  },
134
-  get fontSizeH3() {
135
-    return this.fontSizeBase * 1.4;
136
-  },
137
-
138
-  // Footer
139
-  footerHeight: 55,
140
-  footerDefaultBg: platform === "ios" ? "#F8F8F8" : "#3F51B5",
141
-  footerPaddingBottom: 0,
142
-
143
-  // FooterTab
144
-  tabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9",
145
-  tabBarTextSize: platform === "ios" ? 14 : 11,
146
-  activeTab: platform === "ios" ? "#007aff" : "#fff",
147
-  sTabBarActiveTextColor: "#007aff",
148
-  tabBarActiveTextColor: platform === "ios" ? "#007aff" : "#fff",
149
-  tabActiveBgColor: platform === "ios" ? "#cde1f9" : "#3F51B5",
150
-
151
-  // Header
152
-  toolbarBtnColor: platform === "ios" ? "#e42612" : "#fff",
153
-  toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
154
-  toolbarHeight: platform === "ios" ? 64 : 56,
155
-  toolbarSearchIconSize: platform === "ios" ? 20 : 23,
156
-  toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff",
157
-  searchBarHeight: platform === "ios" ? 30 : 40,
158
-  searchBarInputHeight: platform === "ios" ? 30 : 50,
159
-  toolbarBtnTextColor: platform === "ios" ? "#e42612" : "#fff",
160
-  toolbarDefaultBorder: platform === "ios" ? "#a7a6ab" : "#ba1f0f",
161
-  iosStatusbar: platform === "ios" ? "dark-content" : "light-content",
162
-  get statusBarColor() {
163
-    return color(this.toolbarDefaultBg)
164
-      .darken(0.2)
165
-      .hex();
166
-  },
167
-  get darkenHeader() {
168
-    return color(this.tabBgColor)
169
-      .darken(0.03)
170
-      .hex();
171
-  },
172
-
173
-  // Icon
174
-  iconFamily: "Ionicons",
175
-  iconFontSize: platform === "ios" ? 30 : 28,
176
-  iconHeaderSize: platform === "ios" ? 33 : 24,
177
-
178
-  // InputGroup
179
-  inputFontSize: 17,
180
-  inputBorderColor: "#D9D5DC",
181
-  inputSuccessBorderColor: "#2b8339",
182
-  inputErrorBorderColor: "#ed2f2f",
183
-  inputHeightBase: 50,
184
-  get inputColor() {
185
-    return this.textColor;
186
-  },
187
-  get inputColorPlaceholder() {
188
-    return "#575757";
189
-  },
190
-
191
-  // Line Height
192
-  btnLineHeight: 19,
193
-  lineHeightH1: 32,
194
-  lineHeightH2: 27,
195
-  lineHeightH3: 22,
196
-  lineHeight: platform === "ios" ? 20 : 24,
197
-  listItemSelected: platform === "ios" ? "#e42612" : "#e42612",
198
-
199
-  // List
200
-  listBg: "transparent",
201
-  listBorderColor: "#c9c9c9",
202
-  listDividerBg: "#f4f4f4",
203
-  listBtnUnderlayColor: "#DDD",
204
-  listItemPadding: platform === "ios" ? 10 : 12,
205
-  listNoteColor: "#808080",
206
-  listNoteSize: 13,
207
-
208
-  // Progress Bar
209
-  defaultProgressColor: "#E4202D",
210
-  inverseProgressColor: "#1A191B",
211
-
212
-  // Radio Button
213
-  radioBtnSize: platform === "ios" ? 25 : 23,
214
-  radioSelectedColorAndroid: "#E4202D",
215
-  radioBtnLineHeight: platform === "ios" ? 29 : 24,
216
-  get radioColor() {
217
-    return this.brandPrimary;
218
-  },
219
-
220
-  // Segment
221
-  segmentBackgroundColor: platform === "ios" ? "#F8F8F8" : "#3F51B5",
222
-  segmentActiveBackgroundColor: platform === "ios" ? "#007aff" : "#fff",
223
-  segmentTextColor: platform === "ios" ? "#007aff" : "#fff",
224
-  segmentActiveTextColor: platform === "ios" ? "#fff" : "#3F51B5",
225
-  segmentBorderColor: platform === "ios" ? "#007aff" : "#fff",
226
-  segmentBorderColorMain: platform === "ios" ? "#a7a6ab" : "#3F51B5",
227
-
228
-  // Spinner
229
-  defaultSpinnerColor: "#45D56E",
230
-  inverseSpinnerColor: "#1A191B",
231
-
232
-  // Tab
233
-  tabDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
234
-  topTabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9",
235
-  topTabBarActiveTextColor: platform === "ios" ? "#e42612" : "#fff",
236
-  topTabBarBorderColor: platform === "ios" ? "#a7a6ab" : "#fff",
237
-  topTabBarActiveBorderColor: platform === "ios" ? "#e42612" : "#fff",
238
-
239
-  // Tabs
240
-  tabBgColor: "#F8F8F8",
241
-  tabFontSize: 15,
242
-
243
-  // Text
244
-  textColor: "#000",
245
-  inverseTextColor: "#fff",
246
-  noteFontSize: 14,
247
-  get defaultTextColor() {
248
-    return this.textColor;
249
-  },
250
-
251
-  // Title
252
-  titleFontfamily: platform === "ios" ? "System" : "Roboto_medium",
253
-  titleFontSize: platform === "ios" ? 17 : 19,
254
-  subTitleFontSize: platform === "ios" ? 11 : 14,
255
-  subtitleColor: platform === "ios" ? "#8e8e93" : "#FFF",
256
-  titleFontColor: platform === "ios" ? "#000" : "#FFF",
257
-
258
-
259
-  // CUSTOM
260
-  customMaterialIconColor: "#5d5d5d",
261
-  fetchedDataSectionListErrorText : "#898989",
262
-
263
-  // PROXIWASH
264
-  proxiwashFinishedColor: "rgba(54,165,22,0.31)",
265
-  proxiwashReadyColor: "transparent",
266
-  proxiwashRunningColor: "rgba(94,104,241,0.3)",
267
-  proxiwashBrokenColor: "rgba(162,162,162,0.31)",
268
-  proxiwashErrorColor: "rgba(204,7,0,0.31)",
269
-
270
-  // Other
271
-  borderRadiusBase: platform === "ios" ? 5 : 2,
272
-  borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
273
-  contentPadding: 10,
274
-  dropdownLinkColor: "#414142",
275
-  inputLineHeight: 24,
276
-  deviceWidth,
277
-  deviceHeight,
278
-  isIphoneX,
279
-  inputGroupRoundedBorderRadius: 30,
280
-
281
-  //iPhoneX SafeArea
282
-  Inset: {
283
-    portrait: {
284
-      topInset: 24,
285
-      leftInset: 0,
286
-      rightInset: 0,
287
-      bottomInset: 34
15
+    platformStyle,
16
+    platform,
17
+
18
+    //Accordion
19
+    headerStyle: "#edebed",
20
+    iconStyle: "#000",
21
+    contentStyle: "#f5f4f5",
22
+    expandedIconStyle: "#000",
23
+    accordionBorderColor: "#d3d3d3",
24
+
25
+    // Android
26
+    androidRipple: true,
27
+    androidRippleColor: "rgba(256, 256, 256, 0.3)",
28
+    androidRippleColorDark: "rgba(0, 0, 0, 0.15)",
29
+    btnUppercaseAndroidText: true,
30
+
31
+    // Badge
32
+    badgeBg: "#ED1727",
33
+    badgeColor: "#fff",
34
+    badgePadding: platform === "ios" ? 3 : 0,
35
+
36
+    // Button
37
+    btnFontFamily: platform === "ios" ? "System" : "Roboto_medium",
38
+    btnTextColor: '#fff',
39
+    btnDisabledBg: "#b5b5b5",
40
+    buttonPadding: 6,
41
+    get btnPrimaryBg() {
42
+        return this.brandPrimary;
288 43
     },
289
-    landscape: {
290
-      topInset: 0,
291
-      leftInset: 44,
292
-      rightInset: 44,
293
-      bottomInset: 21
44
+    get btnPrimaryColor() {
45
+        return this.inverseTextColor;
46
+    },
47
+    get btnInfoBg() {
48
+        return this.brandInfo;
49
+    },
50
+    get btnInfoColor() {
51
+        return this.inverseTextColor;
52
+    },
53
+    get btnSuccessBg() {
54
+        return this.brandSuccess;
55
+    },
56
+    get btnSuccessColor() {
57
+        return this.inverseTextColor;
58
+    },
59
+    get btnDangerBg() {
60
+        return this.brandDanger;
61
+    },
62
+    get btnDangerColor() {
63
+        return this.inverseTextColor;
64
+    },
65
+    get btnWarningBg() {
66
+        return this.brandWarning;
67
+    },
68
+    get btnWarningColor() {
69
+        return this.inverseTextColor;
70
+    },
71
+    get btnTextSize() {
72
+        return platform === "ios" ? this.fontSizeBase * 1.1 : this.fontSizeBase - 1;
73
+    },
74
+    get btnTextSizeLarge() {
75
+        return this.fontSizeBase * 1.5;
76
+    },
77
+    get btnTextSizeSmall() {
78
+        return this.fontSizeBase * 0.8;
79
+    },
80
+    get borderRadiusLarge() {
81
+        return this.fontSizeBase * 3.8;
82
+    },
83
+    get iconSizeLarge() {
84
+        return this.iconFontSize * 1.5;
85
+    },
86
+    get iconSizeSmall() {
87
+        return this.iconFontSize * 0.6;
88
+    },
89
+
90
+    // Card
91
+    cardDefaultBg: "#fff",
92
+    cardBorderColor: "#ccc",
93
+    cardBorderRadius: 2,
94
+    cardItemPadding: platform === "ios" ? 10 : 12,
95
+
96
+    // CheckBox
97
+    CheckboxRadius: platform === "ios" ? 13 : 0,
98
+    CheckboxBorderWidth: platform === "ios" ? 1 : 2,
99
+    CheckboxPaddingLeft: platform === "ios" ? 4 : 2,
100
+    CheckboxPaddingBottom: platform === "ios" ? 0 : 5,
101
+    CheckboxIconSize: platform === "ios" ? 21 : 16,
102
+    CheckboxIconMarginTop: platform === "ios" ? undefined : 1,
103
+    CheckboxFontSize: platform === "ios" ? 23 / 0.9 : 17,
104
+    checkboxBgColor: "#E4202D",
105
+    checkboxSize: 20,
106
+    checkboxTickColor: "#fff",
107
+
108
+    // Color
109
+    brandPrimary: platform === "ios" ? "#e42612" : "#e42612",
110
+    brandInfo: "#62B1F6",
111
+    brandSuccess: "#5cb85c",
112
+    brandDanger: "#d9534f",
113
+    brandWarning: "#f0ad4e",
114
+    brandDark: "#000",
115
+    brandLight: "#f4f4f4",
116
+
117
+    //Container
118
+    containerBgColor: "#fff",
119
+
120
+    //Date Picker
121
+    datePickerTextColor: "#000",
122
+    datePickerBg: "transparent",
123
+
124
+    // Font
125
+    DefaultFontSize: 16,
126
+    fontFamily: platform === "ios" ? "System" : "Roboto",
127
+    fontSizeBase: 15,
128
+    get fontSizeH1() {
129
+        return this.fontSizeBase * 1.8;
130
+    },
131
+    get fontSizeH2() {
132
+        return this.fontSizeBase * 1.6;
133
+    },
134
+    get fontSizeH3() {
135
+        return this.fontSizeBase * 1.4;
136
+    },
137
+
138
+    // Footer
139
+    footerHeight: 55,
140
+    footerDefaultBg: platform === "ios" ? "#F8F8F8" : "#3F51B5",
141
+    footerPaddingBottom: 0,
142
+
143
+    // FooterTab
144
+    tabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9",
145
+    tabBarTextSize: platform === "ios" ? 14 : 11,
146
+    activeTab: platform === "ios" ? "#007aff" : "#fff",
147
+    sTabBarActiveTextColor: "#007aff",
148
+    tabBarActiveTextColor: platform === "ios" ? "#007aff" : "#fff",
149
+    tabActiveBgColor: platform === "ios" ? "#cde1f9" : "#3F51B5",
150
+
151
+    // Header
152
+    toolbarBtnColor: platform === "ios" ? "#e42612" : "#fff",
153
+    toolbarDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
154
+    toolbarHeight: platform === "ios" ? 64 : 56,
155
+    toolbarSearchIconSize: platform === "ios" ? 20 : 23,
156
+    toolbarInputColor: platform === "ios" ? "#CECDD2" : "#fff",
157
+    searchBarHeight: platform === "ios" ? 30 : 40,
158
+    searchBarInputHeight: platform === "ios" ? 30 : 50,
159
+    toolbarBtnTextColor: platform === "ios" ? "#e42612" : "#fff",
160
+    toolbarDefaultBorder: platform === "ios" ? "#a7a6ab" : "#ba1f0f",
161
+    iosStatusbar: platform === "ios" ? "dark-content" : "light-content",
162
+    get statusBarColor() {
163
+        return color(this.toolbarDefaultBg)
164
+            .darken(0.2)
165
+            .hex();
166
+    },
167
+    get darkenHeader() {
168
+        return color(this.tabBgColor)
169
+            .darken(0.03)
170
+            .hex();
171
+    },
172
+
173
+    // Icon
174
+    iconFamily: "Ionicons",
175
+    iconFontSize: platform === "ios" ? 30 : 28,
176
+    iconHeaderSize: platform === "ios" ? 33 : 24,
177
+
178
+    // InputGroup
179
+    inputFontSize: 17,
180
+    inputBorderColor: "#D9D5DC",
181
+    inputSuccessBorderColor: "#2b8339",
182
+    inputErrorBorderColor: "#ed2f2f",
183
+    inputHeightBase: 50,
184
+    get inputColor() {
185
+        return this.textColor;
186
+    },
187
+    get inputColorPlaceholder() {
188
+        return "#575757";
189
+    },
190
+
191
+    // Line Height
192
+    btnLineHeight: 19,
193
+    lineHeightH1: 32,
194
+    lineHeightH2: 27,
195
+    lineHeightH3: 22,
196
+    lineHeight: platform === "ios" ? 20 : 24,
197
+    listItemSelected: platform === "ios" ? "#e42612" : "#e42612",
198
+
199
+    // List
200
+    listBg: "transparent",
201
+    listBorderColor: "#c9c9c9",
202
+    listDividerBg: "#f4f4f4",
203
+    listBtnUnderlayColor: "#DDD",
204
+    listItemPadding: platform === "ios" ? 10 : 12,
205
+    listNoteColor: "#808080",
206
+    listNoteSize: 13,
207
+
208
+    // Progress Bar
209
+    defaultProgressColor: "#E4202D",
210
+    inverseProgressColor: "#1A191B",
211
+
212
+    // Radio Button
213
+    radioBtnSize: platform === "ios" ? 25 : 23,
214
+    radioSelectedColorAndroid: "#E4202D",
215
+    radioBtnLineHeight: platform === "ios" ? 29 : 24,
216
+    get radioColor() {
217
+        return this.brandPrimary;
218
+    },
219
+
220
+    // Segment
221
+    segmentBackgroundColor: platform === "ios" ? "#F8F8F8" : "#3F51B5",
222
+    segmentActiveBackgroundColor: platform === "ios" ? "#007aff" : "#fff",
223
+    segmentTextColor: platform === "ios" ? "#007aff" : "#fff",
224
+    segmentActiveTextColor: platform === "ios" ? "#fff" : "#3F51B5",
225
+    segmentBorderColor: platform === "ios" ? "#007aff" : "#fff",
226
+    segmentBorderColorMain: platform === "ios" ? "#a7a6ab" : "#3F51B5",
227
+
228
+    // Spinner
229
+    defaultSpinnerColor: "#e42612",
230
+    inverseSpinnerColor: "#1A191B",
231
+
232
+    // Tab
233
+    tabDefaultBg: platform === "ios" ? "#F8F8F8" : "#e42612",
234
+    topTabBarTextColor: platform === "ios" ? "#6b6b6b" : "#b3c7f9",
235
+    topTabBarActiveTextColor: platform === "ios" ? "#e42612" : "#fff",
236
+    topTabBarBorderColor: platform === "ios" ? "#a7a6ab" : "#fff",
237
+    topTabBarActiveBorderColor: platform === "ios" ? "#e42612" : "#fff",
238
+
239
+    // Tabs
240
+    tabBgColor: "#F8F8F8",
241
+    tabFontSize: 15,
242
+
243
+    // Text
244
+    textColor: "#000",
245
+    inverseTextColor: "#fff",
246
+    noteFontSize: 14,
247
+    get defaultTextColor() {
248
+        return this.textColor;
249
+    },
250
+
251
+    // Title
252
+    titleFontfamily: platform === "ios" ? "System" : "Roboto_medium",
253
+    titleFontSize: platform === "ios" ? 17 : 19,
254
+    subTitleFontSize: platform === "ios" ? 11 : 14,
255
+    subtitleColor: platform === "ios" ? "#8e8e93" : "#FFF",
256
+    titleFontColor: platform === "ios" ? "#000" : "#FFF",
257
+
258
+
259
+    // CUSTOM
260
+    customMaterialIconColor: "#5d5d5d",
261
+    fetchedDataSectionListErrorText: "#898989",
262
+
263
+    // PROXIWASH
264
+    proxiwashFinishedColor: "rgba(54,165,22,0.31)",
265
+    proxiwashReadyColor: "transparent",
266
+    proxiwashRunningColor: "rgba(94,104,241,0.3)",
267
+    proxiwashBrokenColor: "rgba(162,162,162,0.31)",
268
+    proxiwashErrorColor: "rgba(204,7,0,0.31)",
269
+
270
+    // Other
271
+    borderRadiusBase: platform === "ios" ? 5 : 2,
272
+    borderWidth: 1 / PixelRatio.getPixelSizeForLayoutSize(1),
273
+    contentPadding: 10,
274
+    dropdownLinkColor: "#414142",
275
+    inputLineHeight: 24,
276
+    deviceWidth,
277
+    deviceHeight,
278
+    isIphoneX,
279
+    inputGroupRoundedBorderRadius: 30,
280
+
281
+    //iPhoneX SafeArea
282
+    Inset: {
283
+        portrait: {
284
+            topInset: 24,
285
+            leftInset: 0,
286
+            rightInset: 0,
287
+            bottomInset: 34
288
+        },
289
+        landscape: {
290
+            topInset: 0,
291
+            leftInset: 44,
292
+            rightInset: 44,
293
+            bottomInset: 21
294
+        }
294 295
     }
295
-  }
296 296
 };

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

@@ -2,7 +2,7 @@
2 2
 
3 3
 import color from "color";
4 4
 
5
-import { Platform, Dimensions, PixelRatio } from "react-native";
5
+import {Dimensions, PixelRatio, Platform} from "react-native";
6 6
 
7 7
 const deviceHeight = Dimensions.get("window").height;
8 8
 const deviceWidth = Dimensions.get("window").width;
@@ -226,7 +226,7 @@ export default {
226 226
     segmentBorderColorMain: platform === "ios" ? "#a7a6ab" : "#3F51B5",
227 227
 
228 228
     // Spinner
229
-    defaultSpinnerColor: "#45D56E",
229
+    defaultSpinnerColor: "#e42612",
230 230
     inverseSpinnerColor: "#1A191B",
231 231
 
232 232
     // Tab
@@ -258,7 +258,7 @@ export default {
258 258
 
259 259
     // CUSTOM
260 260
     customMaterialIconColor: "#b3b3b3",
261
-    fetchedDataSectionListErrorText : "#acacac",
261
+    fetchedDataSectionListErrorText: "#acacac",
262 262
 
263 263
     // PROXIWASH
264 264
     proxiwashFinishedColor: "rgba(17,149,32,0.53)",

Loading…
Cancel
Save