Skip to content
This repository has been archived by the owner on Nov 16, 2020. It is now read-only.

Commit

Permalink
Merge pull request #50 from ito-org/more-mint
Browse files Browse the repository at this point in the history
Implement more mockups
  • Loading branch information
haveyaseen authored Apr 13, 2020
2 parents 1412470 + 2d2630f commit 228ba4f
Show file tree
Hide file tree
Showing 4 changed files with 177 additions and 35 deletions.
6 changes: 3 additions & 3 deletions App/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {createStackNavigator} from '@react-navigation/stack';
import {Loading} from './screens/Loading';
import {Onboarding} from './screens/Onboarding';
import {OnboardingHow} from './screens/OnboardingHow';
import {Home} from './screens/Home';
// import {Home} from './screens/Home';
import {HomeBluetooth} from './screens/HomeBluetooth';
import {HomeTour} from './screens/HomeTour';
import {Endangerment} from './screens/Endangerment';
Expand All @@ -31,7 +31,7 @@ export type RootStackParamList = {
Onboarding: undefined;
OnboardingHow: undefined;
HomeTour: undefined;
Home: undefined;
// Home: undefined;
HomeBluetooth: undefined;
Endangerment: undefined;
BluetoothNotification: undefined;
Expand All @@ -53,7 +53,7 @@ const App = () => {
<Stack.Screen name="Onboarding" component={Onboarding} />
<Stack.Screen name="OnboardingHow" component={OnboardingHow} />
<Stack.Screen name="HomeTour" component={HomeTour} />
<Stack.Screen name="Home" component={Home} />
{/* <Stack.Screen name="Home" component={Home} /> */}
<Stack.Screen name="HomeBluetooth" component={HomeBluetooth} />
<Stack.Screen name="Endangerment" component={Endangerment} />
<Stack.Screen
Expand Down
69 changes: 51 additions & 18 deletions App/screens/Endangerment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,68 @@ import {View, StyleSheet, Text, TouchableWithoutFeedback} from 'react-native';
import Icon from 'react-native-vector-icons/Feather';
import {StackNavigationProp} from '@react-navigation/stack';
import {RootStackParamList} from 'App/App';
import AlphaNotice from '../components/AlphaNotice';

const styles = StyleSheet.create({
container: {
flex: 1,
padding: 16,
backgroundColor: 'hsl(224, 71%, 58%)',
backgroundColor: '#ffffff',
},
cancel: {
position: 'absolute',
left: 12,
top: 12,
},
chevronLeftIcon: {},
logoWrapper: {
marginLeft: 'auto',
marginRight: 'auto',
position: 'relative',
},
alphaNoticeRoot: {
position: 'absolute',
top: 12,
left: 48,
padding: 0,
},
alphaNoticeText: {
fontSize: 14,
lineHeight: 14,
},
logo: {
color: 'white',
color: '#7dc6b6',
fontSize: 32,
textAlign: 'center',
fontFamily: 'Righteous-Regular',
marginBottom: 16,
},
header: {
fontSize: 15,
fontSize: 18,
padding: 5,
paddingTop: 64,
paddingBottom: 50,
color: 'white',
color: '#595959',
fontFamily: 'Ubuntu-R',
lineHeight: 26,
letterSpacing: 1,
},
arrowRightIcon: {
right: 16,
top: 16,
fontSize: 20,
color: 'hsl(224, 71%, 58%)',
color: '#2c2c2c',
position: 'absolute',
},
buttonSymptoms: {
borderRadius: 8,
backgroundColor: 'white',
padding: 16,
backgroundColor: '#91e6d3',
padding: 20,
marginBottom: 32,
fontFamily: 'Ubuntu-R',
},
buttonSymptomsTitle: {
color: '#4770e0',
letterSpacing: 1,
color: '#2c2c2c',
letterSpacing: 1.5,
textTransform: 'uppercase',
fontSize: 14,
marginBottom: 8,
Expand All @@ -52,13 +73,13 @@ const styles = StyleSheet.create({
},
buttonTested: {
borderRadius: 8,
backgroundColor: 'white',
padding: 16,
backgroundColor: '#91e6d3',
padding: 20,
fontFamily: 'Ubuntu-R',
},
buttonTestedTitle: {
color: '#4770e0',
letterSpacing: 1,
color: '#2c2c2c',
letterSpacing: 1.5,
textTransform: 'uppercase',
fontSize: 14,
marginBottom: 8,
Expand All @@ -78,10 +99,22 @@ export function Endangerment({
}) {
return (
<View style={styles.container}>
<Text style={styles.logo}>ito</Text>
<View style={styles.cancel}>
<Text onPress={() => navigation.navigate('HomeBluetooth')}>
<Icon name="chevron-left" size={18} style={styles.chevronLeftIcon} />{' '}
cancel
</Text>
</View>
<View style={styles.logoWrapper}>
<Text style={styles.logo}>ito</Text>
<AlphaNotice
rootStyle={styles.alphaNoticeRoot}
textStyle={styles.alphaNoticeText}
/>
</View>
<Text style={styles.header}>
Tell us if you have symptoms or you{'\n'}
already have a positive test result
Tell us if you have symptoms or if you{'\n'}
have a positive test result
</Text>
<TouchableWithoutFeedback
onPress={() => navigation.navigate('SymptomInfo')}>
Expand All @@ -103,7 +136,7 @@ export function Endangerment({
<Icon name="arrow-right" size={18} style={styles.arrowRightIcon} />
<Text>
If you got a positive result from your doctor or authorities please
let us know to help everybody else stay healthy
let us know to help everybody else stay healthy.
</Text>
</View>
</TouchableWithoutFeedback>
Expand Down
2 changes: 1 addition & 1 deletion App/screens/HomeBluetooth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export function HomeBluetooth({
const circle2Diameter =
avgDistance === null ? 220 : 80 + Math.cbrt(avgDistance) * 100;
return (
<TouchableWithoutFeedback onPress={() => navigation.navigate('Home')}>
<TouchableWithoutFeedback>
<View style={styles.container}>
<View style={styles.logoWrapper}>
<Text style={styles.logo}>ito</Text>
Expand Down
135 changes: 122 additions & 13 deletions App/screens/SymptomInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,134 @@
import React from 'react';
import {Button, Text} from 'react-native';
import {Text, View, StyleSheet} from 'react-native';
import {StackNavigationProp} from '@react-navigation/stack';
import {Button} from 'react-native-elements';
import Icon from 'react-native-vector-icons/Feather';
import {RootStackParamList} from 'App/App';
import AlphaNotice from '../components/AlphaNotice';

const styles = StyleSheet.create({
container: {
flex: 1,
padding: 16,
backgroundColor: '#ffffff',
},
cancel: {
position: 'absolute',
left: 12,
top: 12,
},
chevronLeftIcon: {},
logoWrapper: {
marginLeft: 'auto',
marginRight: 'auto',
position: 'relative',
},
alphaNoticeRoot: {
position: 'absolute',
top: 12,
left: 48,
padding: 0,
},
alphaNoticeText: {
fontSize: 14,
lineHeight: 14,
},
logo: {
color: '#7dc6b6',
fontSize: 32,
textAlign: 'center',
fontFamily: 'Righteous-Regular',
marginBottom: 16,
},
explanation: {
fontSize: 18,
padding: 5,
paddingTop: 64,
paddingBottom: 50,
color: '#595959',
fontFamily: 'Ubuntu-R',
lineHeight: 26,
},
buttonOpenApp: {
backgroundColor: '#91e6d3',
borderRadius: 6,
marginBottom: 48,
padding: 12,
},
buttonOpenAppTitle: {
color: '#2c2c2c',
letterSpacing: 1,
textTransform: 'uppercase',
fontSize: 14,
fontFamily: 'Ubuntu-M',
},
buttonOther: {
backgroundColor: '#ffffff',
borderColor: '#7dc6b6',
borderWidth: 2,
borderRadius: 6,
marginBottom: 8,
padding: 12,
},
buttonOtherTitle: {
color: '#595959',
letterSpacing: 1,
textTransform: 'uppercase',
fontSize: 14,
fontFamily: 'Ubuntu-M',
},
});

type SymptomInfoScreenNavigationProp = StackNavigationProp<
RootStackParamList,
'SymptomInfo'
>;

export class SymptomInfo extends React.Component<{
export function SymptomInfo({
navigation,
}: {
navigation: SymptomInfoScreenNavigationProp;
}> {
render() {
return (
<>
<Text>Some info what to do if symptoms exist</Text>
<Button
title="OK"
onPress={() => this.props.navigation.navigate('Home')}
}) {
return (
<View style={styles.container}>
<View style={styles.cancel}>
<Text onPress={() => navigation.navigate('Endangerment')}>
<Icon name="chevron-left" size={18} style={styles.chevronLeftIcon} />{' '}
cancel
</Text>
</View>
<View style={styles.logoWrapper}>
<Text style={styles.logo}>ito</Text>
<AlphaNotice
rootStyle={styles.alphaNoticeRoot}
textStyle={styles.alphaNoticeText}
/>
</>
);
}
</View>
<Text style={styles.explanation}>
Please check if your symptoms and situation are similar to a COVID-19
infection.{'\n'}
{'\n'}
To do a self-assessed check first, please head over to your country's
designated app:
</Text>
<Button
title="Open designated app"
onPress={() => navigation.navigate('HomeBluetooth')}
titleStyle={styles.buttonOpenAppTitle}
buttonStyle={styles.buttonOpenApp}
/>
<Button
title="Looks like I'm not infected"
onPress={() => navigation.navigate('HomeBluetooth')}
titleStyle={styles.buttonOtherTitle}
buttonStyle={styles.buttonOther}
/>
<Button
title="I have a positive test result"
onPress={() => navigation.navigate('HomeBluetooth')}
titleStyle={styles.buttonOtherTitle}
buttonStyle={styles.buttonOther}
/>
</View>
);
}

0 comments on commit 228ba4f

Please sign in to comment.