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

Use settings segments

parent c6b490b2
No related branches found
No related tags found
No related merge requests found
...@@ -13,6 +13,7 @@ export const settings = { ...@@ -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 = { ...@@ -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'
} }
......
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 { ...@@ -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>
) )
......
...@@ -92,6 +92,15 @@ export default StyleSheet.create({ ...@@ -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
} }
}) })
\ 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