Use settings segments
This commit is contained in:
@@ -13,6 +13,7 @@ export const settings = {
|
|||||||
title: 'My Drip data export',
|
title: 'My Drip data export',
|
||||||
subject: 'My Drip data export',
|
subject: 'My Drip data export',
|
||||||
button: 'Export data',
|
button: 'Export data',
|
||||||
|
segmentExplainer: 'Export data in CSV format for backup or so you can use it elsewhere'
|
||||||
},
|
},
|
||||||
import: {
|
import: {
|
||||||
button: 'Import data',
|
button: 'Import data',
|
||||||
@@ -28,10 +29,12 @@ export const settings = {
|
|||||||
},
|
},
|
||||||
success: {
|
success: {
|
||||||
message: 'Data successfully imported'
|
message: 'Data successfully imported'
|
||||||
}
|
},
|
||||||
|
segmentExplainer: 'Import data in CSV format'
|
||||||
},
|
},
|
||||||
tempScale: {
|
tempScale: {
|
||||||
segmentTitle: 'Change temperature scale',
|
segmentTitle: 'Temperature scale',
|
||||||
|
segmentExplainer: 'Change the minimum and maximum value for entered temperatures',
|
||||||
min: 'Min',
|
min: 'Min',
|
||||||
max: 'Max'
|
max: 'Max'
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-15
@@ -1,7 +1,7 @@
|
|||||||
import React, { Component } from 'react'
|
import React, { Component } from 'react'
|
||||||
import {
|
import {
|
||||||
View,
|
View,
|
||||||
Button,
|
TouchableOpacity,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
Alert,
|
Alert,
|
||||||
Text
|
Text
|
||||||
@@ -22,22 +22,27 @@ export default class Settings extends Component {
|
|||||||
return (
|
return (
|
||||||
<ScrollView>
|
<ScrollView>
|
||||||
<View style={styles.settingsSegment}>
|
<View style={styles.settingsSegment}>
|
||||||
<Text>{labels.tempScale.segmentTitle}</Text>
|
<Text style={styles.settingsSegmentTitle}>{labels.tempScale.segmentTitle}</Text>
|
||||||
|
<Text>{labels.tempScale.segmentExplainer}</Text>
|
||||||
<TempSlider/>
|
<TempSlider/>
|
||||||
</View>
|
</View>
|
||||||
<View style={styles.homeButtons}>
|
<View style={styles.settingsSegment}>
|
||||||
<View style={styles.homeButton}>
|
<Text style={styles.settingsSegmentTitle}>{labels.export.button}</Text>
|
||||||
<Button
|
<Text>{labels.export.segmentExplainer}</Text>
|
||||||
onPress={ openShareDialogAndExport }
|
<TouchableOpacity
|
||||||
title={labels.export.button}>
|
onPress={openShareDialogAndExport}
|
||||||
</Button>
|
style={styles.settingsButton}>
|
||||||
</View>
|
<Text>{labels.export.button}</Text>
|
||||||
<View style={styles.homeButton}>
|
</TouchableOpacity>
|
||||||
<Button
|
</View>
|
||||||
title={labels.import.button}
|
<View style={styles.settingsSegment}>
|
||||||
onPress={ openImportDialogAndImport }>
|
<Text style={styles.settingsSegmentTitle}>{labels.import.button}</Text>
|
||||||
</Button>
|
<Text>{labels.import.segmentExplainer}</Text>
|
||||||
</View>
|
<TouchableOpacity
|
||||||
|
onPress={openImportDialogAndImport}
|
||||||
|
style={styles.settingsButton}>
|
||||||
|
<Text>{labels.import.button}</Text>
|
||||||
|
</TouchableOpacity>
|
||||||
</View>
|
</View>
|
||||||
</ScrollView>
|
</ScrollView>
|
||||||
)
|
)
|
||||||
|
|||||||
+10
-1
@@ -92,6 +92,15 @@ export default StyleSheet.create({
|
|||||||
settingsSegment: {
|
settingsSegment: {
|
||||||
backgroundColor: 'lightgrey',
|
backgroundColor: 'lightgrey',
|
||||||
padding: 10,
|
padding: 10,
|
||||||
marginTop: 10
|
marginTop: 10,
|
||||||
|
},
|
||||||
|
settingsSegmentTitle: {
|
||||||
|
fontWeight: 'bold'
|
||||||
|
},
|
||||||
|
settingsButton: {
|
||||||
|
backgroundColor: 'darkgrey',
|
||||||
|
padding: 10,
|
||||||
|
alignItems: 'center',
|
||||||
|
margin: 10
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user