Skip to content
Snippets Groups Projects
Commit ff739256 authored by Julia Friesel's avatar Julia Friesel
Browse files

Merge branch '153-note-about-minus-20-rule-not-taken-into-account' into 'master'

Resolve "Note about Minus 20 rule not taken into account"

Closes #153

See merge request bloodyhealth/drip!141
parents 2c48d59f 0aa81795
No related branches found
No related tags found
No related merge requests found
import React, { Component } from 'react' import React from 'react'
import { Text } from 'react-native' import { Text } from 'react-native'
import styles from "../styles" import styles from "../styles"
export default class AppText extends Component { export default function AppText(props) {
render() { return (
return ( <Text
<Text style={[styles.appText, this.props.style]}> style={[styles.appText, props.style]}
{this.props.children} onPress={props.onPress}
</Text> >
) {props.children}
} </Text>
)
} }
export class AppTextLight extends Component { export function AppTextLight(props) {
render() { return (
return ( <Text style={[styles.appTextLight, props.style]}>
<Text style={[styles.appTextLight, this.props.style]}> {props.children}
{this.props.children} </Text>
</Text> )
)
}
} }
export class SymptomSectionHeader extends Component { export function SymptomSectionHeader(props) {
render() { return (
return ( <AppText style={styles.symptomViewHeading}>
<AppText style={styles.symptomViewHeading}> {props.children}
{this.props.children} </AppText>
</AppText> )
)
}
} }
\ No newline at end of file
import React from 'react'
import { Linking } from 'react-native'
import AppText from "./app-text"
import styles from '../styles';
export default function Link(props) {
return (
<AppText
style={styles.link}
onPress={() => Linking.openURL(props.href)}
>{props.text}</AppText>
)
}
\ No newline at end of file
...@@ -2,11 +2,13 @@ import React, { Component } from 'react' ...@@ -2,11 +2,13 @@ import React, { Component } from 'react'
import { import {
ScrollView, View ScrollView, View
} from 'react-native' } from 'react-native'
import styles from '../../../styles' import styles, { iconStyles } from '../../../styles'
import labels from '../../../i18n/en/settings' import labels from '../../../i18n/en/settings'
import AppText from '../../app-text' import AppText from '../../app-text'
import TempSlider from './temp-slider' import TempSlider from './temp-slider'
import UseCervixSetting from './use-cervix' import UseCervixSetting from './use-cervix'
import Icon from 'react-native-vector-icons/Entypo'
import Link from '../../link'
export default class Settings extends Component { export default class Settings extends Component {
constructor(props) { constructor(props) {
...@@ -25,6 +27,17 @@ export default class Settings extends Component { ...@@ -25,6 +27,17 @@ export default class Settings extends Component {
<AppText>{labels.tempScale.segmentExplainer}</AppText> <AppText>{labels.tempScale.segmentExplainer}</AppText>
<TempSlider/> <TempSlider/>
</View> </View>
<View style={[styles.settingsSegment, styles.settingsSegmentLast]}>
<View style={{flexDirection: 'row', alignItems: 'center'}}>
<Icon name="info-with-circle" style={iconStyles.infoInHeading}/>
<AppText style={styles.settingsSegmentTitle}>{`${labels.preOvu.title} `}</AppText>
</View>
<AppText>
{labels.preOvu.note1}
<Link text={labels.preOvu.link} href="https://gitlab.com/bloodyhealth/drip/wikis/home" />
{labels.preOvu.note2}
</AppText>
</View>
</ScrollView> </ScrollView>
) )
} }
......
export default { export default {
menuTitles: { menuTitles: {
reminders: 'Reminders', reminders: 'Reminders',
...@@ -78,5 +79,11 @@ export default { ...@@ -78,5 +79,11 @@ export default {
aboutSection: { aboutSection: {
title: 'About', title: 'About',
segmentExplainer: 'Please note that your data is stored locally on your phone and not on a server. We want to ensure that you stay in control of those sensitive information. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don\'t hesitate to contact us via email (bl00dyhealth@mailbox.org). You can also contribute to the code base on GitLab (https://gitlab.com/bloodyhealth/drip/).', segmentExplainer: 'Please note that your data is stored locally on your phone and not on a server. We want to ensure that you stay in control of those sensitive information. If you are planning to switch or reset your phone, please remember to export your data before doing so. You can reinstall the app afterwards and import your data.\n\nIf you encounter any technical issues, don\'t hesitate to contact us via email (bl00dyhealth@mailbox.org). You can also contribute to the code base on GitLab (https://gitlab.com/bloodyhealth/drip/).',
},
preOvu: {
title: 'Infertile days at cycle start',
note1: "drip applies NFP's rules for calculating infertile days at the start of the cycle (see the ",
link: 'wiki',
note2: " for more info). However, drip does not currently apply the so called 20-day-rule, which determines infertile days at the cycle start from past cycle lengths in case no past symptothermal info is available."
} }
} }
\ No newline at end of file
...@@ -40,6 +40,10 @@ export default StyleSheet.create({ ...@@ -40,6 +40,10 @@ export default StyleSheet.create({
emphasis: { emphasis: {
fontWeight: 'bold', fontWeight: 'bold',
}, },
link: {
color: cycleDayColor,
textDecorationLine: 'underline'
},
title: { title: {
fontSize: 18, fontSize: 18,
color: 'black', color: 'black',
...@@ -259,6 +263,9 @@ export default StyleSheet.create({ ...@@ -259,6 +263,9 @@ export default StyleSheet.create({
marginHorizontal: defaultIndentation, marginHorizontal: defaultIndentation,
padding: 7, padding: 7,
}, },
settingsSegmentLast: {
marginBottom: defaultTopMargin,
},
settingsSegmentTitle: { settingsSegmentTitle: {
fontWeight: 'bold' fontWeight: 'bold'
}, },
...@@ -409,4 +416,8 @@ export const iconStyles = { ...@@ -409,4 +416,8 @@ export const iconStyles = {
menuIconInactive: { menuIconInactive: {
color: colorInActive, color: colorInActive,
}, },
infoInHeading: {
marginRight: 5,
color: 'black'
}
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment