Calendar redesign
This commit is contained in:
committed by
Sofiya Tepikin
parent
885da5c293
commit
5a555f5965
@@ -11,22 +11,22 @@
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="AlertDialogTheme" parent="Theme.AppCompat.Dialog.Alert">
|
<style name="AlertDialogTheme" parent="Theme.AppCompat.Dialog.Alert">
|
||||||
<item name="android:buttonBarNegativeButtonStyle">@style/NegativeButtonStyle</item>
|
<item name="android:buttonBarButtonStyle">@style/ButtonBarStyle</item>
|
||||||
<item name="android:buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
|
<item name="android:buttonBarPositiveButtonStyle">@style/PositiveButtonStyle</item>
|
||||||
<item name="android:fontFamily">@font/jost_normal</item>
|
<item name="android:fontFamily">@font/jost_normal</item>
|
||||||
<item name="android:textColorPrimary">@color/grey</item>
|
<item name="android:textColorPrimary">@color/grey</item>
|
||||||
<item name="android:windowTitleStyle">@style/TitleStyle</item>
|
<item name="android:windowTitleStyle">@style/TitleStyle</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="NegativeButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
<style name="ButtonBarStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
||||||
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:textColor">@color/grey</item>
|
<item name="android:textColor">@color/grey</item>
|
||||||
<item name="android:textSize">18sp</item>
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="PositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
<style name="PositiveButtonStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
||||||
<item name="android:textColor">@color/orange</item>
|
<item name="android:textSize">16sp</item>
|
||||||
<item name="android:textSize">18sp</item>
|
|
||||||
<item name="android:textStyle">bold</item>
|
<item name="android:textStyle">bold</item>
|
||||||
|
<item name="android:textColor">@color/orange</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="TitleStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
<style name="TitleStyle" parent="Widget.AppCompat.Button.ButtonBar.AlertDialog">
|
||||||
|
|||||||
+48
-78
@@ -1,17 +1,22 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
import { StyleSheet, View } from 'react-native'
|
||||||
import { CalendarList } from 'react-native-calendars'
|
import { CalendarList } from 'react-native-calendars'
|
||||||
import { connect } from 'react-redux'
|
|
||||||
|
|
||||||
|
import { connect } from 'react-redux'
|
||||||
import { setDate } from '../slices/date'
|
import { setDate } from '../slices/date'
|
||||||
import { navigate } from '../slices/navigation'
|
import { navigate } from '../slices/navigation'
|
||||||
|
|
||||||
import { LocalDate } from 'js-joda'
|
|
||||||
import { getBleedingDaysSortedByDate } from '../db'
|
import { getBleedingDaysSortedByDate } from '../db'
|
||||||
import cycleModule from '../lib/cycle'
|
import cycleModule from '../lib/cycle'
|
||||||
import { shadesOfRed, calendarTheme } from '../styles/index'
|
|
||||||
import styles from '../styles/index'
|
|
||||||
import nothingChanged from '../db/db-unchanged'
|
import nothingChanged from '../db/db-unchanged'
|
||||||
|
import {
|
||||||
|
predictionToCalFormat,
|
||||||
|
toCalFormat,
|
||||||
|
todayToCalFormat
|
||||||
|
} from './helpers/calendar'
|
||||||
|
|
||||||
|
import { Colors, Fonts, Sizes } from '../../styles'
|
||||||
|
|
||||||
class CalendarView extends Component {
|
class CalendarView extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
@@ -52,26 +57,50 @@ class CalendarView extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
const {
|
||||||
|
todayInCalFormat,
|
||||||
|
bleedingDaysInCalFormat,
|
||||||
|
predictedBleedingDaysInCalFormat
|
||||||
|
} = this.state
|
||||||
|
const markedDates = Object.assign(
|
||||||
|
{},
|
||||||
|
todayInCalFormat,
|
||||||
|
bleedingDaysInCalFormat,
|
||||||
|
predictedBleedingDaysInCalFormat
|
||||||
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<CalendarList
|
<View style={styles.container}>
|
||||||
onDayPress={this.passDateToDayView.bind(this)}
|
<CalendarList
|
||||||
markedDates={
|
// If firstDay=1 week starts from Monday. Note that dayNames and dayNamesShort should still start from Sunday.
|
||||||
Object.assign(
|
firstDay={1}
|
||||||
{},
|
onDayPress={this.passDateToDayView.bind(this)}
|
||||||
this.state.todayInCalFormat,
|
markedDates={markedDates}
|
||||||
this.state.bleedingDaysInCalFormat,
|
markingType={'custom'}
|
||||||
this.state.predictedBleedingDaysInCalFormat
|
theme={calendarTheme}
|
||||||
)
|
/>
|
||||||
}
|
</View>
|
||||||
markingType={'custom'}
|
|
||||||
// If firstDay=1 week starts from Monday. Note that dayNames and dayNamesShort should still start from Sunday.
|
|
||||||
firstDay={1}
|
|
||||||
theme={calendarTheme}
|
|
||||||
/>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
container: { flex: 1 }
|
||||||
|
})
|
||||||
|
|
||||||
|
const calendarTheme = StyleSheet.create({
|
||||||
|
calendarBackground: Colors.tourquiseLight,
|
||||||
|
dayTextColor: Colors.greyDark,
|
||||||
|
monthTextColor: Colors.purple,
|
||||||
|
textDayFontFamily: Fonts.main,
|
||||||
|
textMonthFontFamily: Fonts.bold,
|
||||||
|
textDayHeaderFontFamily: Fonts.bold,
|
||||||
|
textDayFontSize: Sizes.small,
|
||||||
|
textMonthFontSize: Sizes.subtitle,
|
||||||
|
textDayHeaderFontSize: Sizes.small,
|
||||||
|
textSectionTitleColor: Colors.orange,
|
||||||
|
})
|
||||||
|
|
||||||
const mapDispatchToProps = (dispatch) => {
|
const mapDispatchToProps = (dispatch) => {
|
||||||
return({
|
return({
|
||||||
setDate: (date) => dispatch(setDate(date)),
|
setDate: (date) => dispatch(setDate(date)),
|
||||||
@@ -83,62 +112,3 @@ export default connect(
|
|||||||
null,
|
null,
|
||||||
mapDispatchToProps,
|
mapDispatchToProps,
|
||||||
)(CalendarView)
|
)(CalendarView)
|
||||||
|
|
||||||
|
|
||||||
function toCalFormat(bleedingDaysSortedByDate) {
|
|
||||||
const todayDateString = LocalDate.now().toString()
|
|
||||||
return bleedingDaysSortedByDate.reduce((acc, day) => {
|
|
||||||
acc[day.date] = {
|
|
||||||
customStyles: {
|
|
||||||
container: {
|
|
||||||
backgroundColor: shadesOfRed[day.bleeding.value],
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (day.date === todayDateString) {
|
|
||||||
acc[day.date].customStyles.text = styles.calendarToday
|
|
||||||
}
|
|
||||||
return acc
|
|
||||||
}, {})
|
|
||||||
}
|
|
||||||
|
|
||||||
function predictionToCalFormat(predictedDays) {
|
|
||||||
if (!predictedDays.length) return {}
|
|
||||||
const todayDateString = LocalDate.now().toString()
|
|
||||||
const middleIndex = (predictedDays[0].length - 1) / 2
|
|
||||||
return predictedDays.reduce((acc, setOfDays) => {
|
|
||||||
setOfDays.reduce((accSet, day, i) => {
|
|
||||||
accSet[day] = {
|
|
||||||
customStyles: {
|
|
||||||
container: {
|
|
||||||
borderColor: (i === middleIndex) ? shadesOfRed[3] : shadesOfRed[2],
|
|
||||||
borderWidth: 3,
|
|
||||||
},
|
|
||||||
text: {
|
|
||||||
marginTop: 1,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (day === todayDateString) {
|
|
||||||
accSet[day].customStyles.text = Object.assign(
|
|
||||||
{},
|
|
||||||
styles.calendarToday,
|
|
||||||
{marginTop: -2}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
return accSet
|
|
||||||
}, acc)
|
|
||||||
return acc
|
|
||||||
}, {})
|
|
||||||
}
|
|
||||||
|
|
||||||
function todayToCalFormat() {
|
|
||||||
const todayDateString = LocalDate.now().toString()
|
|
||||||
const todayFormated = {}
|
|
||||||
todayFormated[todayDateString] = {
|
|
||||||
customStyles: {
|
|
||||||
text: styles.calendarToday
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return todayFormated
|
|
||||||
}
|
|
||||||
@@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native'
|
|||||||
|
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
|
|
||||||
import { Typography } from '../../styles/redesign'
|
import { Typography } from '../../styles'
|
||||||
import { CHART_YAXIS_WIDTH } from '../../config'
|
import { CHART_YAXIS_WIDTH } from '../../config'
|
||||||
import { shared as labels } from '../../i18n/en/labels'
|
import { shared as labels } from '../../i18n/en/labels'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
|||||||
|
|
||||||
import { Shape } from 'react-native/Libraries/ART/ReactNativeART'
|
import { Shape } from 'react-native/Libraries/ART/ReactNativeART'
|
||||||
|
|
||||||
import { Colors } from '../../styles/redesign'
|
import { Colors } from '../../styles'
|
||||||
import { CHART_STROKE_WIDTH, CHART_GRID_LINE_HORIZONTAL_WIDTH } from '../../config'
|
import { CHART_STROKE_WIDTH, CHART_GRID_LINE_HORIZONTAL_WIDTH } from '../../config'
|
||||||
|
|
||||||
const ChartLine = ({ path, isNfpLine }) => {
|
const ChartLine = ({ path, isNfpLine }) => {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
CHART_XAXIS_HEIGHT_RATIO
|
CHART_XAXIS_HEIGHT_RATIO
|
||||||
} from '../../config'
|
} from '../../config'
|
||||||
import { shared } from '../../i18n/en/labels'
|
import { shared } from '../../i18n/en/labels'
|
||||||
import { Colors, Spacing } from '../../styles/redesign'
|
import { Colors, Spacing } from '../../styles'
|
||||||
|
|
||||||
class CycleChart extends Component {
|
class CycleChart extends Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import AppText from '../common/app-text'
|
|||||||
|
|
||||||
import cycleModule from '../../lib/cycle'
|
import cycleModule from '../../lib/cycle'
|
||||||
import { dateEnding } from '../helpers/home'
|
import { dateEnding } from '../helpers/home'
|
||||||
import { Containers, Typography } from '../../styles/redesign'
|
import { Containers, Typography } from '../../styles'
|
||||||
|
|
||||||
const CycleDayLabel = ({ height, date }) => {
|
const CycleDayLabel = ({ height, date }) => {
|
||||||
const dayDate = LocalDate.parse(date)
|
const dayDate = LocalDate.parse(date)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { Path, Shape } from 'react-native/Libraries/ART/ReactNativeART'
|
import { Path, Shape } from 'react-native/Libraries/ART/ReactNativeART'
|
||||||
|
|
||||||
import { Colors } from '../../styles/redesign'
|
import { Colors } from '../../styles'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CHART_COLUMN_WIDTH,
|
CHART_COLUMN_WIDTH,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet, View } from 'react-native'
|
|||||||
|
|
||||||
import { getTickPositions } from '../helpers/chart'
|
import { getTickPositions } from '../helpers/chart'
|
||||||
|
|
||||||
import { Colors } from '../../styles/redesign'
|
import { Colors } from '../../styles'
|
||||||
import { CHART_GRID_LINE_HORIZONTAL_WIDTH, CHART_YAXIS_WIDTH } from '../../config'
|
import { CHART_GRID_LINE_HORIZONTAL_WIDTH, CHART_YAXIS_WIDTH } from '../../config'
|
||||||
|
|
||||||
const HorizontalGrid = ({ height }) => {
|
const HorizontalGrid = ({ height }) => {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import Button from '../common/button'
|
|||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { navigate } from '../../slices/navigation'
|
import { navigate } from '../../slices/navigation'
|
||||||
|
|
||||||
import { Containers } from '../../styles/redesign'
|
import { Containers } from '../../styles'
|
||||||
import { shared } from '../../i18n/en/labels'
|
import { shared } from '../../i18n/en/labels'
|
||||||
|
|
||||||
const NoData = ({ navigate }) => {
|
const NoData = ({ navigate }) => {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { StyleSheet, View } from 'react-native'
|
import { StyleSheet, View } from 'react-native'
|
||||||
|
|
||||||
import { Colors, Containers } from '../../styles/redesign'
|
import { Colors, Containers } from '../../styles'
|
||||||
import {
|
import {
|
||||||
CHART_COLUMN_WIDTH,
|
CHART_COLUMN_WIDTH,
|
||||||
CHART_DOT_RADIUS,
|
CHART_DOT_RADIUS,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet , View } from 'react-native'
|
|||||||
|
|
||||||
import DripIcon from '../../assets/drip-icons'
|
import DripIcon from '../../assets/drip-icons'
|
||||||
|
|
||||||
import { Colors, Containers } from '../../styles/redesign'
|
import { Colors, Containers } from '../../styles'
|
||||||
import { CHART_YAXIS_WIDTH, CHART_ICON_SIZE } from '../../config'
|
import { CHART_YAXIS_WIDTH, CHART_ICON_SIZE } from '../../config'
|
||||||
|
|
||||||
const SymptomIcon = ({ symptom, height }) => {
|
const SymptomIcon = ({ symptom, height }) => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
|
|||||||
|
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
|
|
||||||
import { Sizes } from '../../styles/redesign'
|
import { Sizes } from '../../styles'
|
||||||
|
|
||||||
const Tick = ({ yPosition, height, isBold, shouldShowLabel, label }) => {
|
const Tick = ({ yPosition, height, isBold, shouldShowLabel, label }) => {
|
||||||
const top = yPosition - height / 2
|
const top = yPosition - height / 2
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { Image, StyleSheet, View } from 'react-native'
|
|||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
import CloseIcon from '../common/close-icon'
|
import CloseIcon from '../common/close-icon'
|
||||||
|
|
||||||
import { Containers, Spacing } from '../../styles/redesign'
|
import { Containers, Spacing } from '../../styles'
|
||||||
import { chart } from '../../i18n/en/labels'
|
import { chart } from '../../i18n/en/labels'
|
||||||
|
|
||||||
const image = require('../../assets/swipe.png')
|
const image = require('../../assets/swipe.png')
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
|||||||
import { StyleSheet } from 'react-native'
|
import { StyleSheet } from 'react-native'
|
||||||
import Icon from 'react-native-vector-icons/Entypo'
|
import Icon from 'react-native-vector-icons/Entypo'
|
||||||
|
|
||||||
import { Sizes } from '../../styles/redesign'
|
import { Sizes } from '../../styles'
|
||||||
|
|
||||||
const AppIcon = ({ color, name, style, ...props }) => {
|
const AppIcon = ({ color, name, style, ...props }) => {
|
||||||
const iconStyle = [styles.icon, style, { color }]
|
const iconStyle = [styles.icon, style, { color }]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { StyleSheet, View } from 'react-native'
|
|||||||
|
|
||||||
import AppText from './app-text'
|
import AppText from './app-text'
|
||||||
|
|
||||||
import { Containers } from '../../styles/redesign'
|
import { Containers } from '../../styles'
|
||||||
|
|
||||||
import { shared } from '../../i18n/en/labels'
|
import { shared } from '../../i18n/en/labels'
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { ScrollView, StyleSheet, View } from 'react-native'
|
|||||||
|
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
|
|
||||||
import { Colors, Typography } from '../../styles/redesign'
|
import { Colors, Typography } from '../../styles'
|
||||||
|
|
||||||
const AppPage = ({
|
const AppPage = ({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
|
|||||||
|
|
||||||
import AppText from './app-text'
|
import AppText from './app-text'
|
||||||
|
|
||||||
import { Containers } from '../../styles/redesign'
|
import { Containers } from '../../styles'
|
||||||
|
|
||||||
const AppSwitch = ({ onToggle, text, value }) => {
|
const AppSwitch = ({ onToggle, text, value }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from 'react'
|
|||||||
import { StyleSheet, TextInput } from 'react-native'
|
import { StyleSheet, TextInput } from 'react-native'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
import { Colors, Spacing, Typography } from '../../styles/redesign'
|
import { Colors, Spacing, Typography } from '../../styles'
|
||||||
|
|
||||||
const AppTextInput = ({ style, ...props }) => {
|
const AppTextInput = ({ style, ...props }) => {
|
||||||
return <TextInput style={[styles.input, style]} {...props} />
|
return <TextInput style={[styles.input, style]} {...props} />
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet, Text } from 'react-native'
|
|||||||
|
|
||||||
import Link from './link'
|
import Link from './link'
|
||||||
|
|
||||||
import { Colors, Typography } from '../../styles/redesign'
|
import { Colors, Typography } from '../../styles'
|
||||||
|
|
||||||
const AppText = ({ children, linkStyle, style, ...props }) => {
|
const AppText = ({ children, linkStyle, style, ...props }) => {
|
||||||
// we parse for links in case the text contains any
|
// we parse for links in case the text contains any
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { StyleSheet, TouchableOpacity } from 'react-native'
|
|||||||
import AppIcon from './app-icon'
|
import AppIcon from './app-icon'
|
||||||
import AppText from './app-text'
|
import AppText from './app-text'
|
||||||
|
|
||||||
import { Colors, Fonts, Spacing } from '../../styles/redesign'
|
import { Colors, Fonts, Spacing } from '../../styles'
|
||||||
|
|
||||||
const Button = ({
|
const Button = ({
|
||||||
children,
|
children,
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet, TouchableOpacity } from 'react-native'
|
|||||||
|
|
||||||
import AppIcon from './app-icon'
|
import AppIcon from './app-icon'
|
||||||
|
|
||||||
import { Colors, Sizes } from '../../styles/redesign'
|
import { Colors, Sizes } from '../../styles'
|
||||||
|
|
||||||
const CloseIcon = ({ onClose, ...props }) => {
|
const CloseIcon = ({ onClose, ...props }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
|||||||
import Hyperlink from 'react-native-hyperlink'
|
import Hyperlink from 'react-native-hyperlink'
|
||||||
import { StyleSheet } from 'react-native'
|
import { StyleSheet } from 'react-native'
|
||||||
|
|
||||||
import { Colors, Typography } from '../../styles/redesign'
|
import { Colors, Typography } from '../../styles'
|
||||||
|
|
||||||
import links from '../../i18n/en/links'
|
import links from '../../i18n/en/links'
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
|
|||||||
import { createIconSetFromIcoMoon } from 'react-native-vector-icons'
|
import { createIconSetFromIcoMoon } from 'react-native-vector-icons'
|
||||||
import iconConfig from '../../selection.json'
|
import iconConfig from '../../selection.json'
|
||||||
|
|
||||||
import { Colors, Sizes } from '../../styles/redesign'
|
import { Colors, Sizes } from '../../styles'
|
||||||
|
|
||||||
const Icon = createIconSetFromIcoMoon(iconConfig, '', 'Menu')
|
const Icon = createIconSetFromIcoMoon(iconConfig, '', 'Menu')
|
||||||
|
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ import { StyleSheet, View } from 'react-native'
|
|||||||
|
|
||||||
import AppText from './app-text'
|
import AppText from './app-text'
|
||||||
|
|
||||||
import { Colors, Spacing, Typography } from '../../styles/redesign'
|
import { Colors, Spacing, Typography } from '../../styles'
|
||||||
|
|
||||||
const Segment = ({ children, last, title }) => {
|
const Segment = ({ children, last, title }) => {
|
||||||
const containerStyle = last ? styles.containerLast : styles.container
|
const containerStyle = last ? styles.containerLast : styles.container
|
||||||
|
const commonStyle = Object.assign({}, containerStyle)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={containerStyle}>
|
<View style={commonStyle}>
|
||||||
{title && <AppText style={styles.title}>{title}</AppText>}
|
{title && <AppText style={styles.title}>{title}</AppText>}
|
||||||
{children}
|
{children}
|
||||||
</View>
|
</View>
|
||||||
@@ -33,7 +34,7 @@ const styles = StyleSheet.create({
|
|||||||
container: {
|
container: {
|
||||||
borderStyle: 'solid',
|
borderStyle: 'solid',
|
||||||
borderBottomWidth: 2,
|
borderBottomWidth: 2,
|
||||||
borderBottomColor: Colors.greyLight,
|
borderBottomColor: Colors.grey,
|
||||||
paddingBottom: Spacing.base,
|
paddingBottom: Spacing.base,
|
||||||
...segmentContainer
|
...segmentContainer
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
|
|||||||
|
|
||||||
import AppText from './app-text'
|
import AppText from './app-text'
|
||||||
|
|
||||||
import { Spacing, Typography } from '../../styles/redesign'
|
import { Spacing, Typography } from '../../styles'
|
||||||
|
|
||||||
const Table = ({ tableContent }) => {
|
const Table = ({ tableContent }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import { getCycleDay } from '../../db'
|
|||||||
import { getData } from '../helpers/cycle-day'
|
import { getData } from '../helpers/cycle-day'
|
||||||
|
|
||||||
import { general as labels} from '../../i18n/en/cycle-day'
|
import { general as labels} from '../../i18n/en/cycle-day'
|
||||||
import { Spacing } from '../../styles/redesign'
|
import { Spacing } from '../../styles'
|
||||||
import { SYMPTOMS } from '../../config'
|
import { SYMPTOMS } from '../../config'
|
||||||
|
|
||||||
class CycleDayOverView extends Component {
|
class CycleDayOverView extends Component {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet, TouchableOpacity, View } from 'react-native'
|
|||||||
|
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
|
|
||||||
import { Colors, Containers } from '../../styles/redesign'
|
import { Colors, Containers } from '../../styles'
|
||||||
|
|
||||||
const SelectBoxGroup = ({ labels, optionsState, onSelect }) => {
|
const SelectBoxGroup = ({ labels, optionsState, onSelect }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet, TouchableOpacity, View } from 'react-native'
|
|||||||
|
|
||||||
import AppText from '../common/app-text'
|
import AppText from '../common/app-text'
|
||||||
|
|
||||||
import { Colors, Containers } from '../../styles/redesign'
|
import { Colors, Containers } from '../../styles'
|
||||||
|
|
||||||
export default function SelectTabGroup({ activeButton, buttons, onSelect }) {
|
export default function SelectTabGroup({ activeButton, buttons, onSelect }) {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { connect } from 'react-redux'
|
|||||||
import { getDate } from '../../slices/date'
|
import { getDate } from '../../slices/date'
|
||||||
import { isDateInFuture } from '../helpers/cycle-day'
|
import { isDateInFuture } from '../helpers/cycle-day'
|
||||||
|
|
||||||
import { Colors, Sizes, Spacing } from '../../styles/redesign'
|
import { Colors, Sizes, Spacing } from '../../styles'
|
||||||
import { headerTitles as symptomTitles } from '../../i18n/en/labels'
|
import { headerTitles as symptomTitles } from '../../i18n/en/labels'
|
||||||
|
|
||||||
class SymptomBox extends Component {
|
class SymptomBox extends Component {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
import { ScrollView, StyleSheet, View } from 'react-native'
|
import { Dimensions, ScrollView, StyleSheet, View } from 'react-native'
|
||||||
|
|
||||||
import AppModal from '../common/app-modal'
|
import AppModal from '../common/app-modal'
|
||||||
import AppSwitch from '../common/app-switch'
|
import AppSwitch from '../common/app-switch'
|
||||||
@@ -19,7 +19,7 @@ import { blank, save, shouldShow, symtomPage } from '../helpers/cycle-day'
|
|||||||
|
|
||||||
import { shared as sharedLabels } from '../../i18n/en/labels'
|
import { shared as sharedLabels } from '../../i18n/en/labels'
|
||||||
import info from '../../i18n/en/symptom-info'
|
import info from '../../i18n/en/symptom-info'
|
||||||
import { Containers, Sizes } from '../../styles/redesign'
|
import { Colors, Containers, Sizes, Spacing } from '../../styles'
|
||||||
|
|
||||||
class SymptomEditView extends Component {
|
class SymptomEditView extends Component {
|
||||||
|
|
||||||
@@ -151,7 +151,6 @@ class SymptomEditView extends Component {
|
|||||||
<AppModal onClose={onClose}>
|
<AppModal onClose={onClose}>
|
||||||
<ScrollView
|
<ScrollView
|
||||||
contentContainerStyle={styles.modalContainer}
|
contentContainerStyle={styles.modalContainer}
|
||||||
pagingEnabled={true}
|
|
||||||
style={styles.modalWindow}
|
style={styles.modalWindow}
|
||||||
>
|
>
|
||||||
<View style={styles.headerContainer}>
|
<View style={styles.headerContainer}>
|
||||||
@@ -165,7 +164,7 @@ class SymptomEditView extends Component {
|
|||||||
}
|
}
|
||||||
{shouldTabGroup && symtomPage[symptom].selectTabGroups.map(group => {
|
{shouldTabGroup && symtomPage[symptom].selectTabGroups.map(group => {
|
||||||
return (
|
return (
|
||||||
<Segment key={group.key}>
|
<Segment key={group.key} style={styles.segmentBorder}>
|
||||||
<AppText style={styles.title}>{group.title}</AppText>
|
<AppText style={styles.title}>{group.title}</AppText>
|
||||||
<SelectTabGroup
|
<SelectTabGroup
|
||||||
activeButton={data[group.key]}
|
activeButton={data[group.key]}
|
||||||
@@ -183,7 +182,7 @@ class SymptomEditView extends Component {
|
|||||||
&& Object.keys(group.options).includes('other')
|
&& Object.keys(group.options).includes('other')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Segment key={group.key}>
|
<Segment key={group.key} style={styles.segmentBorder} >
|
||||||
<AppText style={styles.title}>{group.title}</AppText>
|
<AppText style={styles.title}>{group.title}</AppText>
|
||||||
<SelectBoxGroup
|
<SelectBoxGroup
|
||||||
labels={group.options}
|
labels={group.options}
|
||||||
@@ -203,7 +202,7 @@ class SymptomEditView extends Component {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
{shouldShowExclude &&
|
{shouldShowExclude &&
|
||||||
<Segment>
|
<Segment style={styles.segmentBorder} >
|
||||||
<AppSwitch
|
<AppSwitch
|
||||||
onToggle={this.onExcludeToggle}
|
onToggle={this.onExcludeToggle}
|
||||||
text={symtomPage[symptom].excludeText}
|
text={symtomPage[symptom].excludeText}
|
||||||
@@ -212,7 +211,7 @@ class SymptomEditView extends Component {
|
|||||||
</Segment>
|
</Segment>
|
||||||
}
|
}
|
||||||
{shouldShowNote &&
|
{shouldShowNote &&
|
||||||
<Segment>
|
<Segment style={styles.segmentBorder} >
|
||||||
<AppText>{symtomPage[symptom].note}</AppText>
|
<AppText>{symtomPage[symptom].note}</AppText>
|
||||||
<AppTextInput
|
<AppTextInput
|
||||||
multiline={true}
|
multiline={true}
|
||||||
@@ -225,15 +224,17 @@ class SymptomEditView extends Component {
|
|||||||
}
|
}
|
||||||
<View style={styles.buttonsContainer}>
|
<View style={styles.buttonsContainer}>
|
||||||
<Button iconName={iconName} isSmall onPress={this.onPressLearnMore}>
|
<Button iconName={iconName} isSmall onPress={this.onPressLearnMore}>
|
||||||
learn more
|
{sharedLabels.learnMore}
|
||||||
</Button>
|
</Button>
|
||||||
<Button isSmall onPress={this.onRemove}>
|
<Button isSmall onPress={this.onRemove}>
|
||||||
remove
|
{sharedLabels.remove}
|
||||||
|
</Button>
|
||||||
|
<Button isCTA isSmall onPress={this.onSave}>
|
||||||
|
{sharedLabels.save}
|
||||||
</Button>
|
</Button>
|
||||||
<Button isCTA isSmall onPress={this.onSave}>save</Button>
|
|
||||||
</View>
|
</View>
|
||||||
{shouldShowInfo &&
|
{shouldShowInfo &&
|
||||||
<Segment last>
|
<Segment last style={styles.segmentBorder} >
|
||||||
<AppText>{info[symptom].text}</AppText>
|
<AppText>{info[symptom].text}</AppText>
|
||||||
</Segment>
|
</Segment>
|
||||||
}
|
}
|
||||||
@@ -250,19 +251,23 @@ const styles = StyleSheet.create({
|
|||||||
headerContainer: {
|
headerContainer: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: 'flex-end',
|
justifyContent: 'flex-end',
|
||||||
paddingVertical: Sizes.tiny,
|
paddingVertical: Spacing.tiny,
|
||||||
},
|
},
|
||||||
modalContainer: {
|
modalContainer: {
|
||||||
flexGrow: 1,
|
flex: 1,
|
||||||
padding: Sizes.small
|
padding: Spacing.small,
|
||||||
|
paddingBottom: Spacing.base
|
||||||
},
|
},
|
||||||
modalWindow: {
|
modalWindow: {
|
||||||
backgroundColor: 'white',
|
backgroundColor: 'white',
|
||||||
borderRadius: 10,
|
borderRadius: 10,
|
||||||
marginVertical: Sizes.huge * 2,
|
marginVertical: Sizes.huge * 2,
|
||||||
|
position: 'absolute',
|
||||||
minHeight: '40%',
|
minHeight: '40%',
|
||||||
height: '70%',
|
maxHeight: Dimensions.get('window').height * 0.7
|
||||||
position: 'absolute'
|
},
|
||||||
|
segmentBorder: {
|
||||||
|
borderBottomColor: Colors.greyLight
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
fontSize: Sizes.subtitle
|
fontSize: Sizes.subtitle
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
isTomorrowInFuture,
|
isTomorrowInFuture,
|
||||||
isYesterdayInFuture
|
isYesterdayInFuture
|
||||||
} from '../helpers/cycle-day'
|
} from '../helpers/cycle-day'
|
||||||
import { Colors, Containers, Spacing, Typography } from '../../styles/redesign'
|
import { Colors, Containers, Spacing, Typography } from '../../styles'
|
||||||
|
|
||||||
const SymptomPageTitle = ({
|
const SymptomPageTitle = ({
|
||||||
date,
|
date,
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { isTemperatureOutOfRange, isPreviousTemperature } from '../helpers/cycle
|
|||||||
|
|
||||||
import { temperature as labels } from '../../i18n/en/cycle-day'
|
import { temperature as labels } from '../../i18n/en/cycle-day'
|
||||||
|
|
||||||
import { Colors, Containers, Sizes, Spacing } from '../../styles/redesign'
|
import { Colors, Containers, Sizes, Spacing } from '../../styles'
|
||||||
|
|
||||||
const formatTemperature = value => value === null
|
const formatTemperature = value => value === null
|
||||||
? value
|
? value
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { Modal, StyleSheet, TouchableOpacity, View } from 'react-native'
|
|||||||
import AppIcon from '../common/app-icon'
|
import AppIcon from '../common/app-icon'
|
||||||
import MenuItem from './menu-item'
|
import MenuItem from './menu-item'
|
||||||
|
|
||||||
import { Colors, Sizes } from '../../styles/redesign'
|
import { Colors, Sizes } from '../../styles'
|
||||||
import settingsLabels from '../../i18n/en/settings'
|
import settingsLabels from '../../i18n/en/settings'
|
||||||
|
|
||||||
const { menuItems } = settingsLabels
|
const { menuItems } = settingsLabels
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import PropTypes from 'prop-types'
|
|||||||
import Logo from './logo'
|
import Logo from './logo'
|
||||||
import HamburgerMenu from './hamburger-menu'
|
import HamburgerMenu from './hamburger-menu'
|
||||||
|
|
||||||
import { Colors, Containers, Sizes } from '../../styles/redesign'
|
import { Colors, Containers, Sizes } from '../../styles'
|
||||||
|
|
||||||
const Header = ({ isSideMenuEnabled }) => {
|
const Header = ({ isSideMenuEnabled }) => {
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import AppText from '../common/app-text'
|
|||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { navigate } from '../../slices/navigation'
|
import { navigate } from '../../slices/navigation'
|
||||||
|
|
||||||
import { Colors, Fonts, Sizes } from '../../styles/redesign'
|
import { Colors, Fonts, Sizes } from '../../styles'
|
||||||
|
|
||||||
const Logo = ({ navigate }) => {
|
const Logo = ({ navigate }) => {
|
||||||
return(
|
return(
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import AppText from '../common/app-text'
|
|||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { navigate } from '../../slices/navigation'
|
import { navigate } from '../../slices/navigation'
|
||||||
|
|
||||||
import { Typography } from '../../styles/redesign'
|
import { Typography } from '../../styles'
|
||||||
|
|
||||||
const MenuItem = ({ item, navigate, closeMenu }) => {
|
const MenuItem = ({ item, navigate, closeMenu }) => {
|
||||||
const { component, name } = item
|
const { component, name } = item
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
import { LocalDate } from 'js-joda'
|
||||||
|
|
||||||
|
import { Colors, Fonts } from '../../styles'
|
||||||
|
|
||||||
|
const { shades } = Colors.iconColors.bleeding
|
||||||
|
|
||||||
|
export const toCalFormat = (bleedingDaysSortedByDate) => {
|
||||||
|
const todayDateString = LocalDate.now().toString()
|
||||||
|
|
||||||
|
return bleedingDaysSortedByDate.reduce((acc, day) => {
|
||||||
|
acc[day.date] = {
|
||||||
|
customStyles: {
|
||||||
|
container: {
|
||||||
|
backgroundColor: shades[day.bleeding.value],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (day.date === todayDateString) {
|
||||||
|
acc[day.date].customStyles.text = styles.calendarToday
|
||||||
|
}
|
||||||
|
return acc
|
||||||
|
}, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const predictionToCalFormat = (predictedDays) => {
|
||||||
|
if (!predictedDays.length) return {}
|
||||||
|
const todayDateString = LocalDate.now().toString()
|
||||||
|
const middleIndex = (predictedDays[0].length - 1) / 2
|
||||||
|
return predictedDays.reduce((acc, setOfDays) => {
|
||||||
|
setOfDays.reduce((accSet, day, i) => {
|
||||||
|
accSet[day] = {
|
||||||
|
customStyles: {
|
||||||
|
container: {
|
||||||
|
borderColor: (i === middleIndex) ? shades[3] : shades[0],
|
||||||
|
borderStyle: (i === middleIndex) ? 'solid' : 'dashed',
|
||||||
|
borderWidth: 1,
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (day === todayDateString) {
|
||||||
|
accSet[day].customStyles.text = styles.calendarToday
|
||||||
|
}
|
||||||
|
|
||||||
|
return accSet
|
||||||
|
}, acc)
|
||||||
|
return acc
|
||||||
|
}, {})
|
||||||
|
}
|
||||||
|
|
||||||
|
export const todayToCalFormat = () => {
|
||||||
|
const todayDateString = LocalDate.now().toString()
|
||||||
|
const todayFormated = {}
|
||||||
|
todayFormated[todayDateString] = {
|
||||||
|
customStyles: {
|
||||||
|
text: styles.calendarToday
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return todayFormated
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = {
|
||||||
|
calendarToday: {
|
||||||
|
fontFamily: Fonts.bold,
|
||||||
|
color: Colors.purple
|
||||||
|
},
|
||||||
|
}
|
||||||
+3
-3
@@ -15,8 +15,8 @@ import cycleModule from '../lib/cycle'
|
|||||||
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
|
import { getFertilityStatusForDay } from '../lib/sympto-adapter'
|
||||||
import { determinePredictionText, dateEnding } from './helpers/home'
|
import { determinePredictionText, dateEnding } from './helpers/home'
|
||||||
|
|
||||||
import { Colors, Fonts, Sizes, Spacing } from '../styles/redesign'
|
import { Colors, Fonts, Sizes, Spacing } from '../styles'
|
||||||
import { homeRedesign as labels, home as cycle } from '../i18n/en/labels'
|
import { home as labels } from '../i18n/en/labels'
|
||||||
|
|
||||||
class Home extends Component {
|
class Home extends Component {
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ class Home extends Component {
|
|||||||
getFertilityStatusForDay(this.todayDateString)
|
getFertilityStatusForDay(this.todayDateString)
|
||||||
const prediction = getPredictedMenses()
|
const prediction = getPredictedMenses()
|
||||||
|
|
||||||
this.cycleDayText = !this.cycleDayNumber ? cycle.cycleDayNotEnoughInfo
|
this.cycleDayText = !this.cycleDayNumber ? labels.cycleDayNotEnoughInfo
|
||||||
: `${this.cycleDayNumber}${dateEnding[this.cycleDayNumber] || dateEnding['default']}`
|
: `${this.cycleDayNumber}${dateEnding[this.cycleDayNumber] || dateEnding['default']}`
|
||||||
this.phase = phase
|
this.phase = phase
|
||||||
this.phaseText = !phase ? statusText
|
this.phaseText = !phase ? statusText
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { saveLicenseFlag } from '../local-storage'
|
|||||||
|
|
||||||
import { shared } from '../i18n/en/labels'
|
import { shared } from '../i18n/en/labels'
|
||||||
import settingsLabels from '../i18n/en/settings'
|
import settingsLabels from '../i18n/en/settings'
|
||||||
import { Containers } from '../styles/redesign'
|
import { Containers } from '../styles'
|
||||||
|
|
||||||
const labels = settingsLabels.license
|
const labels = settingsLabels.license
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { StyleSheet, View } from 'react-native'
|
|||||||
|
|
||||||
import MenuItem from './menu-item'
|
import MenuItem from './menu-item'
|
||||||
|
|
||||||
import { Containers } from '../../styles/redesign'
|
import { Containers } from '../../styles'
|
||||||
import { pages } from '../pages'
|
import { pages } from '../pages'
|
||||||
|
|
||||||
const Menu = () => {
|
const Menu = () => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import Icon from '../common/menu-icon'
|
|||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { getNavigation, navigate } from '../../slices/navigation'
|
import { getNavigation, navigate } from '../../slices/navigation'
|
||||||
|
|
||||||
import { Colors, Containers, Fonts, Sizes, Spacing } from '../../styles/redesign'
|
import { Colors, Containers, Fonts, Sizes, Spacing } from '../../styles'
|
||||||
|
|
||||||
const MenuItem = ({ component, icon, label, navigate, navigation }) => {
|
const MenuItem = ({ component, icon, label, navigate, navigation }) => {
|
||||||
const isActive = (component === navigation.currentPage)
|
const isActive = (component === navigation.currentPage)
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import Header from './header'
|
|||||||
import { saveEncryptionFlag } from '../local-storage'
|
import { saveEncryptionFlag } from '../local-storage'
|
||||||
import { requestHash, deleteDbAndOpenNew, openDb } from '../db'
|
import { requestHash, deleteDbAndOpenNew, openDb } from '../db'
|
||||||
import { passwordPrompt as labels, shared } from '../i18n/en/labels'
|
import { passwordPrompt as labels, shared } from '../i18n/en/labels'
|
||||||
import { Containers, Spacing } from '../styles/redesign'
|
import { Containers, Spacing } from '../styles'
|
||||||
|
|
||||||
const cancelButton = { text: shared.cancel, style: 'cancel' }
|
const cancelButton = { text: shared.cancel, style: 'cancel' }
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import AppTextInput from '../../common/app-text-input'
|
|||||||
import Button from '../../common/button'
|
import Button from '../../common/button'
|
||||||
|
|
||||||
import { requestHash, openDb } from '../../../db'
|
import { requestHash, openDb } from '../../../db'
|
||||||
import { Containers } from '../../../styles/redesign'
|
import { Containers } from '../../../styles'
|
||||||
import settings from '../../../i18n/en/settings'
|
import settings from '../../../i18n/en/settings'
|
||||||
import { shared } from '../../../i18n/en/labels'
|
import { shared } from '../../../i18n/en/labels'
|
||||||
|
|
||||||
@@ -5,8 +5,8 @@ import PropTypes from 'prop-types'
|
|||||||
|
|
||||||
import Button from '../../common/button'
|
import Button from '../../common/button'
|
||||||
|
|
||||||
import ConfirmWithPassword from '../shared/confirm-with-password'
|
import ConfirmWithPassword from '../common/confirm-with-password'
|
||||||
import alertError from '../shared/alert-error'
|
import alertError from '../common/alert-error'
|
||||||
|
|
||||||
import { clearDb, isDbEmpty } from '../../../db'
|
import { clearDb, isDbEmpty } from '../../../db'
|
||||||
import { hasEncryptionObservable } from '../../../local-storage'
|
import { hasEncryptionObservable } from '../../../local-storage'
|
||||||
@@ -94,7 +94,7 @@ export default class DeleteData extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button isCTA isSmall={false} onPress={this.alertBeforeDeletion}>
|
<Button isCTA onPress={this.alertBeforeDeletion}>
|
||||||
{settings.deleteSegment.title}
|
{settings.deleteSegment.title}
|
||||||
</Button>
|
</Button>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import Share from 'react-native-share'
|
|||||||
|
|
||||||
import { getCycleDaysSortedByDate } from '../../../db'
|
import { getCycleDaysSortedByDate } from '../../../db'
|
||||||
import getDataAsCsvDataUri from '../../../lib/import-export/export-to-csv'
|
import getDataAsCsvDataUri from '../../../lib/import-export/export-to-csv'
|
||||||
import alertError from '../shared/alert-error'
|
import alertError from '../common/alert-error'
|
||||||
import settings from '../../../i18n/en/settings'
|
import settings from '../../../i18n/en/settings'
|
||||||
import { EXPORT_FILE_NAME } from './constants'
|
import { EXPORT_FILE_NAME } from './constants'
|
||||||
import RNFS from 'react-native-fs'
|
import RNFS from 'react-native-fs'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import rnfs from 'react-native-fs'
|
|||||||
import importCsv from '../../../lib/import-export/import-from-csv'
|
import importCsv from '../../../lib/import-export/import-from-csv'
|
||||||
import { shared as sharedLabels } from '../../../i18n/en/labels'
|
import { shared as sharedLabels } from '../../../i18n/en/labels'
|
||||||
import labels from '../../../i18n/en/settings'
|
import labels from '../../../i18n/en/settings'
|
||||||
import alertError from '../shared/alert-error'
|
import alertError from '../common/alert-error'
|
||||||
|
|
||||||
export function openImportDialog(onImportData) {
|
export function openImportDialog(onImportData) {
|
||||||
Alert.alert(
|
Alert.alert(
|
||||||
|
|||||||
@@ -66,13 +66,13 @@ export default class DataManagement extends Component {
|
|||||||
<AppPage>
|
<AppPage>
|
||||||
<Segment title={labels.export.button}>
|
<Segment title={labels.export.button}>
|
||||||
<AppText>{labels.export.segmentExplainer}</AppText>
|
<AppText>{labels.export.segmentExplainer}</AppText>
|
||||||
<Button isCTA isSmall={false} onPress={this.startExport}>
|
<Button isCTA onPress={this.startExport}>
|
||||||
{labels.export.button}
|
{labels.export.button}
|
||||||
</Button>
|
</Button>
|
||||||
</Segment>
|
</Segment>
|
||||||
<Segment title={labels.import.button}>
|
<Segment title={labels.import.button}>
|
||||||
<AppText>{labels.import.segmentExplainer}</AppText>
|
<AppText>{labels.import.segmentExplainer}</AppText>
|
||||||
<Button isCTA isSmall={false} onPress={this.startImport}>
|
<Button isCTA onPress={this.startImport}>
|
||||||
{labels.import.button}
|
{labels.import.button}
|
||||||
</Button>
|
</Button>
|
||||||
</Segment>
|
</Segment>
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import Segment from '../common/segment'
|
|||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
import { navigate } from '../../slices/navigation'
|
import { navigate } from '../../slices/navigation'
|
||||||
|
|
||||||
import { Colors, Containers, Sizes } from '../../styles/redesign'
|
import { Colors, Containers, Sizes } from '../../styles'
|
||||||
|
|
||||||
const MenuItem = ({ item, last, navigate }) => {
|
const MenuItem = ({ item, last, navigate }) => {
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import TemperatureSlider from './temperature-slider'
|
|||||||
import Segment from '../../common/segment'
|
import Segment from '../../common/segment'
|
||||||
|
|
||||||
import { useCervixObservable, saveUseCervix } from '../../../local-storage'
|
import { useCervixObservable, saveUseCervix } from '../../../local-storage'
|
||||||
import { Colors, Spacing, Typography } from '../../../styles/redesign'
|
import { Colors, Spacing, Typography } from '../../../styles'
|
||||||
import labels from '../../../i18n/en/settings'
|
import labels from '../../../i18n/en/settings'
|
||||||
|
|
||||||
export default class Settings extends Component {
|
export default class Settings extends Component {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { StyleSheet } from 'react-native'
|
|||||||
|
|
||||||
import AppText from '../../common/app-text'
|
import AppText from '../../common/app-text'
|
||||||
|
|
||||||
import { Fonts, Sizes } from '../../../styles/redesign'
|
import { Fonts, Sizes } from '../../../styles'
|
||||||
|
|
||||||
const sliderRadius = 5
|
const sliderRadius = 5
|
||||||
const width = 50
|
const width = 50
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import React, { Component } from 'react'
|
|||||||
import { StyleSheet, View } from 'react-native'
|
import { StyleSheet, View } from 'react-native'
|
||||||
import Slider from '@ptomasroos/react-native-multi-slider'
|
import Slider from '@ptomasroos/react-native-multi-slider'
|
||||||
|
|
||||||
import alertError from '../shared/alert-error'
|
import alertError from '../common/alert-error'
|
||||||
import SliderLabel from './slider-label'
|
import SliderLabel from './slider-label'
|
||||||
|
|
||||||
import { scaleObservable, saveTempScale } from '../../../local-storage'
|
import { scaleObservable, saveTempScale } from '../../../local-storage'
|
||||||
import { Colors, Sizes } from '../../../styles/redesign'
|
import { Colors, Sizes } from '../../../styles'
|
||||||
import labels from '../../../i18n/en/settings'
|
import labels from '../../../i18n/en/settings'
|
||||||
import { TEMP_MIN, TEMP_MAX, TEMP_SLIDER_STEP } from '../../../config'
|
import { TEMP_MIN, TEMP_MAX, TEMP_SLIDER_STEP } from '../../../config'
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
|||||||
import PropTypes from 'prop-types'
|
import PropTypes from 'prop-types'
|
||||||
|
|
||||||
import Button from '../../common/button'
|
import Button from '../../common/button'
|
||||||
import ConfirmWithPassword from '../shared/confirm-with-password'
|
import ConfirmWithPassword from '../common/confirm-with-password'
|
||||||
|
|
||||||
import { changeEncryptionAndRestartApp } from '../../../db'
|
import { changeEncryptionAndRestartApp } from '../../../db'
|
||||||
import labels from '../../../i18n/en/settings'
|
import labels from '../../../i18n/en/settings'
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import AppTextInput from '../../common/app-text-input'
|
|||||||
import Button from '../../common/button'
|
import Button from '../../common/button'
|
||||||
|
|
||||||
import { requestHash, changeEncryptionAndRestartApp } from '../../../db'
|
import { requestHash, changeEncryptionAndRestartApp } from '../../../db'
|
||||||
import { Colors, Spacing } from '../../../styles/redesign'
|
import { Colors, Spacing } from '../../../styles'
|
||||||
import settings from '../../../i18n/en/settings'
|
import settings from '../../../i18n/en/settings'
|
||||||
|
|
||||||
const LISTENER_TYPE = 'create-or-change-pw'
|
const LISTENER_TYPE = 'create-or-change-pw'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import Button from '../../common/button'
|
|||||||
|
|
||||||
import EnterNewPassword from './enter-new-password'
|
import EnterNewPassword from './enter-new-password'
|
||||||
import showBackUpReminder from './show-backup-reminder'
|
import showBackUpReminder from './show-backup-reminder'
|
||||||
import ConfirmWithPassword from '../shared/confirm-with-password'
|
import ConfirmWithPassword from '../common/confirm-with-password'
|
||||||
|
|
||||||
import settings from '../../../i18n/en/settings'
|
import settings from '../../../i18n/en/settings'
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import cycleModule from '../lib/cycle'
|
|||||||
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
import {getCycleLengthStats as getCycleInfo} from '../lib/cycle-length'
|
||||||
import {stats as labels} from '../i18n/en/labels'
|
import {stats as labels} from '../i18n/en/labels'
|
||||||
|
|
||||||
import { Sizes, Spacing, Typography } from '../styles/redesign'
|
import { Sizes, Spacing, Typography } from '../styles'
|
||||||
|
|
||||||
const image = require('../assets/cycle-icon.png')
|
const image = require('../assets/cycle-icon.png')
|
||||||
|
|
||||||
|
|||||||
+7
-29
@@ -1,7 +1,10 @@
|
|||||||
import labels from './settings'
|
import labels from './settings'
|
||||||
const settingsTitles = labels.menuItems
|
const settingsTitles = labels.menuItems
|
||||||
|
|
||||||
export const homeRedesign = {
|
export const home = {
|
||||||
|
cycleDayNotEnoughInfo: "We don't have enough information to know what your current cycle day is.",
|
||||||
|
unknown: '?',
|
||||||
|
phase: n => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`,
|
||||||
cycleDay: ' day of your cycle',
|
cycleDay: ' day of your cycle',
|
||||||
cyclePhase: ' cycle phase - ',
|
cyclePhase: ' cycle phase - ',
|
||||||
addData: 'add data for today'
|
addData: 'add data for today'
|
||||||
@@ -23,12 +26,13 @@ export const shared = {
|
|||||||
ok: 'OK',
|
ok: 'OK',
|
||||||
confirmToProceed: 'Confirm to proceed',
|
confirmToProceed: 'Confirm to proceed',
|
||||||
date: 'Date',
|
date: 'Date',
|
||||||
cycleDayWithLinebreak: 'Cycle\nday',
|
|
||||||
loading: 'Loading ...',
|
loading: 'Loading ...',
|
||||||
noDataWarning: 'You haven\'t entered any data yet.',
|
noDataWarning: 'You haven\'t entered any data yet.',
|
||||||
noTemperatureWarning: 'You haven\'t entered any temperature data yet.',
|
noTemperatureWarning: 'You haven\'t entered any temperature data yet.',
|
||||||
noDataButtonText: 'Start entering data now',
|
noDataButtonText: 'Start entering data now',
|
||||||
enter: 'Enter',
|
enter: 'Enter',
|
||||||
|
remove: 'Remove',
|
||||||
|
learnMore: 'Learn more'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const headerTitles = {
|
export const headerTitles = {
|
||||||
@@ -51,17 +55,7 @@ export const headerTitles = {
|
|||||||
desire: 'Desire',
|
desire: 'Desire',
|
||||||
sex: 'Sex',
|
sex: 'Sex',
|
||||||
pain: 'Pain',
|
pain: 'Pain',
|
||||||
mood: 'Mood',
|
mood: 'Mood'
|
||||||
InfoSymptom: 'Info'
|
|
||||||
}
|
|
||||||
|
|
||||||
export const menuTitles = {
|
|
||||||
Home: 'Home',
|
|
||||||
Calendar: 'Calendar',
|
|
||||||
Chart: 'Chart',
|
|
||||||
Stats: 'Stats',
|
|
||||||
Settings: 'Settings',
|
|
||||||
PasswordPrompt: 'Drip'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const stats = {
|
export const stats = {
|
||||||
@@ -96,22 +90,6 @@ export const passwordPrompt = {
|
|||||||
reallyDeleteData: 'Yes, I am sure'
|
reallyDeleteData: 'Yes, I am sure'
|
||||||
}
|
}
|
||||||
|
|
||||||
export const home = {
|
|
||||||
editToday: 'add data for today',
|
|
||||||
cycleDayNotEnoughInfo: "We don't have enough information to know what your current cycle day is.",
|
|
||||||
unknown: '?',
|
|
||||||
cycleDayKnown: d => `Your last period started ${getDaysDescriptor(d)}.`,
|
|
||||||
trackPeriod: 'track your period',
|
|
||||||
checkFertility: 'check your fertility',
|
|
||||||
phase: n => `${['1st', '2nd', '3rd'][n - 1]} cycle phase`,
|
|
||||||
}
|
|
||||||
|
|
||||||
const getDaysDescriptor = cycleDayNumber => {
|
|
||||||
if (cycleDayNumber === 1) return 'today'
|
|
||||||
if (cycleDayNumber === 2) return 'yesterday'
|
|
||||||
return `${cycleDayNumber - 1} days ago`
|
|
||||||
}
|
|
||||||
|
|
||||||
export const fertilityStatus = {
|
export const fertilityStatus = {
|
||||||
fertile: 'fertile',
|
fertile: 'fertile',
|
||||||
infertile: 'infertile',
|
infertile: 'infertile',
|
||||||
|
|||||||
+5
-489
@@ -1,490 +1,6 @@
|
|||||||
import { StyleSheet } from 'react-native'
|
import Colors from './colors'
|
||||||
|
import Containers from './containers'
|
||||||
|
import Spacing from './spacing'
|
||||||
|
import Typography, { fonts as Fonts, sizes as Sizes } from './typography'
|
||||||
|
|
||||||
export const primaryColor = '#000D19'
|
export { Colors, Containers, Fonts, Spacing, Sizes, Typography }
|
||||||
export const secondaryColor = '#4FAFA7'
|
|
||||||
export const secondaryColorLight = '#91749d'
|
|
||||||
export const fontOnPrimaryColor = 'white'
|
|
||||||
export const shadesOfRed = [
|
|
||||||
'#e7999e',
|
|
||||||
'#db666d',
|
|
||||||
'#cf323d',
|
|
||||||
'#c3000d'
|
|
||||||
] // light to dark
|
|
||||||
export const cycleDayColor = '#29287f'
|
|
||||||
export const periodColor = '#802249'
|
|
||||||
|
|
||||||
const headerFont = 'Prompt-ExtraLight'
|
|
||||||
|
|
||||||
const textFont = 'Jost-400-Book'
|
|
||||||
const textFontBold = 'Jost-700-Bold'
|
|
||||||
const textFontItalic = 'OpenSans-LightItalic'
|
|
||||||
|
|
||||||
const regularSize = 16
|
|
||||||
const hintSize = 14
|
|
||||||
|
|
||||||
const defaultBottomMargin = 5
|
|
||||||
const defaultIndentation = 10
|
|
||||||
const defaultTopMargin = 10
|
|
||||||
const colorInActive = '#666666'
|
|
||||||
|
|
||||||
export const calendarTheme = {
|
|
||||||
textDayFontFamily: textFont,
|
|
||||||
textMonthFontFamily: textFontBold,
|
|
||||||
textDayHeaderFontFamily: textFont,
|
|
||||||
textDayFontSize: regularSize,
|
|
||||||
textMonthFontSize: regularSize,
|
|
||||||
textDayHeaderFontSize: hintSize,
|
|
||||||
textSectionTitleColor: 'grey'
|
|
||||||
}
|
|
||||||
|
|
||||||
export default StyleSheet.create({
|
|
||||||
appText: {
|
|
||||||
color: 'black',
|
|
||||||
fontFamily: textFont,
|
|
||||||
fontSize: regularSize,
|
|
||||||
letterSpacing: 0.5
|
|
||||||
},
|
|
||||||
hint: {
|
|
||||||
fontFamily: textFontItalic,
|
|
||||||
fontSize: hintSize,
|
|
||||||
},
|
|
||||||
paragraph: {
|
|
||||||
marginBottom: defaultBottomMargin
|
|
||||||
},
|
|
||||||
emphasis: {
|
|
||||||
fontWeight: 'bold',
|
|
||||||
fontFamily: textFontBold,
|
|
||||||
color: secondaryColor,
|
|
||||||
},
|
|
||||||
link: {
|
|
||||||
color: cycleDayColor,
|
|
||||||
textDecorationLine: 'underline'
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
fontSize: 18,
|
|
||||||
color: 'black',
|
|
||||||
marginBottom: defaultBottomMargin,
|
|
||||||
},
|
|
||||||
textWrappingView: {
|
|
||||||
marginHorizontal: defaultIndentation,
|
|
||||||
marginTop: defaultTopMargin
|
|
||||||
},
|
|
||||||
welcome: {
|
|
||||||
fontSize: 20,
|
|
||||||
fontFamily: 'serif',
|
|
||||||
margin: 30,
|
|
||||||
textAlign: 'center',
|
|
||||||
textAlignVertical: 'center'
|
|
||||||
},
|
|
||||||
dateHeader: {
|
|
||||||
fontSize: 20,
|
|
||||||
fontFamily: headerFont,
|
|
||||||
color: fontOnPrimaryColor,
|
|
||||||
textAlign: 'center',
|
|
||||||
},
|
|
||||||
headerText: {
|
|
||||||
fontSize: 30,
|
|
||||||
fontFamily: headerFont,
|
|
||||||
color: fontOnPrimaryColor,
|
|
||||||
textAlign: 'center',
|
|
||||||
paddingBottom: 4
|
|
||||||
},
|
|
||||||
accentCircle: {
|
|
||||||
borderColor: secondaryColor,
|
|
||||||
borderWidth: 1,
|
|
||||||
width: 40,
|
|
||||||
height: 40,
|
|
||||||
borderRadius: 100,
|
|
||||||
position: 'absolute',
|
|
||||||
alignSelf: 'center',
|
|
||||||
},
|
|
||||||
errorMessage: {
|
|
||||||
color: shadesOfRed[2],
|
|
||||||
marginLeft: 10,
|
|
||||||
marginTop: 6
|
|
||||||
},
|
|
||||||
button: {
|
|
||||||
paddingVertical: 10,
|
|
||||||
paddingHorizontal: 20,
|
|
||||||
borderRadius: 5,
|
|
||||||
alignItems: 'center',
|
|
||||||
},
|
|
||||||
homeButton: {
|
|
||||||
width: 200,
|
|
||||||
marginTop: 5
|
|
||||||
},
|
|
||||||
homeButtonText: {
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
homeView: {
|
|
||||||
alignItems: 'center',
|
|
||||||
marginVertical: 40
|
|
||||||
},
|
|
||||||
homeDescriptionText: {
|
|
||||||
width: 200,
|
|
||||||
marginBottom: defaultBottomMargin,
|
|
||||||
},
|
|
||||||
homeElement: {
|
|
||||||
marginBottom: 30,
|
|
||||||
flexDirection: 'row',
|
|
||||||
},
|
|
||||||
homeIconTextWrapper: {
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
width: 80,
|
|
||||||
position: 'absolute',
|
|
||||||
},
|
|
||||||
homeIconAndText: {
|
|
||||||
justifyContent: 'center'
|
|
||||||
},
|
|
||||||
homeCircle: {
|
|
||||||
borderRadius: 100,
|
|
||||||
borderWidth: 2.3,
|
|
||||||
width: 80,
|
|
||||||
height: 80,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
borderColor: secondaryColor,
|
|
||||||
},
|
|
||||||
iconText: {
|
|
||||||
fontSize: 25
|
|
||||||
},
|
|
||||||
cycleDayNumber: {
|
|
||||||
fontSize: 15,
|
|
||||||
color: fontOnPrimaryColor,
|
|
||||||
textAlign: 'center',
|
|
||||||
fontFamily: headerFont
|
|
||||||
},
|
|
||||||
symptomViewHeading: {
|
|
||||||
fontWeight: 'bold',
|
|
||||||
fontFamily: textFontBold,
|
|
||||||
flex: 1
|
|
||||||
},
|
|
||||||
symptomSection: {
|
|
||||||
marginBottom: 10
|
|
||||||
},
|
|
||||||
symptomBoxImage: {
|
|
||||||
width: 50,
|
|
||||||
height: 50
|
|
||||||
},
|
|
||||||
symptomBoxesView: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
flexWrap: 'wrap',
|
|
||||||
justifyContent: 'space-evenly'
|
|
||||||
},
|
|
||||||
symptomBox: {
|
|
||||||
borderColor: secondaryColor,
|
|
||||||
borderStyle: 'solid',
|
|
||||||
borderWidth: 1,
|
|
||||||
borderTopLeftRadius: 10,
|
|
||||||
borderTopRightRadius: 10,
|
|
||||||
alignItems: 'center',
|
|
||||||
marginTop: '10%',
|
|
||||||
paddingVertical: '6%',
|
|
||||||
marginHorizontal: 1,
|
|
||||||
width: 110,
|
|
||||||
height: 80,
|
|
||||||
},
|
|
||||||
symptomBoxActive: {
|
|
||||||
backgroundColor: secondaryColor,
|
|
||||||
},
|
|
||||||
symptomTextActive: {
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
symptomInFuture: {
|
|
||||||
borderColor: 'lightgrey',
|
|
||||||
color: 'lightgrey'
|
|
||||||
},
|
|
||||||
symptomDataBox: {
|
|
||||||
borderColor: secondaryColor,
|
|
||||||
borderStyle: 'solid',
|
|
||||||
borderLeftWidth: 1,
|
|
||||||
borderRightWidth: 1,
|
|
||||||
borderBottomWidth: 1,
|
|
||||||
borderBottomLeftRadius: 10,
|
|
||||||
borderBottomRightRadius: 10,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
padding: '3%',
|
|
||||||
marginHorizontal: 1,
|
|
||||||
width: 110,
|
|
||||||
height: 50,
|
|
||||||
},
|
|
||||||
symptomDataText: {
|
|
||||||
fontSize: 12
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
backgroundColor: primaryColor,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center',
|
|
||||||
height: 80
|
|
||||||
},
|
|
||||||
navigationArrow: {
|
|
||||||
padding: 20,
|
|
||||||
position: 'absolute'
|
|
||||||
},
|
|
||||||
navigationArrowLeft: { left: 0 },
|
|
||||||
navigationArrowRight: { right: 0 },
|
|
||||||
menu: {
|
|
||||||
backgroundColor: primaryColor,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'space-between',
|
|
||||||
flexDirection: 'row',
|
|
||||||
height: 60
|
|
||||||
},
|
|
||||||
menuItem: {
|
|
||||||
alignItems: 'center',
|
|
||||||
flex: 1,
|
|
||||||
paddingVertical: 15
|
|
||||||
},
|
|
||||||
menuText: {
|
|
||||||
color: fontOnPrimaryColor,
|
|
||||||
fontFamily: headerFont
|
|
||||||
},
|
|
||||||
menuTextInActive: {
|
|
||||||
color: colorInActive,
|
|
||||||
fontFamily: headerFont
|
|
||||||
},
|
|
||||||
temperatureTextInput: {
|
|
||||||
fontSize: 20,
|
|
||||||
color: 'black',
|
|
||||||
textAlign: 'center',
|
|
||||||
width: '30%'
|
|
||||||
},
|
|
||||||
temperatureTextInputSuggestion: {
|
|
||||||
color: '#939393'
|
|
||||||
},
|
|
||||||
symptomEditButton: {
|
|
||||||
width: 130
|
|
||||||
},
|
|
||||||
framedSegment: {
|
|
||||||
borderColor: secondaryColor,
|
|
||||||
borderStyle: 'solid',
|
|
||||||
borderWidth: 1,
|
|
||||||
borderRadius: 10,
|
|
||||||
marginTop: defaultTopMargin,
|
|
||||||
marginHorizontal: defaultIndentation,
|
|
||||||
padding: 7,
|
|
||||||
fontFamily: textFont
|
|
||||||
},
|
|
||||||
framedSegmentLast: {
|
|
||||||
marginBottom: defaultTopMargin,
|
|
||||||
},
|
|
||||||
framedSegmentTitle: {
|
|
||||||
fontWeight: 'bold',
|
|
||||||
fontFamily: textFontBold
|
|
||||||
},
|
|
||||||
framedSegmentInlineChildren: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
alignItems: 'center'
|
|
||||||
},
|
|
||||||
infoPopUpWrapper: {
|
|
||||||
position: 'absolute',
|
|
||||||
width: '100%',
|
|
||||||
height: '100%'
|
|
||||||
},
|
|
||||||
infoPopUp: {
|
|
||||||
backgroundColor: 'white',
|
|
||||||
padding: 15,
|
|
||||||
marginHorizontal: 20,
|
|
||||||
marginTop: 20,
|
|
||||||
maxHeight: '92%'
|
|
||||||
},
|
|
||||||
dimmed: {
|
|
||||||
position: 'absolute',
|
|
||||||
backgroundColor: 'black',
|
|
||||||
opacity: 0.5,
|
|
||||||
width: '100%',
|
|
||||||
height: '100%'
|
|
||||||
},
|
|
||||||
infoSymptomClose: {
|
|
||||||
alignItems: 'flex-end'
|
|
||||||
},
|
|
||||||
infoSymptomText: {
|
|
||||||
marginTop: 10
|
|
||||||
},
|
|
||||||
settingsButton: {
|
|
||||||
padding: 10,
|
|
||||||
alignItems: 'center',
|
|
||||||
margin: 10,
|
|
||||||
borderRadius: 5,
|
|
||||||
},
|
|
||||||
settingsButtonAccent: {
|
|
||||||
backgroundColor: secondaryColor
|
|
||||||
},
|
|
||||||
settingsButtonDisabled: {
|
|
||||||
backgroundColor: colorInActive
|
|
||||||
},
|
|
||||||
settingsButtonText: {
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
settingsButtonSecondaryText: {
|
|
||||||
color: secondaryColor
|
|
||||||
|
|
||||||
},
|
|
||||||
statsRow: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
flexWrap: 'wrap'
|
|
||||||
},
|
|
||||||
menuLabel: {
|
|
||||||
fontSize: 15,
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
selectBox: {
|
|
||||||
backgroundColor: 'lightgrey',
|
|
||||||
marginRight: 7,
|
|
||||||
marginVertical: 5,
|
|
||||||
paddingHorizontal: 15,
|
|
||||||
paddingVertical: 10,
|
|
||||||
borderRadius: 10
|
|
||||||
},
|
|
||||||
selectBoxActive: {
|
|
||||||
backgroundColor: secondaryColor,
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
selectBoxTextActive: {
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
selectBoxSection: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
flexWrap: 'wrap',
|
|
||||||
marginTop: 7,
|
|
||||||
},
|
|
||||||
selectTabGroup: {
|
|
||||||
marginTop: 7,
|
|
||||||
flexDirection: 'row'
|
|
||||||
},
|
|
||||||
selectTab: {
|
|
||||||
backgroundColor: 'lightgrey',
|
|
||||||
borderStyle: 'solid',
|
|
||||||
borderLeftWidth: 1,
|
|
||||||
paddingVertical: 10,
|
|
||||||
paddingHorizontal: 15,
|
|
||||||
borderColor: 'white',
|
|
||||||
marginBottom: 3,
|
|
||||||
alignItems: 'center',
|
|
||||||
justifyContent: 'center'
|
|
||||||
},
|
|
||||||
selectTabActive: {
|
|
||||||
backgroundColor: secondaryColor,
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
selectTabLast: {
|
|
||||||
borderTopRightRadius: 10,
|
|
||||||
borderBottomRightRadius: 10,
|
|
||||||
},
|
|
||||||
selectTabFirst: {
|
|
||||||
borderTopLeftRadius: 10,
|
|
||||||
borderBottomLeftRadius: 10,
|
|
||||||
borderLeftWidth: null
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
marginHorizontal: 10,
|
|
||||||
marginTop: 20,
|
|
||||||
},
|
|
||||||
calendarToday: {
|
|
||||||
fontWeight: 'bold',
|
|
||||||
fontSize: 20,
|
|
||||||
color: secondaryColor,
|
|
||||||
marginTop: 1
|
|
||||||
},
|
|
||||||
passwordField: {
|
|
||||||
marginHorizontal: 10,
|
|
||||||
marginTop: 10
|
|
||||||
},
|
|
||||||
textInputField: {
|
|
||||||
padding: 10,
|
|
||||||
marginVertical: 10,
|
|
||||||
backgroundColor: 'white',
|
|
||||||
borderColor: secondaryColor,
|
|
||||||
borderStyle: 'solid',
|
|
||||||
borderWidth: 1,
|
|
||||||
},
|
|
||||||
passwordPromptPage: {
|
|
||||||
padding: 30,
|
|
||||||
flex: 1,
|
|
||||||
justifyContent: 'center',
|
|
||||||
alignItems: 'center'
|
|
||||||
},
|
|
||||||
passwordPromptField: {
|
|
||||||
padding: 10,
|
|
||||||
marginTop: 10,
|
|
||||||
marginHorizontal: 10,
|
|
||||||
borderBottomWidth: 3,
|
|
||||||
borderBottomColor: primaryColor,
|
|
||||||
width: '100%',
|
|
||||||
fontSize: 20,
|
|
||||||
marginVertical: 20
|
|
||||||
},
|
|
||||||
passwordPromptButton: {
|
|
||||||
backgroundColor: secondaryColor,
|
|
||||||
padding: 10,
|
|
||||||
alignItems: 'center',
|
|
||||||
margin: 10,
|
|
||||||
width: '100%',
|
|
||||||
borderRadius: 10
|
|
||||||
},
|
|
||||||
passwordPromptButtonText: {
|
|
||||||
color: fontOnPrimaryColor,
|
|
||||||
fontSize: 20
|
|
||||||
},
|
|
||||||
passwordPromptForgotPasswordText: {
|
|
||||||
marginTop: 20,
|
|
||||||
color: 'grey'
|
|
||||||
},
|
|
||||||
headerDeleteButton: {
|
|
||||||
paddingHorizontal: 20,
|
|
||||||
paddingVertical: 20,
|
|
||||||
position: 'absolute',
|
|
||||||
right: 0
|
|
||||||
},
|
|
||||||
infoButtonSymptomView: {
|
|
||||||
position: 'absolute',
|
|
||||||
padding: 15,
|
|
||||||
right: 0
|
|
||||||
},
|
|
||||||
licensePage: {
|
|
||||||
paddingVertical: 20,
|
|
||||||
paddingHorizontal: 10
|
|
||||||
},
|
|
||||||
licenseButtons: {
|
|
||||||
flexDirection: 'row',
|
|
||||||
justifyContent: 'flex-end',
|
|
||||||
marginTop: 40
|
|
||||||
},
|
|
||||||
licenseButton: {
|
|
||||||
marginLeft: 30,
|
|
||||||
width: 100
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
export const iconStyles = {
|
|
||||||
navigationArrow: {
|
|
||||||
size: 20,
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
symptomHeaderIcons: {
|
|
||||||
size: 20,
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
symptomBox: {
|
|
||||||
size: 40
|
|
||||||
},
|
|
||||||
symptomBoxActive: {
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
info: {
|
|
||||||
color: secondaryColor,
|
|
||||||
fontSize: 25
|
|
||||||
},
|
|
||||||
menuIcon: {
|
|
||||||
size: 20,
|
|
||||||
color: fontOnPrimaryColor
|
|
||||||
},
|
|
||||||
menuIconInactive: {
|
|
||||||
color: colorInActive,
|
|
||||||
},
|
|
||||||
infoPopUpClose: {
|
|
||||||
size: 25
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
import Colors from './colors'
|
|
||||||
import Containers from './containers'
|
|
||||||
import Spacing from './spacing'
|
|
||||||
import Typography, { fonts as Fonts, sizes as Sizes } from './typography'
|
|
||||||
|
|
||||||
export { Colors, Containers, Fonts, Spacing, Sizes, Typography }
|
|
||||||
Reference in New Issue
Block a user