Skip to content

Commit

Permalink
Login View
Browse files Browse the repository at this point in the history
  • Loading branch information
vctrysam committed Sep 2, 2016
1 parent 98ae986 commit ff5f920
Show file tree
Hide file tree
Showing 12 changed files with 328 additions and 1 deletion.
25 changes: 25 additions & 0 deletions app/components/chat.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class Chat extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Chat View</Text>
</View>
)
}
}
25 changes: 25 additions & 0 deletions app/components/eachPokemon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class EachPokemon extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Each Pokemon</Text>
</View>
)
}
}
25 changes: 25 additions & 0 deletions app/components/eachpokedex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class EachPokeDex extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Each PokeDex</Text>
</View>
)
}
}
104 changes: 104 additions & 0 deletions app/components/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';

import Login from './login'
import EachPokemon from './eachPokemon'
import EachPokedex from './eachpokedex'
import Pokedex from './pokedex'
import Pokemon from './pokemon'
import Trainer from './trainer'
import Pokemart from './pokemart'
import Chat from './chat'



export default class Index extends Component {
constructor(props){
super(props)

}

renderScene(route, navigator) {
var {state,actions} = this.props;
var routeId = route.id;

if (routeId === 'login') {
return (
<Login
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'pokemart') {
return (
<Pokemart
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'pokedex') {
return (
<Pokedex
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'pokemon') {
return (
<Pokemon
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'eachPokemon') {
return (
<EachPokemon
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'eachPokedex') {
return (
<EachPokedex
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'trainer') {
return (
<Trainer
{...this.props}
navigator={navigator} />
);
}
if (routeId === 'chat') {
return (
<Chat
{...this.props}
navigator={navigator} />
);
}

}


render() {
return (
<View style={{flex:1}}>
<Navigator
style={{flex: 1}}
ref={'NAV'}
initialRoute={{id: 'login', name: 'login'}}
renderScene={this.renderScene.bind(this)}/>
</View>
)
}
}
48 changes: 48 additions & 0 deletions app/components/login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
TextInput,
View
} from 'react-native';


export default class Login extends Component {
constructor(props){
super(props)

}
render(){
return(
<Image source={require("../images/background.jpg")} resizeMode = "stretch" style={{flex:1, alignItems:'center', width:null, height:null, justifyContent:'space-between'}}>
<Image source={require('../images/logo.png')} resizeMode="contain" style={{width:220}} />
<View style={{width:310, height:150, margin:10, }}>
<Text style={{alignSelf:'flex-end', fontSize:13, margin:5, color:'#333', fontStyle:'italic', fontWeight:'200'}}>REGISTER</Text>
<View style={{flex:1, borderColor:'#d3d3d3'}}>
<TextInput
placeholder = "USERNAME"
placeholderTextColor = "#fff"
style = {styles.textInput}/>
</View>
<View style={{flex:1, borderColor:'#d3d3d3'}}>
<TextInput
placeholder = "PASSWORD"
placeholderTextColor = "#fff"
style = {styles.textInput}/>
</View>
<TouchableOpacity style={{backgroundColor:'rgba(226,39,44, 0.6)', flex:1, justifyContent:'center', alignItems:'center'}}><Text style={{color:'#fff', fontSize:12, fontWeight:'700'}}>LOG IN</Text></TouchableOpacity>
</View>
</Image>
)
}
}
const styles = StyleSheet.create({
textInput: {flex:1, backgroundColor:'#rgba(0,0,0,0.3)', padding:10, color:'#fff', fontSize:12},


});


25 changes: 25 additions & 0 deletions app/components/pokedex.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class Pokedex extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Pokedex View</Text>
</View>
)
}
}
25 changes: 25 additions & 0 deletions app/components/pokemart.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class Pokemart extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Pokemart View</Text>
</View>
)
}
}
25 changes: 25 additions & 0 deletions app/components/pokemon.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class Pokemon extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Pokemon View</Text>
</View>
)
}
}
25 changes: 25 additions & 0 deletions app/components/trainer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { Component } from 'react';
import {

StyleSheet,
Image,
Text,
TouchableOpacity,
Navigator,
View
} from 'react-native';


export default class Trainer extends Component {
constructor(props){
super(props)

}
render(){
return(
<View>
<Text>Trainer View</Text>
</View>
)
}
}
2 changes: 1 addition & 1 deletion app/container/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import thunk from 'redux-thunk';


import * as reducers from '../reducers';
import Components from '../components/index';
import Components from '../components/';

const createStoreWithMiddleware = applyMiddleware(thunk)(createStore);
const reducer = combineReducers(reducers);
Expand Down
Binary file added app/images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/images/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ff5f920

Please sign in to comment.