summaryrefslogtreecommitdiff
path: root/frontend/app/screens/login
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/app/screens/login')
-rw-r--r--frontend/app/screens/login/index.js4
-rw-r--r--frontend/app/screens/login/login1.js129
-rw-r--r--frontend/app/screens/login/login2.js127
-rw-r--r--frontend/app/screens/login/passwordRecovery.js83
-rw-r--r--frontend/app/screens/login/signUp.js110
5 files changed, 453 insertions, 0 deletions
diff --git a/frontend/app/screens/login/index.js b/frontend/app/screens/login/index.js
new file mode 100644
index 0000000..b0b1cd1
--- /dev/null
+++ b/frontend/app/screens/login/index.js
@@ -0,0 +1,4 @@
+export * from './login1';
+export * from './login2';
+export * from './signUp';
+export * from './passwordRecovery';
diff --git a/frontend/app/screens/login/login1.js b/frontend/app/screens/login/login1.js
new file mode 100644
index 0000000..73e97d5
--- /dev/null
+++ b/frontend/app/screens/login/login1.js
@@ -0,0 +1,129 @@
+import React from 'react';
+import {
+ View,
+ Image,
+ Dimensions,
+ Keyboard,
+} from 'react-native';
+import {
+ RkButton,
+ RkText,
+ RkTextInput,
+ RkAvoidKeyboard,
+ RkStyleSheet,
+ RkTheme,
+} from 'react-native-ui-kitten';
+import { FontAwesome } from '../../assets/icons';
+import { GradientButton } from '../../components/gradientButton';
+import { scaleModerate, scaleVertical } from '../../utils/scale';
+import NavigationType from '../../config/navigation/propTypes';
+
+export class LoginV1 extends React.Component {
+ static propTypes = {
+ navigation: NavigationType.isRequired,
+ };
+ static navigationOptions = {
+ header: null,
+ };
+
+ getThemeImageSource = (theme) => (
+ theme.name === 'light' ?
+ require('../../assets/images/backgroundLoginV1.png') : require('../../assets/images/backgroundLoginV1DarkTheme.png')
+ );
+
+ renderImage = () => {
+ const screenSize = Dimensions.get('window');
+ const imageSize = {
+ width: screenSize.width,
+ height: screenSize.height - scaleModerate(375, 1),
+ };
+ return (
+ <Image
+ style={[styles.image, imageSize]}
+ source={this.getThemeImageSource(RkTheme.current)}
+ />
+ );
+ };
+
+ onLoginButtonPressed = () => {
+ this.props.navigation.goBack();
+ };
+
+ onSignUpButtonPressed = () => {
+ this.props.navigation.navigate('SignUp');
+ };
+
+ render = () => (
+ <RkAvoidKeyboard
+ onStartShouldSetResponder={() => true}
+ onResponderRelease={() => Keyboard.dismiss()}
+ style={styles.screen}>
+ {this.renderImage()}
+ <View style={styles.container}>
+ <View style={styles.buttons}>
+ <RkButton style={styles.button} rkType='social'>
+ <RkText rkType='awesome hero accentColor'>{FontAwesome.twitter}</RkText>
+ </RkButton>
+ <RkButton style={styles.button} rkType='social'>
+ <RkText rkType='awesome hero accentColor'>{FontAwesome.google}</RkText>
+ </RkButton>
+ <RkButton style={styles.button} rkType='social'>
+ <RkText rkType='awesome hero accentColor'>{FontAwesome.facebook}</RkText>
+ </RkButton>
+ </View>
+ <RkTextInput rkType='rounded' placeholder='Username' />
+ <RkTextInput rkType='rounded' placeholder='Password' secureTextEntry />
+ <GradientButton
+ style={styles.save}
+ rkType='large'
+ onPress={this.onLoginButtonPressed}
+ text='LOGIN'
+ />
+ <View style={styles.footer}>
+ <View style={styles.textRow}>
+ <RkText rkType='primary3'>Don’t have an account?</RkText>
+ <RkButton rkType='clear'>
+ <RkText rkType='header6' onPress={this.onSignUpButtonPressed}>Sign up now</RkText>
+ </RkButton>
+ </View>
+ </View>
+ </View>
+ </RkAvoidKeyboard>
+ )
+}
+
+const styles = RkStyleSheet.create(theme => ({
+ screen: {
+ flex: 1,
+ alignItems: 'center',
+ backgroundColor: theme.colors.screen.base,
+ },
+ image: {
+ resizeMode: 'cover',
+ marginBottom: scaleVertical(10),
+ },
+ container: {
+ paddingHorizontal: 17,
+ paddingBottom: scaleVertical(22),
+ alignItems: 'center',
+ flex: -1,
+ },
+ footer: {
+ justifyContent: 'flex-end',
+ flex: 1,
+ },
+ buttons: {
+ flexDirection: 'row',
+ marginBottom: scaleVertical(24),
+ },
+ button: {
+ marginHorizontal: 14,
+ },
+ save: {
+ marginVertical: 9,
+ },
+ textRow: {
+ justifyContent: 'center',
+ flexDirection: 'row',
+ },
+}));
diff --git a/frontend/app/screens/login/login2.js b/frontend/app/screens/login/login2.js
new file mode 100644
index 0000000..c211190
--- /dev/null
+++ b/frontend/app/screens/login/login2.js
@@ -0,0 +1,127 @@
+import React from 'react';
+import {
+ View,
+ Image,
+ Keyboard,
+} from 'react-native';
+import {
+ RkButton,
+ RkText,
+ RkTextInput,
+ RkAvoidKeyboard,
+ RkTheme,
+ RkStyleSheet,
+} from 'react-native-ui-kitten';
+import { FontAwesome } from '../../assets/icons';
+import { GradientButton } from '../../components/gradientButton';
+import { scaleVertical } from '../../utils/scale';
+import NavigationType from '../../config/navigation/propTypes';
+
+export class LoginV2 extends React.Component {
+ static propTypes = {
+ navigation: NavigationType.isRequired,
+ };
+ static navigationOptions = {
+ header: null,
+ };
+
+ onLoginButtonPressed = () => {
+ this.props.navigation.goBack();
+ };
+
+ onSignUpButtonPressed = () => {
+ this.props.navigation.navigate('SignUp');
+ };
+
+ getThemeImageSource = (theme) => (
+ theme.name === 'light' ?
+ require('../../assets/images/logo.png') : require('../../assets/images/logoDark.png')
+ );
+
+ renderImage = () => (
+ <Image style={styles.image} source={this.getThemeImageSource(RkTheme.current)} />
+ );
+
+ render = () => (
+ <RkAvoidKeyboard
+ style={styles.screen}
+ onStartShouldSetResponder={() => true}
+ onResponderRelease={() => Keyboard.dismiss()}>
+ <View style={styles.header}>
+ {this.renderImage()}
+ <RkText rkType='light h1'>React Native</RkText>
+ <RkText rkType='logo h0'>UI Kitten</RkText>
+ </View>
+ <View style={styles.content}>
+ <View>
+ <RkTextInput rkType='rounded' placeholder='Username' />
+ <RkTextInput rkType='rounded' placeholder='Password' secureTextEntry />
+ <GradientButton
+ style={styles.save}
+ rkType='large'
+ text='LOGIN'
+ onPress={this.onLoginButtonPressed}
+ />
+ </View>
+ <View style={styles.buttons}>
+ <RkButton style={styles.button} rkType='social'>
+ <RkText rkType='awesome hero'>{FontAwesome.twitter}</RkText>
+ </RkButton>
+ <RkButton style={styles.button} rkType='social'>
+ <RkText rkType='awesome hero'>{FontAwesome.google}</RkText>
+ </RkButton>
+ <RkButton style={styles.button} rkType='social'>
+ <RkText rkType='awesome hero'>{FontAwesome.facebook}</RkText>
+ </RkButton>
+ </View>
+ <View style={styles.footer}>
+ <View style={styles.textRow}>
+ <RkText rkType='primary3'>Don’t have an account?</RkText>
+ <RkButton rkType='clear' onPress={this.onSignUpButtonPressed}>
+ <RkText rkType='header6'>Sign up now</RkText>
+ </RkButton>
+ </View>
+ </View>
+ </View>
+ </RkAvoidKeyboard>
+ );
+}
+
+const styles = RkStyleSheet.create(theme => ({
+ screen: {
+ padding: scaleVertical(16),
+ flex: 1,
+ justifyContent: 'space-between',
+ backgroundColor: theme.colors.screen.base,
+ },
+ image: {
+ height: scaleVertical(77),
+ resizeMode: 'contain',
+ },
+ header: {
+ paddingBottom: scaleVertical(10),
+ alignItems: 'center',
+ justifyContent: 'center',
+ flex: 1,
+ },
+ content: {
+ justifyContent: 'space-between',
+ },
+ save: {
+ marginVertical: 20,
+ },
+ buttons: {
+ flexDirection: 'row',
+ marginBottom: scaleVertical(24),
+ marginHorizontal: 24,
+ justifyContent: 'space-around',
+ },
+ textRow: {
+ flexDirection: 'row',
+ justifyContent: 'center',
+ },
+ button: {
+ borderColor: theme.colors.border.solid,
+ },
+ footer: {},
+}));
diff --git a/frontend/app/screens/login/passwordRecovery.js b/frontend/app/screens/login/passwordRecovery.js
new file mode 100644
index 0000000..b383e4c
--- /dev/null
+++ b/frontend/app/screens/login/passwordRecovery.js
@@ -0,0 +1,83 @@
+import React from 'react';
+import {
+ View,
+ Image,
+ Keyboard,
+} from 'react-native';
+import {
+ RkStyleSheet,
+ RkText,
+ RkTextInput,
+ RkTheme,
+} from 'react-native-ui-kitten';
+import { GradientButton } from '../../components/';
+import { scaleVertical } from '../../utils/scale';
+import NavigationType from '../../config/navigation/propTypes';
+
+export class PasswordRecovery extends React.Component {
+ static propTypes = {
+ navigation: NavigationType.isRequired,
+ };
+ static navigationOptions = {
+ header: null,
+ };
+
+ onSendButtonPressed = () => {
+ this.props.navigation.goBack();
+ };
+
+ getThemeImageSource = (theme) => (
+ theme.name === 'light' ?
+ require('../../assets/images/logo.png') : require('../../assets/images/logoDark.png')
+ );
+
+ renderImage = () => (
+ <Image style={styles.image} source={this.getThemeImageSource(RkTheme.current)} />
+ );
+
+ render = () => (
+ <View
+ behavior='position'
+ style={styles.screen}
+ onStartShouldSetResponder={() => true}
+ onResponderRelease={() => Keyboard.dismiss()}>
+ <View style={styles.header}>
+ {this.renderImage()}
+ <RkText rkType='h1'>Password Recovery</RkText>
+ </View>
+ <View style={styles.content}>
+ <RkTextInput rkType='rounded' placeholder='Email' />
+ <RkText rkType='secondary5 secondaryColor center'>
+ Enter your email below to receive your password reset instructions
+ </RkText>
+ </View>
+ <GradientButton
+ style={styles.save}
+ rkType='large'
+ text='SEND'
+ onPress={this.onSendButtonPressed}
+ />
+ </View>
+ );
+}
+
+const styles = RkStyleSheet.create(theme => ({
+ screen: {
+ flex: 1,
+ paddingHorizontal: 16,
+ paddingVertical: scaleVertical(24),
+ justifyContent: 'space-between',
+ backgroundColor: theme.colors.screen.base,
+ },
+ header: {
+ alignItems: 'center',
+ },
+ image: {
+ marginVertical: scaleVertical(27),
+ height: scaleVertical(77),
+ resizeMode: 'contain',
+ },
+ content: {
+ alignItems: 'center',
+ },
+}));
diff --git a/frontend/app/screens/login/signUp.js b/frontend/app/screens/login/signUp.js
new file mode 100644
index 0000000..5c7965e
--- /dev/null
+++ b/frontend/app/screens/login/signUp.js
@@ -0,0 +1,110 @@
+import React from 'react';
+import {
+ View,
+ Image,
+ Keyboard,
+} from 'react-native';
+import {
+ RkButton,
+ RkText,
+ RkTextInput,
+ RkStyleSheet,
+ RkTheme,
+ RkAvoidKeyboard,
+} from 'react-native-ui-kitten';
+import { GradientButton } from '../../components/';
+import { scaleVertical } from '../../utils/scale';
+import NavigationType from '../../config/navigation/propTypes';
+
+export class SignUp extends React.Component {
+ static navigationOptions = {
+ header: null,
+ };
+ static propTypes = {
+ navigation: NavigationType.isRequired,
+ };
+
+ getThemeImageSource = (theme) => (
+ theme.name === 'light' ?
+ require('../../assets/images/logo.png') : require('../../assets/images/logoDark.png')
+ );
+
+ renderImage = () => (
+ <Image style={styles.image} source={this.getThemeImageSource(RkTheme.current)} />
+ );
+
+ onSignUpButtonPressed = () => {
+ this.props.navigation.goBack();
+ };
+
+ onSignInButtonPressed = () => {
+ this.props.navigation.navigate('Login1');
+ };
+
+ render = () => (
+ <RkAvoidKeyboard
+ style={styles.screen}
+ onStartShouldSetResponder={() => true}
+ onResponderRelease={() => Keyboard.dismiss()}>
+ <View style={{ alignItems: 'center' }}>
+ {this.renderImage()}
+ <RkText rkType='h1'>Registration</RkText>
+ </View>
+ <View style={styles.content}>
+ <View>
+ <RkTextInput rkType='rounded' placeholder='Name' />
+ <RkTextInput rkType='rounded' placeholder='Email' />
+ <RkTextInput rkType='rounded' placeholder='Password' secureTextEntry />
+ <RkTextInput rkType='rounded' placeholder='Confirm Password' secureTextEntry />
+ <GradientButton
+ style={styles.save}
+ rkType='large'
+ text='SIGN UP'
+ onPress={this.onSignUpButtonPressed}
+ />
+ </View>
+ <View style={styles.footer}>
+ <View style={styles.textRow}>
+ <RkText rkType='primary3'>Already have an account?</RkText>
+ <RkButton rkType='clear' onPress={this.onSignInButtonPressed}>
+ <RkText rkType='header6'>Sign in now</RkText>
+ </RkButton>
+ </View>
+ </View>
+ </View>
+ </RkAvoidKeyboard>
+ )
+}
+
+const styles = RkStyleSheet.create(theme => ({
+ screen: {
+ padding: 16,
+ flex: 1,
+ justifyContent: 'space-around',
+ backgroundColor: theme.colors.screen.base,
+ },
+ image: {
+ marginBottom: 10,
+ height: scaleVertical(77),
+ resizeMode: 'contain',
+ },
+ content: {
+ justifyContent: 'space-between',
+ },
+ save: {
+ marginVertical: 20,
+ },
+ buttons: {
+ flexDirection: 'row',
+ marginBottom: 24,
+ marginHorizontal: 24,
+ justifyContent: 'space-around',
+ },
+ footer: {
+ justifyContent: 'flex-end',
+ },
+ textRow: {
+ flexDirection: 'row',
+ justifyContent: 'center',
+ },
+}));