diff --git a/components/app-wrapper.js b/components/app-wrapper.js
index cef5d06..e8392cc 100644
--- a/components/app-wrapper.js
+++ b/components/app-wrapper.js
@@ -1,16 +1,18 @@
import React, { Component } from 'react'
+import { StyleSheet, View } from 'react-native'
+import { Provider } from 'react-redux'
import nodejs from 'nodejs-mobile-react-native'
import { getLicenseFlag, saveEncryptionFlag } from '../local-storage'
import { openDb } from '../db'
import App from './app'
-import PasswordPrompt from './password-prompt'
-import License from './license'
import AppLoadingView from './common/app-loading'
+import AppStatusBar from './common/app-status-bar'
+import License from './license'
+import PasswordPrompt from './password-prompt'
import store from "../store"
-import { Provider } from 'react-redux'
export default class AppWrapper extends Component {
constructor() {
@@ -84,7 +86,19 @@ export default class AppWrapper extends Component {
initialView =
}
- return {initialView}
-
+ return (
+
+
+
+ {initialView}
+
+
+ )
}
-}
\ No newline at end of file
+}
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ }
+})
diff --git a/components/chart/chart.js b/components/chart/chart.js
index 0dc364e..4b9573d 100644
--- a/components/chart/chart.js
+++ b/components/chart/chart.js
@@ -1,6 +1,13 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
-import { ActivityIndicator, FlatList, Dimensions, StyleSheet, View } from 'react-native'
+import {
+ ActivityIndicator,
+ Dimensions,
+ FlatList,
+ PixelRatio,
+ StyleSheet,
+ View
+} from 'react-native'
import AppLoadingView from '../common/app-loading'
import AppPage from '../common/app-page'
@@ -22,9 +29,10 @@ import { makeColumnInfo, nfpLines } from '../helpers/chart'
import {
CHART_COLUMN_WIDTH,
- SYMPTOMS,
+ CHART_GRID_LINE_HORIZONTAL_WIDTH,
CHART_SYMPTOM_HEIGHT_RATIO,
- CHART_XAXIS_HEIGHT_RATIO
+ CHART_XAXIS_HEIGHT_RATIO,
+ SYMPTOMS
} from '../../config'
import { shared } from '../../i18n/en/labels'
import { Colors, Spacing } from '../../styles'
@@ -105,9 +113,13 @@ class CycleChart extends Component {
this.xAxisHeight = height * 0.7 * CHART_XAXIS_HEIGHT_RATIO
const remainingHeight = height * 0.7 - this.xAxisHeight
- this.symptomHeight = remainingHeight * CHART_SYMPTOM_HEIGHT_RATIO
- this.symptomRowHeight = this.symptomRowSymptoms.length *
- this.symptomHeight
+ this.symptomHeight = PixelRatio.roundToNearestPixel(
+ remainingHeight
+ * CHART_SYMPTOM_HEIGHT_RATIO
+ )
+ this.symptomRowHeight = PixelRatio.roundToNearestPixel(
+ this.symptomRowSymptoms.length * this.symptomHeight
+ ) + CHART_GRID_LINE_HORIZONTAL_WIDTH
this.columnHeight = remainingHeight - this.symptomRowHeight
const chartHeight = this.shouldShowTemperatureColumn ?
height * 0.7 : (this.symptomRowHeight + this.xAxisHeight)
diff --git a/components/chart/tick.js b/components/chart/tick.js
index f492c80..7c0862b 100644
--- a/components/chart/tick.js
+++ b/components/chart/tick.js
@@ -5,6 +5,7 @@ import PropTypes from 'prop-types'
import AppText from '../common/app-text'
import { Sizes } from '../../styles'
+import { CHART_TICK_WIDTH } from '../../config'
const Tick = ({ yPosition, height, isBold, shouldShowLabel, label }) => {
const top = yPosition - height / 2
@@ -28,16 +29,14 @@ Tick.propTypes = {
const text = {
- lineHeight: Sizes.base,
- right: 4,
- textAlign: 'right'
+ textAlign: 'right',
}
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
position: 'absolute',
right: 0,
- width: 40
+ width: CHART_TICK_WIDTH
},
textBold: {
fontSize: Sizes.base,
diff --git a/components/common/app-status-bar.js b/components/common/app-status-bar.js
new file mode 100644
index 0000000..876495d
--- /dev/null
+++ b/components/common/app-status-bar.js
@@ -0,0 +1,29 @@
+import React from 'react'
+import { SafeAreaView, StatusBar, StyleSheet, View } from 'react-native'
+
+import { Colors } from '../../styles'
+import { STATUSBAR_HEIGHT } from '../../config'
+
+const AppStatusBar = () => (
+
+
+
+
+
+)
+
+const styles = StyleSheet.create({
+ container: {
+ flex: 1,
+ },
+ statusBar: {
+ backgroundColor: Colors.purple,
+ height: STATUSBAR_HEIGHT,
+ }
+})
+
+export default AppStatusBar
diff --git a/components/common/app-text-input.js b/components/common/app-text-input.js
index 3a50ed2..03a3f70 100644
--- a/components/common/app-text-input.js
+++ b/components/common/app-text-input.js
@@ -38,6 +38,7 @@ const styles = StyleSheet.create({
marginTop: Spacing.base,
minWidth: '80%',
paddingHorizontal: Spacing.base,
+ paddingVertical: Spacing.tiny,
...Typography.mainText
}
})
diff --git a/components/common/button.js b/components/common/button.js
index 79e17d8..4047449 100644
--- a/components/common/button.js
+++ b/components/common/button.js
@@ -5,7 +5,7 @@ import { StyleSheet, TouchableOpacity } from 'react-native'
import AppIcon from './app-icon'
import AppText from './app-text'
-import { Colors, Fonts, Spacing } from '../../styles'
+import { Colors, Fonts, Sizes, Spacing } from '../../styles'
const Button = ({
children,
@@ -52,7 +52,7 @@ const text = {
}
const textSmall = {
- fontSize: Fonts.small,
+ fontSize: Sizes.small,
padding: Spacing.small,
textTransform: 'uppercase'
}
diff --git a/components/common/close-icon.js b/components/common/close-icon.js
index 862fc73..c5aff26 100644
--- a/components/common/close-icon.js
+++ b/components/common/close-icon.js
@@ -4,29 +4,32 @@ import { StyleSheet, TouchableOpacity } from 'react-native'
import AppIcon from './app-icon'
+import { HIT_SLOP} from '../../config'
import { Colors, Sizes } from '../../styles'
-const CloseIcon = ({ onClose, ...props }) => {
+const CloseIcon = ({ onClose, color, ...props }) => {
return (
-
+
)
}
CloseIcon.propTypes = {
- onClose: PropTypes.func.isRequired
+ onClose: PropTypes.func.isRequired,
+ color: PropTypes.string
}
const styles = StyleSheet.create({
container: {
alignSelf: 'flex-start',
- marginBottom: Sizes.base
+ marginBottom: Sizes.base,
}
})
-export default CloseIcon
\ No newline at end of file
+export default CloseIcon
diff --git a/components/cycle-day/temperature.js b/components/cycle-day/temperature.js
index b8e6cc0..6f87d53 100644
--- a/components/cycle-day/temperature.js
+++ b/components/cycle-day/temperature.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
-import { StyleSheet, View } from 'react-native'
+import { Platform, StyleSheet, View } from 'react-native'
import PropTypes from 'prop-types'
import { Keyboard } from 'react-native'
import DateTimePicker from 'react-native-modal-datetime-picker'
@@ -127,6 +127,7 @@ class Temperature extends Component {
mode="time"
onConfirm={this.setTime}
onCancel={this.onCancelTimePicker}
+ display={Platform.OS === "ios" ? "spinner" : "default"}
/>
diff --git a/components/header/hamburger-menu.js b/components/header/hamburger-menu.js
index 16ace0b..ed89c3e 100644
--- a/components/header/hamburger-menu.js
+++ b/components/header/hamburger-menu.js
@@ -1,7 +1,14 @@
import React, { Component } from 'react'
-import { Modal, StyleSheet, TouchableOpacity, View } from 'react-native'
+import {
+ Modal,
+ Platform,
+ StyleSheet,
+ TouchableOpacity,
+ View
+} from 'react-native'
import AppIcon from '../common/app-icon'
+import CloseIcon from '../common/close-icon'
import MenuItem from './menu-item'
import { Colors, Sizes } from '../../styles'
@@ -49,12 +56,9 @@ export default class HamburgerMenu extends Component {
style={styles.blackBackground}
>
-
-
-
+
+ this.toggleMenu()} />
+
{settingsMenuItems.map((item) => (