2019-03-10 00:00:54 +00:00
|
|
|
import React, { Component } from "react";
|
2019-02-12 23:07:19 +00:00
|
|
|
import {
|
2019-03-10 00:00:54 +00:00
|
|
|
Platform,
|
|
|
|
StyleSheet,
|
|
|
|
Text,
|
|
|
|
View,
|
|
|
|
StatusBar,
|
|
|
|
Dimensions,
|
|
|
|
Image,
|
|
|
|
ActivityIndicator,
|
|
|
|
Button,
|
|
|
|
TouchableHighlight,
|
|
|
|
Keyboard,
|
|
|
|
ImageBackground,
|
|
|
|
LinearGradient,
|
|
|
|
TouchableOpacity,
|
|
|
|
TextInput,
|
|
|
|
NetInfo,
|
|
|
|
Animated
|
|
|
|
} from "react-native";
|
|
|
|
|
|
|
|
import { bindActionCreators } from "redux";
|
|
|
|
import { connect } from "react-redux";
|
|
|
|
|
|
|
|
import QRCodeScanner from "react-native-qrcode-scanner";
|
|
|
|
import { UtilStyles } from "./assets/styles";
|
|
|
|
|
|
|
|
import * as Actions from "./store/actions";
|
|
|
|
|
|
|
|
import { RkButton, RkTheme, RkText, RkTextInput } from "react-native-ui-kitten";
|
2019-02-11 19:47:52 +00:00
|
|
|
|
|
|
|
import Modal from "react-native-modal";
|
2019-01-15 10:06:33 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
import Router from "./Router";
|
2019-01-30 14:32:25 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
import Icon from "react-native-vector-icons/Ionicons";
|
2019-02-11 19:47:52 +00:00
|
|
|
|
2019-01-31 00:46:49 +00:00
|
|
|
const SCREEN_HEIGHT = Dimensions.get("window").height;
|
|
|
|
const SCREEN_WIDTH = Dimensions.get("window").width;
|
2019-01-30 14:32:25 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
import Swiper from "react-native-swiper";
|
2019-03-12 07:31:41 +00:00
|
|
|
import resetPassword from "./screens/resetPassword";
|
2019-03-10 00:00:54 +00:00
|
|
|
var TimerMixin = require("react-timer-mixin");
|
2019-01-30 14:32:25 +00:00
|
|
|
|
2019-02-22 23:38:34 +00:00
|
|
|
function handleConnectivityChange() {
|
|
|
|
console.log("asdasd");
|
2019-03-10 00:00:54 +00:00
|
|
|
}
|
|
|
|
|
2019-02-08 18:56:38 +00:00
|
|
|
class App extends Component {
|
2019-03-12 07:31:41 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2019-02-28 23:52:58 +00:00
|
|
|
handleConnectivityChange = isConnected => {
|
|
|
|
this.setState({ isConnected });
|
2019-03-10 00:00:54 +00:00
|
|
|
};
|
|
|
|
_activate = () => {
|
|
|
|
this.setState({ isModalVisible: !this.state.isModalVisible });
|
|
|
|
this.scanner.reactivate();
|
|
|
|
};
|
|
|
|
_scanQr = () => {
|
|
|
|
this.props.openScannerLogin();
|
|
|
|
console.log(this.props.UI_loginScannerActive);
|
|
|
|
};
|
|
|
|
_tryLogin = () => {
|
2019-03-11 16:15:51 +00:00
|
|
|
this.props.waitLogin();
|
2019-03-10 00:00:54 +00:00
|
|
|
//console.log(this.state.text)
|
|
|
|
//this.scanner.reactivate();
|
|
|
|
this.props.login(this.state.username, this.state.text);
|
|
|
|
};
|
|
|
|
|
|
|
|
_toggleModal = () =>
|
|
|
|
this.setState({ isModalVisible: !this.state.isModalVisible });
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
super(props);
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
token: { valid: false },
|
|
|
|
tokenData: "",
|
|
|
|
onHold: true,
|
|
|
|
logged: false,
|
|
|
|
isModalVisible: false,
|
|
|
|
state: { text: "" },
|
2019-03-15 22:07:22 +00:00
|
|
|
username: "QR code ou",
|
2019-03-10 00:00:54 +00:00
|
|
|
failedAttempt: false,
|
|
|
|
push: 4,
|
|
|
|
UI_loginScannerActive: false,
|
|
|
|
userDetails: { username: "", password: "" },
|
|
|
|
isConnected: true,
|
2019-03-12 22:52:12 +00:00
|
|
|
modalOpen: false,
|
|
|
|
modalResetPassword:false,
|
|
|
|
resetText:''
|
2019-03-10 00:00:54 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
_print = () => {
|
|
|
|
console.log("hello");
|
|
|
|
this.setState({ push: 0 });
|
|
|
|
};
|
|
|
|
checkValue = e => {
|
|
|
|
console.log("check" + e);
|
|
|
|
};
|
|
|
|
_handleConnectionChange = isConnected => {
|
|
|
|
this.props.connectionState(true);
|
|
|
|
};
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
//this.props.hold();
|
2019-03-15 22:07:22 +00:00
|
|
|
// this.props.loginInternal();
|
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
|
|
|
|
this.setState({ isModalVisible: false });
|
|
|
|
//verifica se o utilizador tem token guardado
|
2019-03-15 22:07:22 +00:00
|
|
|
this.props.checkUser(this.props.token);
|
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
}
|
|
|
|
componentWillUnmount() {
|
|
|
|
NetInfo.isConnected.removeEventListener(
|
|
|
|
"connectionChange",
|
|
|
|
this.handleConnectivityChange
|
|
|
|
);
|
2019-02-28 23:52:58 +00:00
|
|
|
}
|
2019-03-12 22:52:12 +00:00
|
|
|
_toggle=()=>{
|
|
|
|
this.setState({modalResetPassword:false})
|
|
|
|
}
|
2019-03-12 23:27:58 +00:00
|
|
|
//faz call
|
|
|
|
_reset=()=>{
|
|
|
|
//fecha modal
|
2019-03-15 22:07:22 +00:00
|
|
|
this.props.resetPassword(this.props.token,this.state.resetText),
|
2019-03-12 23:27:58 +00:00
|
|
|
this.setState({modalResetPassword:false})
|
|
|
|
//faz call
|
|
|
|
}
|
2019-01-31 00:46:49 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
_keyboardDidShow() {
|
|
|
|
//alert('Keyboard Shown');
|
|
|
|
// this.setState({push:0})
|
|
|
|
}
|
2019-02-08 18:56:38 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
_keyboardDidHide() {
|
|
|
|
//this.setState({push:4})
|
|
|
|
}
|
|
|
|
onSuccess = e => {
|
|
|
|
// this.setState({ isModalVisible: !this.state.isModalVisible });
|
|
|
|
// this.props.login(e.data, 'f8908cc0');
|
|
|
|
this.props.closeLoginQRScan();
|
|
|
|
this.setState({ username: e.data });
|
|
|
|
|
|
|
|
console.log("QR code lido");
|
|
|
|
};
|
|
|
|
|
|
|
|
render() {
|
2019-03-12 07:31:41 +00:00
|
|
|
|
2019-03-11 16:15:51 +00:00
|
|
|
|
2019-03-12 07:31:41 +00:00
|
|
|
|
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
if (!this.props.logged && this.props.onHold) {
|
|
|
|
return (
|
|
|
|
<View style={UtilStyles.containerLoading}>
|
|
|
|
<ActivityIndicator size="large" color="red" />
|
|
|
|
</View>
|
|
|
|
);
|
|
|
|
} else {
|
|
|
|
// console.log('token... '+ this.props.logged)
|
|
|
|
|
|
|
|
//se existir token
|
|
|
|
|
|
|
|
if (this.props.logged) {
|
|
|
|
return <Router />;
|
2019-02-12 23:07:19 +00:00
|
|
|
}
|
2019-03-10 00:00:54 +00:00
|
|
|
return (
|
2019-03-12 07:31:41 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
<View style={styles.slide2}>
|
|
|
|
<Modal isVisible={this.props.UI_loginScannerActive}>
|
|
|
|
<View style={{ flex: 1, backgroundColor: "white" }}>
|
|
|
|
<Button
|
|
|
|
onPress={this.props.closeLoginQRScan}
|
|
|
|
title={"Fechar scanner"}
|
|
|
|
>
|
|
|
|
{" "}
|
|
|
|
</Button>
|
|
|
|
|
|
|
|
<QRCodeScanner
|
|
|
|
onRead={this.onSuccess}
|
|
|
|
cameraStyle={styles.cameraContainer}
|
|
|
|
/>
|
|
|
|
</View>
|
|
|
|
</Modal>
|
2019-03-13 00:36:42 +00:00
|
|
|
<Modal
|
2019-03-12 22:52:12 +00:00
|
|
|
isVisible={this.state.modalResetPassword}
|
|
|
|
onBackdropPress={this._toggle}
|
|
|
|
onBackButtonPress={this._toggle}
|
2019-03-13 00:36:42 +00:00
|
|
|
animationInTiming={1100}
|
|
|
|
animationOutTiming={1100}
|
2019-03-12 22:52:12 +00:00
|
|
|
>
|
|
|
|
<View style={{ backgroundColor: "white" , padding:20,paddingBottom:0, alignItems:'center'}}>
|
|
|
|
<View>
|
|
|
|
<Text style={{textAlign:'center',fontSize:23, fontWeight:'bold', color:'#CC1A17', margin:30}}>Reset Password</Text>
|
|
|
|
<Text style={{textAlign:'center', }}>Deves introduzir o email com o qual efectuaste a compra do bilhete.</Text>
|
|
|
|
<TextInput
|
|
|
|
style={styles.resetPassword}
|
|
|
|
onFocus={this._print}
|
2019-03-13 00:36:42 +00:00
|
|
|
maxLength={50}
|
2019-03-12 22:52:12 +00:00
|
|
|
blurOnSubmit={true}
|
2019-03-13 00:36:42 +00:00
|
|
|
|
|
|
|
onChangeText={r => this.setState({ resetText:r })}
|
2019-03-12 22:52:12 +00:00
|
|
|
clearButtonMode="always"
|
|
|
|
value={this.state.resetText}
|
|
|
|
clearTextOnFocus={true}
|
|
|
|
onSubmitEditing={Keyboard.dismiss}
|
2019-03-13 00:36:42 +00:00
|
|
|
placeholder="Email ou Qr code"
|
2019-03-12 22:52:12 +00:00
|
|
|
/>
|
|
|
|
|
|
|
|
<Button
|
2019-03-12 23:27:58 +00:00
|
|
|
onPress={this._reset}
|
2019-03-12 22:52:12 +00:00
|
|
|
title={"Enviar"}
|
|
|
|
color={"#CC1A17"}
|
|
|
|
></Button>
|
2019-03-12 23:27:58 +00:00
|
|
|
<Text style={{textAlign:'center', fontSize:12, margin:10,marginBottom:5}}> Caso tenhas problemas com este processo deves contactar a comissão organizadora atravês do email geral.</Text>
|
2019-03-12 22:52:12 +00:00
|
|
|
|
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
</Modal>
|
2019-03-10 00:00:54 +00:00
|
|
|
<View
|
|
|
|
style={{
|
|
|
|
width: "100%",
|
|
|
|
|
|
|
|
justifyContent: "center",
|
2019-03-13 00:36:42 +00:00
|
|
|
alignItems: "center",
|
|
|
|
margin:20
|
2019-03-10 00:00:54 +00:00
|
|
|
}}
|
|
|
|
>
|
|
|
|
<Image
|
|
|
|
style={styles.logo2}
|
|
|
|
source={require("./assets/img/logo2.png")}
|
|
|
|
/>
|
2019-02-28 23:52:58 +00:00
|
|
|
</View>
|
2019-03-10 00:00:54 +00:00
|
|
|
<View styles={styles.loginContainer}>
|
|
|
|
<View style={styles.inputSection}>
|
|
|
|
<TextInput
|
|
|
|
style={styles.input}
|
|
|
|
placeholder={this.state.username}
|
|
|
|
onChangeText={searchString => {
|
2019-03-15 22:07:22 +00:00
|
|
|
this.setState({ username:searchString });
|
2019-03-10 00:00:54 +00:00
|
|
|
}}
|
|
|
|
maxLength={15}
|
|
|
|
underlineColorAndroid="transparent"
|
|
|
|
/>
|
|
|
|
<TouchableOpacity onPress={this._scanQr}>
|
|
|
|
<View style={styles.scanQR}>
|
|
|
|
<Icon
|
|
|
|
style={styles.searchIcon}
|
|
|
|
name="ios-qr-scanner"
|
2019-03-12 23:27:58 +00:00
|
|
|
size={40}
|
2019-03-10 00:00:54 +00:00
|
|
|
color="#000"
|
|
|
|
/>
|
2019-03-12 23:27:58 +00:00
|
|
|
|
2019-02-03 20:54:27 +00:00
|
|
|
</View>
|
2019-03-10 00:00:54 +00:00
|
|
|
</TouchableOpacity>
|
|
|
|
</View>
|
|
|
|
|
|
|
|
<TextInput
|
|
|
|
style={styles.passwordInput}
|
|
|
|
onFocus={this._print}
|
|
|
|
maxLength={10}
|
|
|
|
blurOnSubmit={true}
|
|
|
|
secureTextEntry={true}
|
|
|
|
onChangeText={text => this.setState({ text })}
|
|
|
|
clearButtonMode="always"
|
|
|
|
value={this.state.text}
|
|
|
|
clearTextOnFocus={true}
|
|
|
|
onSubmitEditing={Keyboard.dismiss}
|
|
|
|
placeholder="Password"
|
|
|
|
/>
|
2019-03-11 16:15:51 +00:00
|
|
|
{ !this.props.loadingLogin &&
|
2019-03-12 23:27:58 +00:00
|
|
|
<View style={{alignItems:'center', margin:20}}>
|
|
|
|
<TouchableOpacity onPress={this._tryLogin} style={{backgroundColor:'#CC1A17',borderRadius:3}}>
|
|
|
|
<Text style={{color:'white', fontSize:20, margin:10, width:150,textAlign:'center',}}>Login</Text>
|
|
|
|
</TouchableOpacity>
|
|
|
|
</View>
|
2019-03-11 16:15:51 +00:00
|
|
|
}
|
|
|
|
{this.props.alignItems &&
|
|
|
|
<ActivityIndicator size="large" color="#0000ff" />
|
|
|
|
}
|
2019-02-16 18:29:23 +00:00
|
|
|
</View>
|
2019-03-10 00:00:54 +00:00
|
|
|
|
|
|
|
<View style={styles.buttons}>
|
|
|
|
<TouchableOpacity style={styles.button}>
|
|
|
|
<Icon name="logo-facebook" size={40} />
|
2019-02-16 11:39:08 +00:00
|
|
|
</TouchableOpacity>
|
2019-03-10 00:00:54 +00:00
|
|
|
<TouchableOpacity style={styles.button}>
|
|
|
|
<Icon name="logo-instagram" size={40} />
|
2019-02-16 11:39:08 +00:00
|
|
|
</TouchableOpacity>
|
2019-03-10 00:00:54 +00:00
|
|
|
<TouchableOpacity style={styles.button}>
|
|
|
|
<Icon name="md-heart" size={40} />
|
2019-02-16 11:39:08 +00:00
|
|
|
</TouchableOpacity>
|
2019-03-10 00:00:54 +00:00
|
|
|
</View>
|
|
|
|
<View style={styles.footer}>
|
|
|
|
<View style={styles.textRow}>
|
|
|
|
<RkText rkType="primary3">Não sabes a password?</RkText>
|
|
|
|
<RkButton rkType="clear" onPress={this.onSignUpButtonPressed}>
|
2019-03-12 22:52:12 +00:00
|
|
|
<TouchableOpacity onPress={() => {this.setState({modalResetPassword:true})}}>
|
2019-03-12 23:27:58 +00:00
|
|
|
<RkText style={{ color: "#CC1A17", fontWeight:'bold' }} kType="header6">
|
|
|
|
Reset Password
|
2019-03-10 00:00:54 +00:00
|
|
|
</RkText>
|
2019-02-16 11:39:08 +00:00
|
|
|
</TouchableOpacity>
|
2019-03-10 00:00:54 +00:00
|
|
|
</RkButton>
|
2019-02-16 11:39:08 +00:00
|
|
|
</View>
|
2019-03-10 00:00:54 +00:00
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
);
|
2019-02-08 18:56:38 +00:00
|
|
|
}
|
2019-03-10 00:00:54 +00:00
|
|
|
}
|
2019-01-31 00:46:49 +00:00
|
|
|
}
|
2019-01-23 16:22:11 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
RkTheme.setType("RkButton", "dark", {
|
|
|
|
container: {
|
|
|
|
paddingTop: 10,
|
|
|
|
backgroundColor: "gray",
|
2019-01-23 16:22:11 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
borderRadius: 90
|
|
|
|
}
|
2019-02-08 18:56:38 +00:00
|
|
|
});
|
2019-01-23 16:22:11 +00:00
|
|
|
|
2019-01-31 00:46:49 +00:00
|
|
|
const rectDimensions = SCREEN_WIDTH * 0.85; // this is equivalent to 255 from a 393 device width
|
2019-01-23 16:22:11 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
const overlayColor = "rgba(0,0,0,0.30)";
|
2019-01-23 16:22:11 +00:00
|
|
|
|
2019-01-31 00:46:49 +00:00
|
|
|
const styles = {
|
2019-03-10 00:00:54 +00:00
|
|
|
cameraContainer: {
|
2019-03-12 07:31:41 +00:00
|
|
|
height: Dimensions.get('window').height ,
|
2019-03-10 00:00:54 +00:00
|
|
|
},
|
2019-03-12 22:52:12 +00:00
|
|
|
resetPassword:{
|
|
|
|
|
2019-03-12 23:27:58 +00:00
|
|
|
|
2019-03-12 22:52:12 +00:00
|
|
|
|
|
|
|
borderColor: "#bfbdbd",
|
|
|
|
borderWidth: 1,
|
|
|
|
margin:20,
|
|
|
|
marginTop: 60,
|
|
|
|
marginBottom: 60,
|
|
|
|
|
|
|
|
width: SCREEN_WIDTH * 0.8,
|
|
|
|
|
|
|
|
backgroundColor: "white",
|
|
|
|
|
2019-03-12 23:27:58 +00:00
|
|
|
borderRadius: 3,
|
2019-03-12 22:52:12 +00:00
|
|
|
height: SCREEN_HEIGHT * 0.08,
|
|
|
|
borderColor: "#bfbdbd",
|
|
|
|
borderWidth: 1,
|
|
|
|
paddingLeft: SCREEN_WIDTH * 0.05
|
|
|
|
},
|
2019-03-10 00:00:54 +00:00
|
|
|
passwordInput: {
|
2019-03-12 23:27:58 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
|
|
|
|
borderColor: "#bfbdbd",
|
|
|
|
borderWidth: 1,
|
|
|
|
marginTop: 20,
|
|
|
|
marginBottom: 20,
|
|
|
|
width: SCREEN_WIDTH * 0.8,
|
|
|
|
|
|
|
|
backgroundColor: "white",
|
|
|
|
|
2019-03-12 23:27:58 +00:00
|
|
|
borderRadius: 3,
|
2019-03-10 00:00:54 +00:00
|
|
|
height: SCREEN_HEIGHT * 0.08,
|
|
|
|
borderColor: "#bfbdbd",
|
|
|
|
borderWidth: 1,
|
|
|
|
paddingLeft: SCREEN_WIDTH * 0.05
|
|
|
|
},
|
|
|
|
scanQRText: {
|
|
|
|
paddingTop: 50
|
|
|
|
// paddingTop:20,
|
|
|
|
},
|
|
|
|
scanQR: {
|
|
|
|
//flexDirection: 'row',
|
2019-03-12 23:27:58 +00:00
|
|
|
flex:1,
|
|
|
|
//paddingTop: 5,
|
2019-03-10 00:00:54 +00:00
|
|
|
backgroundColor: 10,
|
2019-03-12 23:27:58 +00:00
|
|
|
alignItems:'center',
|
|
|
|
padding:5,
|
|
|
|
paddingRight:15,
|
|
|
|
|
|
|
|
//width: 80,
|
|
|
|
// paddingLeft: 10,
|
|
|
|
backgroundColor: "#CC1A17",
|
|
|
|
borderBottomRightRadius: 3,
|
|
|
|
borderTopRightRadius: 3,
|
|
|
|
// height: "100%"
|
2019-03-10 00:00:54 +00:00
|
|
|
},
|
|
|
|
inputSection: {
|
|
|
|
flexDirection: "row",
|
|
|
|
backgroundColor: "#fff",
|
|
|
|
|
|
|
|
backgroundColor: "white",
|
|
|
|
|
2019-03-12 23:27:58 +00:00
|
|
|
borderRadius: 3,
|
2019-03-10 00:00:54 +00:00
|
|
|
height: SCREEN_HEIGHT * 0.08,
|
|
|
|
borderColor: "#bfbdbd",
|
|
|
|
borderWidth: 1
|
|
|
|
},
|
|
|
|
searchIcon: {
|
|
|
|
paddingLeft: 10
|
|
|
|
},
|
|
|
|
|
|
|
|
input: {
|
|
|
|
flex: 1,
|
|
|
|
paddingRight: 10,
|
|
|
|
|
|
|
|
paddingLeft: 0,
|
|
|
|
paddingLeft: SCREEN_WIDTH * 0.05,
|
|
|
|
color: "#424242"
|
|
|
|
},
|
|
|
|
textRow: {
|
|
|
|
marginBottom: 40
|
|
|
|
},
|
|
|
|
loginContainer: {
|
|
|
|
width: "100%",
|
|
|
|
height: "30%",
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center"
|
|
|
|
},
|
|
|
|
loginBtn: {
|
|
|
|
marginTop: 10,
|
|
|
|
marginBottom: 20,
|
|
|
|
marginLeft: "25%"
|
|
|
|
},
|
|
|
|
|
|
|
|
button: {
|
|
|
|
borderWidth: 1,
|
|
|
|
borderColor: "rgba(0,0,0,0.2)",
|
|
|
|
alignItems: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
width: 60,
|
|
|
|
height: 60,
|
|
|
|
backgroundColor: "#fff",
|
|
|
|
borderRadius: 100,
|
|
|
|
marginRight: 10,
|
|
|
|
marginLeft: 10
|
|
|
|
},
|
|
|
|
footer: {},
|
|
|
|
|
|
|
|
buttons: {
|
|
|
|
flexDirection: "row",
|
|
|
|
marginBottom: 24,
|
|
|
|
marginHorizontal: 24,
|
|
|
|
marginTop: 24,
|
|
|
|
justifyContent: "space-around"
|
|
|
|
},
|
|
|
|
|
|
|
|
logoContainer: {
|
|
|
|
width: "100%",
|
|
|
|
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center",
|
2019-03-12 23:27:58 +00:00
|
|
|
marginTop: 200,
|
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
logo2: {
|
|
|
|
// flex: 1,
|
|
|
|
// resizeMode: 'contain',
|
|
|
|
width: 200,
|
|
|
|
height: 200
|
|
|
|
},
|
|
|
|
wrapper: {},
|
|
|
|
slide1: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center",
|
|
|
|
backgroundColor: "white"
|
|
|
|
},
|
|
|
|
slide2: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center",
|
|
|
|
backgroundColor: "white"
|
|
|
|
},
|
|
|
|
slide3: {
|
|
|
|
flex: 1,
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center",
|
|
|
|
color: "black",
|
|
|
|
backgroundColor: "white"
|
|
|
|
},
|
|
|
|
text: {
|
|
|
|
color: "#fff",
|
|
|
|
fontSize: 30,
|
|
|
|
fontWeight: "bold"
|
|
|
|
},
|
|
|
|
recover: {
|
|
|
|
paddingTop: 10,
|
|
|
|
color: "red",
|
|
|
|
paddingBottom: 10
|
|
|
|
},
|
|
|
|
manual: {},
|
|
|
|
|
|
|
|
logo: {
|
|
|
|
height: SCREEN_HEIGHT * 0.35,
|
|
|
|
width: SCREEN_WIDTH,
|
|
|
|
backgroundColor: overlayColor
|
|
|
|
},
|
|
|
|
rectangleContainer: {
|
|
|
|
flex: 1,
|
|
|
|
alignItems: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
backgroundColor: "transparent"
|
|
|
|
},
|
|
|
|
|
|
|
|
rectangle: {
|
|
|
|
height: rectDimensions,
|
|
|
|
width: rectDimensions,
|
|
|
|
alignItems: "center",
|
|
|
|
justifyContent: "center",
|
|
|
|
backgroundColor: "transparent"
|
|
|
|
},
|
|
|
|
|
|
|
|
topOverlay: {
|
|
|
|
flex: 1,
|
|
|
|
backgroundColor: overlayColor,
|
|
|
|
justifyContent: "center",
|
|
|
|
alignItems: "center"
|
|
|
|
},
|
|
|
|
|
|
|
|
bottomOverlay: {
|
|
|
|
flex: 1,
|
|
|
|
height: SCREEN_HEIGHT,
|
|
|
|
width: SCREEN_WIDTH,
|
|
|
|
backgroundColor: overlayColor,
|
|
|
|
paddingBottom: SCREEN_WIDTH * 0.2
|
|
|
|
},
|
|
|
|
|
|
|
|
leftAndRightOverlay: {
|
|
|
|
height: rectDimensions,
|
|
|
|
width: SCREEN_WIDTH,
|
|
|
|
backgroundColor: overlayColor
|
|
|
|
}
|
2019-01-31 00:46:49 +00:00
|
|
|
};
|
2019-03-10 00:00:54 +00:00
|
|
|
RkTheme.setType("RkTextInput", "frame", {
|
|
|
|
input: {
|
|
|
|
backgroundColor: "white",
|
|
|
|
marginLeft: 0,
|
|
|
|
marginHorizontal: 0,
|
|
|
|
borderRadius: 5
|
|
|
|
},
|
|
|
|
color: "gray",
|
|
|
|
backgroundColor: "gray",
|
|
|
|
borderRadius: 10,
|
|
|
|
container: {
|
|
|
|
paddingHorizontal: 20
|
|
|
|
}
|
|
|
|
});
|
2019-01-31 00:46:49 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
mapStateToProps = (state, props) => {
|
|
|
|
return {
|
|
|
|
token: state.apiReducer.token,
|
|
|
|
loggedIn: state.apiReducer.loggedIn,
|
|
|
|
onHold: state.apiReducer.onHold,
|
|
|
|
logged: state.apiReducer.logged,
|
|
|
|
failedAttempt: state.apiReducer.failedAttempt,
|
|
|
|
UI_loginScannerActive: state.uiReducer.UI_loginScannerActive,
|
|
|
|
userDetails: state.apiReducer.userDetails,
|
|
|
|
modalOpen: state.apiReducer.modalOpen,
|
|
|
|
modalInfo: state.apiReducer.modalInfo,
|
2019-03-11 16:15:51 +00:00
|
|
|
type: state.apiReducer.type,
|
|
|
|
loadingLogin:state.apiReducer.loadingLogin
|
2019-03-10 00:00:54 +00:00
|
|
|
};
|
2019-02-08 18:56:38 +00:00
|
|
|
};
|
2019-01-08 19:09:50 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
mapDispatchToProps = dispatch => {
|
|
|
|
return bindActionCreators(Actions, dispatch);
|
2019-02-08 18:56:38 +00:00
|
|
|
};
|
2019-01-15 10:06:33 +00:00
|
|
|
|
2019-03-10 00:00:54 +00:00
|
|
|
export default connect(
|
|
|
|
mapStateToProps,
|
|
|
|
mapDispatchToProps
|
|
|
|
)(App);
|