Fixed logo in loading and login
This commit is contained in:
parent
99ce659c4f
commit
c79fe54bec
|
@ -42,7 +42,7 @@ export default class Routes extends React.Component {
|
|||
iterationCount='infinite'
|
||||
style={{ textAlign: 'center' }}
|
||||
>
|
||||
<Image style={styles.logo} source={require('../images/logo.png')} resizeMode={Image.resizeMode.center} />
|
||||
<Image style={styles.logo} source={require('../images/logo.png')} />
|
||||
</Animatable.Text>
|
||||
</View>
|
||||
);
|
||||
|
|
|
@ -85,10 +85,10 @@ export default class ListServerView extends React.Component {
|
|||
sections: []
|
||||
};
|
||||
this.redirected = false;
|
||||
realm.addListener('change', this.updateState);
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
realm.addListener('change', this.updateState);
|
||||
zeroconf.on('update', this.updateState);
|
||||
|
||||
zeroconf.scan('http', 'tcp', 'local.');
|
||||
|
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
|||
import Spinner from 'react-native-loading-spinner-overlay';
|
||||
|
||||
import PropTypes from 'prop-types';
|
||||
import { Keyboard, Text, TextInput, View, Image, TouchableOpacity } from 'react-native';
|
||||
import { Keyboard, Text, TextInput, View, Image, TouchableOpacity, Dimensions } from 'react-native';
|
||||
import { connect } from 'react-redux';
|
||||
import { bindActionCreators } from 'redux';
|
||||
// import * as actions from '../actions';
|
||||
|
@ -36,6 +36,10 @@ class LoginView extends React.Component {
|
|||
|
||||
submit = () => {
|
||||
const { username, password, code } = this.state;
|
||||
if (username.trim() === '' || password.trim() === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
this.props.loginSubmit({ username, password, code });
|
||||
Keyboard.dismiss();
|
||||
}
|
||||
|
@ -61,14 +65,12 @@ class LoginView extends React.Component {
|
|||
// {this.props.login.isFetching && <Text> LOGANDO</Text>}
|
||||
render() {
|
||||
return (
|
||||
<KeyboardView style={styles.container} keyboardVerticalOffset={64}>
|
||||
<View>
|
||||
<Text style={{ textAlign: 'center' }}>
|
||||
<Image
|
||||
style={styles.logo}
|
||||
source={require('../images/logo.png')}
|
||||
/>
|
||||
</Text>
|
||||
<KeyboardView style={styles.container} keyboardVerticalOffset={128}>
|
||||
<View style={{ alignItems: 'center' }}>
|
||||
<Image
|
||||
style={styles.logo}
|
||||
source={require('../images/logo.png')}
|
||||
/>
|
||||
</View>
|
||||
<View style={styles.loginView}>
|
||||
<View style={styles.formContainer}>
|
||||
|
@ -78,15 +80,16 @@ class LoginView extends React.Component {
|
|||
onChangeText={username => this.setState({ username })}
|
||||
keyboardType='email-address'
|
||||
autoCorrect={false}
|
||||
returnKeyType='done'
|
||||
returnKeyType='next'
|
||||
autoCapitalize='none'
|
||||
autoFocus
|
||||
|
||||
underlineColorAndroid='transparent'
|
||||
onSubmitEditing={this.submit}
|
||||
onSubmitEditing={() => { this.password.focus(); }}
|
||||
placeholder={this.props.Accounts_EmailOrUsernamePlaceholder || 'Email or username'}
|
||||
/>
|
||||
<TextInput
|
||||
ref={(e) => { this.password = e; }}
|
||||
placeholderTextColor={'rgba(255,255,255,.2)'}
|
||||
style={styles.input}
|
||||
onChangeText={password => this.setState({ password })}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { StyleSheet } from 'react-native';
|
||||
import { StyleSheet, Dimensions } from 'react-native';
|
||||
|
||||
export default StyleSheet.create({
|
||||
container: {
|
||||
|
@ -34,6 +34,8 @@ export default StyleSheet.create({
|
|||
justifyContent: 'center'
|
||||
},
|
||||
logo: {
|
||||
width: Dimensions.get('window').width - 30,
|
||||
height: Dimensions.get('window').width - 30,
|
||||
borderRadius: 5,
|
||||
resizeMode: 'contain'
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue