parent
6c2cf9c460
commit
ef315a96c5
|
@ -2,7 +2,7 @@
|
||||||
"expo": {
|
"expo": {
|
||||||
"name": "GT2 Green Travel Carbon App",
|
"name": "GT2 Green Travel Carbon App",
|
||||||
"slug": "GT2standalone",
|
"slug": "GT2standalone",
|
||||||
"version": "2.0.0",
|
"version": "2.0.4",
|
||||||
"orientation": "default",
|
"orientation": "default",
|
||||||
"description": "Travel Carbon Footprint (simplified version)",
|
"description": "Travel Carbon Footprint (simplified version)",
|
||||||
"icon": "./assets/images/icon.png",
|
"icon": "./assets/images/icon.png",
|
||||||
|
|
|
@ -18,13 +18,13 @@ export default function ScreenInfo() {
|
||||||
}
|
}
|
||||||
export function ScreenInfo2() {
|
export function ScreenInfo2() {
|
||||||
return (
|
return (
|
||||||
<View style={styles.settingsContainer}>
|
<View>
|
||||||
<Text
|
<Text
|
||||||
style={styles.settingsText}
|
style={styles.tripControlText}
|
||||||
lightColor="rgba(0,0,0,0.8)"
|
lightColor="rgba(0,0,0,0.8)"
|
||||||
darkColor="rgba(255,255,255,0.8)">
|
darkColor="rgba(255,255,255,0.8)">
|
||||||
Pause trip if fuel burning interrupted.
|
{'Pause trip if fuel burning interrupted.\n'}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ export function ScreenInfo4() {
|
||||||
style={styles.sensitive}
|
style={styles.sensitive}
|
||||||
lightColor="rgba(0,0,0,0.8)"
|
lightColor="rgba(0,0,0,0.8)"
|
||||||
darkColor="rgba(255,255,255,0.8)">
|
darkColor="rgba(255,255,255,0.8)">
|
||||||
{'higher sensitivity may cause spurious motion at rest'}
|
{'set CO2 rate above or \nselect fuel type below\nhigher sensitivity may cause\n spurious motion at rest'}
|
||||||
</Text>
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
@ -91,7 +91,8 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
sensitive: {
|
sensitive: {
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
fontSize: 10,
|
fontSize: 14,
|
||||||
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
titleText: {
|
titleText: {
|
||||||
color: 'white',
|
color: 'white',
|
||||||
|
@ -109,6 +110,12 @@ const styles = StyleSheet.create({
|
||||||
lineHeight: 24,
|
lineHeight: 24,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
},
|
},
|
||||||
|
tripControlText: {
|
||||||
|
fontSize: 14,
|
||||||
|
fontWeight: 'bold',
|
||||||
|
lineHeight: 24,
|
||||||
|
textAlign: 'center',
|
||||||
|
},
|
||||||
versionText: {
|
versionText: {
|
||||||
color: 'yellow',
|
color: 'yellow',
|
||||||
fontSize: 10,
|
fontSize: 10,
|
||||||
|
|
|
@ -18,7 +18,11 @@ export default function SettingsScreen( { navigation }: RootTabScreenProps<'Sett
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
<Text style={styles.title}>Model Settings</Text>
|
<Text style={styles.title}>Model Settings</Text>
|
||||||
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
|
<View style={styles.separator} lightColor="#eee" darkColor="rgba(255,255,255,0.1)" />
|
||||||
<Text style={styles.caption}>{'\nset custom CO2 rate or use buttons below'}</Text>
|
<View style={styles.captions}>
|
||||||
|
<Text style={styles.caption}>CO2 / km</Text>
|
||||||
|
<Text>{' '}</Text>
|
||||||
|
<Text style={styles.caption}>sensitivity</Text>
|
||||||
|
</View>
|
||||||
<View style={styles.inputs}>
|
<View style={styles.inputs}>
|
||||||
<TextInput
|
<TextInput
|
||||||
style={styles.input}
|
style={styles.input}
|
||||||
|
@ -27,10 +31,7 @@ export default function SettingsScreen( { navigation }: RootTabScreenProps<'Sett
|
||||||
value={rate}
|
value={rate}
|
||||||
placeholder={Trips.co2Rate.toString()}
|
placeholder={Trips.co2Rate.toString()}
|
||||||
keyboardType="numeric"
|
keyboardType="numeric"
|
||||||
/>
|
/>
|
||||||
</View>
|
|
||||||
<Text style={styles.caption}>{'\nsensitivity'}</Text>
|
|
||||||
<View style={styles.inputs}>
|
|
||||||
<TextInput
|
<TextInput
|
||||||
style={styles.input}
|
style={styles.input}
|
||||||
returnKeyType={'done'}
|
returnKeyType={'done'}
|
||||||
|
@ -41,7 +42,7 @@ export default function SettingsScreen( { navigation }: RootTabScreenProps<'Sett
|
||||||
value={sens}
|
value={sens}
|
||||||
placeholder={Trips.sensitivity.toString()}
|
placeholder={Trips.sensitivity.toString()}
|
||||||
keyboardType="numeric"
|
keyboardType="numeric"
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<ScreenInfo4/>
|
<ScreenInfo4/>
|
||||||
<View style={styles.controls} >
|
<View style={styles.controls} >
|
||||||
|
@ -90,7 +91,7 @@ const styles = StyleSheet.create({
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
},
|
},
|
||||||
switch: {
|
switch: {
|
||||||
marginVertical: 20,
|
marginVertical: 2,
|
||||||
},
|
},
|
||||||
container: {
|
container: {
|
||||||
flex: 1,
|
flex: 1,
|
||||||
|
@ -103,8 +104,14 @@ const styles = StyleSheet.create({
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
},
|
},
|
||||||
|
captions: {
|
||||||
|
marginVertical: 15,
|
||||||
|
width: "90%",
|
||||||
|
flexDirection: 'row',
|
||||||
|
justifyContent: "center"
|
||||||
|
},
|
||||||
inputs: {
|
inputs: {
|
||||||
marginVertical: 5,
|
marginVertical: -20,
|
||||||
width: "80%",
|
width: "80%",
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
|
@ -120,7 +127,7 @@ const styles = StyleSheet.create({
|
||||||
},
|
},
|
||||||
input: {
|
input: {
|
||||||
height: 40,
|
height: 40,
|
||||||
margin: 30,
|
margin: 10,
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
padding: 10,
|
padding: 10,
|
||||||
},
|
},
|
||||||
|
|
|
@ -71,7 +71,7 @@ export default function TripScreen( { navigation }: RootTabScreenProps<'Trip'>)
|
||||||
title={sButtonText}
|
title={sButtonText}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
if (!getAdvised()) {
|
if (!getAdvised()) {
|
||||||
Alert.alert("2.0.n runs in foreground only.");
|
Alert.alert("GT2 2.0.n doesn't runs in background.");
|
||||||
setAdvised();
|
setAdvised();
|
||||||
}
|
}
|
||||||
if (!Trips.inProgress) {startTrip();
|
if (!Trips.inProgress) {startTrip();
|
||||||
|
|
Loading…
Reference in New Issue