Merge branch '575-activate-nfp-setting' into 'main'
Disable temperature slider for iOS only Closes #575 See merge request bloodyhealth/drip!414
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import { StyleSheet, View } from 'react-native'
|
import { Platform, StyleSheet, View } from 'react-native'
|
||||||
|
|
||||||
import AppIcon from '../../common/app-icon'
|
import AppIcon from '../../common/app-icon'
|
||||||
import AppPage from '../../common/app-page'
|
import AppPage from '../../common/app-page'
|
||||||
import AppSwitch from '../../common/app-switch'
|
import AppSwitch from '../../common/app-switch'
|
||||||
import AppText from '../../common/app-text'
|
import AppText from '../../common/app-text'
|
||||||
// import TemperatureSlider from './temperature-slider'
|
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'
|
||||||
@@ -17,7 +17,7 @@ export default class Settings extends Component {
|
|||||||
super(props)
|
super(props)
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
shouldUseCervix: useCervixObservable.value
|
shouldUseCervix: useCervixObservable.value,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,8 +28,9 @@ export default class Settings extends Component {
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { shouldUseCervix } = this.state
|
const { shouldUseCervix } = this.state
|
||||||
const cervixText = shouldUseCervix ?
|
const cervixText = shouldUseCervix
|
||||||
labels.useCervix.cervixModeOn : labels.useCervix.cervixModeOff
|
? labels.useCervix.cervixModeOn
|
||||||
|
: labels.useCervix.cervixModeOff
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<AppPage>
|
<AppPage>
|
||||||
@@ -40,11 +41,13 @@ export default class Settings extends Component {
|
|||||||
value={shouldUseCervix}
|
value={shouldUseCervix}
|
||||||
/>
|
/>
|
||||||
</Segment>
|
</Segment>
|
||||||
{/* disabled temporarily, TODO https://gitlab.com/bloodyhealth/drip/-/issues/545 */}
|
{/* for iOS disabled temporarily, TODO https://gitlab.com/bloodyhealth/drip/-/issues/545 */}
|
||||||
{/* <Segment title={labels.tempScale.segmentTitle}>
|
{Platform.OS !== 'ios' && (
|
||||||
<AppText>{labels.tempScale.segmentExplainer}</AppText>
|
<Segment title={labels.tempScale.segmentTitle}>
|
||||||
<TemperatureSlider />
|
<AppText>{labels.tempScale.segmentExplainer}</AppText>
|
||||||
</Segment> */}
|
<TemperatureSlider />
|
||||||
|
</Segment>
|
||||||
|
)}
|
||||||
<Segment last>
|
<Segment last>
|
||||||
<View style={styles.line}>
|
<View style={styles.line}>
|
||||||
<AppIcon
|
<AppIcon
|
||||||
@@ -63,13 +66,13 @@ export default class Settings extends Component {
|
|||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
icon: {
|
icon: {
|
||||||
marginRight: Spacing.base
|
marginRight: Spacing.base,
|
||||||
},
|
},
|
||||||
line: {
|
line: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center'
|
alignItems: 'center',
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
...Typography.subtitle
|
...Typography.subtitle,
|
||||||
}
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user