From af2da9ea19e88a6f5297ae64dee4faa9f849e61e Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 2 Feb 2016 19:16:21 +0000 Subject: [PATCH] Add titles and move around inputs --- app/components/routes/login.js | 52 +++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/app/components/routes/login.js b/app/components/routes/login.js index 8736be3..a73bdec 100644 --- a/app/components/routes/login.js +++ b/app/components/routes/login.js @@ -18,14 +18,12 @@ const styles = StyleSheet.create({ }, contentWrapper: { flex: 0.85, - justifyContent: 'center', + justifyContent: 'flex-start', alignItems: 'center' }, input: { - marginHorizontal: 10, - height: 50, - borderColor: 'gray', - borderWidth: 1, + marginHorizontal: 15, + fontSize: 15, textAlign: 'center' }, loginButton: { @@ -33,20 +31,29 @@ const styles = StyleSheet.create({ backgroundColor: GlobalStyles.get('CIRCLE_BLUE'), justifyContent: 'center', alignItems: 'center', + padding: 10 }, loginButtonText: { - fontSize: 16, + fontSize: 18, color: 'white', }, buttonContainer: { flexDirection: 'row', - height: 80, justifyContent: 'center', - padding: 10 + padding: 10, + paddingVertical: 15 }, title: { - fontSize: 25, + fontSize: 30, margin: 13 + }, + heading: { + fontSize: 18, + margin: 8, + marginVertical: 20 + }, + helpText: { + fontSize: 12, } }); @@ -54,7 +61,7 @@ export default class Login extends React.Component { constructor() { super(); this.state = { - + token: '' }; this.validate = this.validate.bind(this); this.updateState = this.updateState.bind(this); @@ -69,6 +76,10 @@ export default class Login extends React.Component { validate() { } + componentWillUnmount() { + BackAndroid.removeEventListener('hardwareBackPress', () => { return true; }); // Re-enable back button + } + componentWillMount() { BackAndroid.addEventListener('hardwareBackPress', () => { return true; }); // Disable back button } @@ -76,21 +87,28 @@ export default class Login extends React.Component { render() { return ( + + + Sphere + + - - Login to continue + + Please enter your CircleCI token this.updateState('password', password)} - value={this.state.password} + onChangeText={(token) => this.updateState('token', token)} + value={this.state.token} onSubmitEditing={this.validate} - placeholder="Password" - autoCorrect={true} + placeholder="CircleCI Token" + autoCorrect={false} /> + + What's this? + -