Added info screen

This commit is contained in:
Jake Howard 2016-02-04 20:14:45 +00:00
parent c51b853a0e
commit b718ddba33
3 changed files with 94 additions and 1 deletions

View file

@ -1,10 +1,15 @@
import { Map } from 'immutable';
import Login from './login';
import Info from './info';
export default Map({
'LOGIN': {
id: 'login',
component: Login
},
'INFO': {
id: 'info',
component: Info
}
});

View file

@ -0,0 +1,87 @@
import React from 'react-native';
import GlobalStyles from '../../settings/styles';
const {
StyleSheet,
Text,
View,
TouchableHighlight,
ScrollView,
BackAndroid,
} = React;
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#333',
},
contentWrapper: {
flex: 0.85,
justifyContent: 'flex-start',
alignItems: 'center'
},
button: {
flex: 0.08,
backgroundColor: GlobalStyles.get('CIRCLE_GREY'),
borderColor: GlobalStyles.get('CIRCLE_GREY'),
justifyContent: 'center',
alignItems: 'center',
padding: 10,
borderWidth: 2,
borderRadius: 12,
margin: 5
},
buttonText: {
fontSize: 18,
color: 'white',
},
buttonContainer: {
flexDirection: 'row',
justifyContent: 'center',
margin: 5
},
title: {
fontSize: 30,
margin: 13,
flex: 1
},
text: {
color: 'white'
}
});
export default class Login extends React.Component {
componentWillUnmount() {
BackAndroid.removeEventListener('hardwareBackPress', this.props.nav.pop);
}
componentWillMount() {
BackAndroid.addEventListener('hardwareBackPress', this.props.nav.pop);
}
render() {
return (
<View style={styles.container}>
<View style={styles.buttonContainer}>
<TouchableHighlight
style={styles.button}
onPress={this.props.nav.pop}
underlayColor={GlobalStyles.get('CIRCLE_GREY_DARK')}>
<Text style={[styles.text, styles.buttonText]}>
BACK
</Text>
</TouchableHighlight>
<Text style={[styles.title, styles.text]}>
About
</Text>
</View>
<ScrollView keyboardShouldPersistTaps={false} contentContainerStyle={styles.container}>
<View style={styles.contentWrapper}>
<Text>Content</Text>
</View>
</ScrollView>
</View>
);
}
};

View file

@ -1,6 +1,7 @@
import React from 'react-native';
import GlobalStyles from '../../settings/styles';
import TokenHelp from '../login/token-help';
import RouteMaster from './RouteMaster';
const dismissKeyboard = require('dismissKeyboard');
@ -99,7 +100,7 @@ export default class Login extends React.Component {
}
showAbout() {
this.props.nav.push(RouteMaster.get('INFO'));
}
showTokenHelp() {