diff --git a/components/cycle-day/labels/labels.js b/components/cycle-day/labels/labels.js index 05473c1..5566f73 100644 --- a/components/cycle-day/labels/labels.js +++ b/components/cycle-day/labels/labels.js @@ -73,7 +73,14 @@ export const fertilityStatus = { export const temperature = { outOfRangeWarning: 'This temperature value is out of the current range for the temperature chart. You can change the range in the settings.', outOfAbsoluteRangeWarning: 'This temperature value is too high or low to be shown on the temperature chart.', - saveAnyway: 'Save anyway' + saveAnyway: 'Save anyway', + temperature: { + explainer: 'Take your temperature right after waking up, before getting out of bed' + }, + note: { + explainer: 'Is there anything that could have influenced this value, such as bad sleep or alcohol consumption?' + }, + excludeExplainer: "You can exclude this value if you don't want to use it for fertility detection" } export const noteExplainer = "Anything you want to add for the day?" diff --git a/components/cycle-day/symptoms/bleeding.js b/components/cycle-day/symptoms/bleeding.js index 25e697c..76985f4 100644 --- a/components/cycle-day/symptoms/bleeding.js +++ b/components/cycle-day/symptoms/bleeding.js @@ -49,7 +49,7 @@ export default class Bleeding extends Component { { diff --git a/components/cycle-day/symptoms/cervix.js b/components/cycle-day/symptoms/cervix.js index 4b792be..7d2ce6c 100644 --- a/components/cycle-day/symptoms/cervix.js +++ b/components/cycle-day/symptoms/cervix.js @@ -81,7 +81,7 @@ export default class Cervix extends Component { { diff --git a/components/cycle-day/symptoms/mucus.js b/components/cycle-day/symptoms/mucus.js index 6e80ffc..ef730f7 100644 --- a/components/cycle-day/symptoms/mucus.js +++ b/components/cycle-day/symptoms/mucus.js @@ -70,7 +70,7 @@ export default class Mucus extends Component { { diff --git a/components/cycle-day/symptoms/symptom-section.js b/components/cycle-day/symptoms/symptom-section.js index c1af4d7..8d0603b 100644 --- a/components/cycle-day/symptoms/symptom-section.js +++ b/components/cycle-day/symptoms/symptom-section.js @@ -4,14 +4,25 @@ import { SymptomSectionHeader, AppText } from '../../app-text' export default class SymptomSection extends Component { render() { + const p = this.props + let placeHeadingInline + if (!p.explainer && p.inline) { + placeHeadingInline = { + flexDirection: 'row', + alignItems: "center" + } + } return ( - - {this.props.header} - + + {p.header} + - {this.props.explainer} + {p.explainer} - {this.props.children} + {p.children} ) diff --git a/components/cycle-day/symptoms/temperature.js b/components/cycle-day/symptoms/temperature.js index 336fa43..6be7111 100644 --- a/components/cycle-day/symptoms/temperature.js +++ b/components/cycle-day/symptoms/temperature.js @@ -12,12 +12,13 @@ import DateTimePicker from 'react-native-modal-datetime-picker-nevo' import { getPreviousTemperature, saveSymptom } from '../../../db' import styles from '../../../styles' import { LocalTime, ChronoUnit } from 'js-joda' -import { temperature as tempLabels } from '../labels/labels' +import { temperature as labels } from '../labels/labels' import { scaleObservable } from '../../../local-storage' import { shared } from '../../labels' import ActionButtonFooter from './action-button-footer' import config from '../../../config' import { SymptomSectionHeader } from '../../app-text' +import SymptomSection from './symptom-section' const minutes = ChronoUnit.MINUTES @@ -72,9 +73,9 @@ export default class Temp extends Component { const scale = scaleObservable.value let warningMsg if (value < absolute.min || value > absolute.max) { - warningMsg = tempLabels.outOfAbsoluteRangeWarning + warningMsg = labels.outOfAbsoluteRangeWarning } else if (value < scale.min || value > scale.max) { - warningMsg = tempLabels.outOfRangeWarning + warningMsg = labels.outOfRangeWarning } if (warningMsg) { @@ -98,16 +99,21 @@ export default class Temp extends Component { - - Temperature (°C) + this.setState(val)} isSuggestion={this.state.isSuggestion} /> - - - Time + + { @@ -116,40 +122,44 @@ export default class Temp extends Component { }} value={this.state.time} /> - - { - this.setState({ - time: `${jsDate.getHours()}:${jsDate.getMinutes()}`, - isTimePickerVisible: false - }) - }} - onCancel={() => this.setState({ isTimePickerVisible: false })} - /> - Note - + { + this.setState({ + time: `${jsDate.getHours()}:${jsDate.getMinutes()}`, + isTimePickerVisible: false + }) + }} + onCancel={() => this.setState({ isTimePickerVisible: false })} + /> + + { this.setState({ note: val }) }} /> - - - Exlude + + { this.setState({ exclude: val }) }} value={this.state.exclude} /> - +