Skip to content
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.

Navegação #3

Open
wants to merge 63 commits into
base: Integrador2
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
d269d2e
Update App.js
gustavosizilio Mar 28, 2018
8f7c7d3
Adicionando arquivo teste
Mar 28, 2018
62bac74
Add files via upload
kairiroberto Apr 6, 2018
2263050
Add files via upload
kairiroberto Apr 6, 2018
702ce1e
Geolocalizacao
joseansouza Apr 6, 2018
38804b6
mapa ifrn
joseansouza Apr 6, 2018
b7d8e82
Geolocation - Roberto e Gabriel
kairiroberto Apr 7, 2018
a27af30
Geolocalização IFRN CN
joseansouza Apr 7, 2018
4016c7c
mapa IFRN Currais Novos
joseansouza Apr 7, 2018
d074428
Arquivo para a exibir a localização
joseansouza Apr 7, 2018
96c12dd
arquivo de exibir a localização
joseansouza Apr 7, 2018
7f9d639
mapa currais novos, arquivo localização
joseansouza Apr 7, 2018
63a449d
Add files via upload
brhen10 Apr 10, 2018
4152117
Add files via upload
kairiroberto Apr 11, 2018
0c597ca
Merge pull request #1 from gustavosizilio/Geolocation2
gustavosizilio Apr 11, 2018
77414e3
Add files via upload
brhen10 Apr 19, 2018
3d608bb
Atualização master local
May 6, 2018
71a565d
Inserção da dependência navigation
May 6, 2018
5252e85
Merge branch 'Integrador2' into master
May 6, 2018
3a2fc44
Correção de bug de navegação
kairiroberto May 7, 2018
0a65735
Update App.js
kairiroberto May 7, 2018
1131ba2
Map Fixes
gustavosizilio May 9, 2018
adafc62
Atualização da posição do aluno/professor
May 11, 2018
86324ba
Delete App.js
kairiroberto May 19, 2018
9821dad
Delete home.js
kairiroberto May 19, 2018
282b6ac
Delete login.js
kairiroberto May 19, 2018
bdf532b
Delete 31818947_202184777172869_4999292720808722432_n.png
kairiroberto May 19, 2018
f6363bd
Delete 31880858_202184683839545_5746873306716307456_n.png
kairiroberto May 19, 2018
be0fbe6
Delete 31890649_202184593839554_2781018786180890624_n.png
kairiroberto May 19, 2018
57348a2
Delete 31914087_202184580506222_6442806236579627008_n.png
kairiroberto May 19, 2018
9fc3840
Delete 31935454_202184460506234_8812549313956675584_n.png
kairiroberto May 19, 2018
1ee9edc
Delete CapturaTela1.JPG
kairiroberto May 19, 2018
209243c
Delete CapturaTela2.JPG
kairiroberto May 19, 2018
841ff6f
Delete App.js
kairiroberto May 19, 2018
dc70202
Add files via upload
kairiroberto May 20, 2018
6949be2
Add files via upload
kairiroberto May 20, 2018
f8a42e2
Add files via upload
kairiroberto May 20, 2018
0a06143
Add files via upload
kairiroberto May 20, 2018
418352a
Add files via upload
giliardemacedo May 23, 2018
e8d6753
Add files via upload
brhen10 May 24, 2018
c99a278
Add files via upload
brhen10 May 24, 2018
3ff0750
Add files via upload
brhen10 May 25, 2018
71d0056
Add files via upload
brhen10 May 25, 2018
42188cb
Add files via upload
joseansouza May 30, 2018
b86cfab
Removendo arquivos compilados do controle de versão
brhen10 Jun 1, 2018
88f7cd7
Update README.md
kairiroberto Jun 8, 2018
a49511a
Update README.md
kairiroberto Jun 8, 2018
00c1ea1
Configuração do firebase
lucasemanuel Jun 8, 2018
c580975
Commit Quebrado da aula do dia 08 de junho
lucasemanuel Jun 8, 2018
6d90ded
Merge branch 'master' of https://github.com/gustavosizilio/SmartIF
lucasemanuel Jun 8, 2018
937169b
atualizando as versões
giliardemacedo Jun 15, 2018
fd9bb7a
Atualizaão
giliardemacedo Jun 20, 2018
6cfdab3
acesso ao firebase
kairiroberto Jun 25, 2018
c98ae67
alterações nas funções gerarMarker e gerarPonto
kairiroberto Jun 26, 2018
2faa82b
alteração nos métodos gerarMarker e gerarPonto - parte 2
kairiroberto Jun 26, 2018
0b8a311
Alteração do código: usando json.map
kairiroberto Jun 27, 2018
49d8ed7
Add files via upload
kairiroberto Jun 27, 2018
47b2129
Add files via upload
kairiroberto Jun 27, 2018
57f7bd3
Add files via upload
kairiroberto Jun 29, 2018
e0637d3
Add files via upload
kairiroberto Jun 29, 2018
b1d3b04
Add files via upload
kairiroberto Jun 29, 2018
bac9d75
Add files via upload
kairiroberto Jun 29, 2018
395aa8f
Add files via upload
kairiroberto Jun 29, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add files via upload
Login para o App...
brhen10 authored Apr 10, 2018

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 63a449da2768ef1004309e9caa28f3c4642817a0
30 changes: 30 additions & 0 deletions AppBrenoDaniel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { StyleSheet,
Text,
View,
TextInput,
KeyboardAvoidingView,
TouchableOpacity,
} from 'react-native';

import Login from './app/Login';
import Profile from './app/Profile';

const Application = StackNavigator({
Home: { screen: Login },
Profile: { screen: Profile },
}, {
navigationOptions: {
header: false,
}
});


export default class App extends React.Component {
render() {
return (
<Application />
);
}
}

119 changes: 119 additions & 0 deletions Login.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
import React from 'react';
import { StyleSheet,
Text,
View,
TextInput,
KeyboardAvoidingView,
TouchableOpacity,
AsyncStorage,
} from 'react-native';

export default class Login extends React.Component {

constructor(props){
super(props);
this.state {
username: '',
password: '',
}
}

componentDidMount(){
this._loadInitialState().done();
}

_loadInitialState = async () => {
var value = await AsyncStorage.getItem('user');
if(value !== null) {
this.props.navigation.navigate('Profile');
}
}

render() {
return (

<KeyboardAvoidingView behavior='padding' style={styles.wrapper}>

<View style={styles.container}>

<Text style={styles.header}> | Login | </Text>

<TextInput style={styles.textInput} placeholder='Username'
onChangeText={ (username) => this.setState({username}) }
underlineColorAndroid='transparent' />

<TextInput style={styles.textInput} placeholder='Password'
onChangeText={ (password) => this.setState({password}) }
underlineColorAndroid='transparent' />

<TouchableOpacity
style={styles.btn}
onPress={this.login}>
<Text> log In</Text>
</TouchableOpacity>

</View>
</KeyboardAvoidingView>
);
}

login = () => {

fetch('https://suap.ifrn.edu.br/api/v2/autenticacao/token/', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
username: this.state.username,
password: this.state.password,
})
})
.then((response) => response.json())
.then((res => {
if (res.sucess === true) {
AsyncStorage.setItem('user', res.user);
this.props.navigation.navigate('Profile');
} else {
alert(res.message);
}
})
.done();

}
}


const styles = StyleSheet.create({
wrapper: {
flex: 1,
}
container: {
flex: 1;
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#7FFFD4',
paddingLeft: 40,
paddingRight: 40,
},
header: {
fontSize: 24,
marginBottom: 60,
color: '#fff',
fontWeight: 'bold',
},
textInput: {
alignSelf: 'stretch',
padding: 16,
marginBottom: 20,
backgroundColor: '#fff',
},
btn: {
alignSelf: 'stretch',
backgroundColor: '#EEDD82',
padding: 20,
alignItems: 'center'
}

});
37 changes: 37 additions & 0 deletions Profile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import React from 'react';
import { StyleSheet,
Text,
View,

} from 'react-native';

export default class Profile extends React.Component {


render() {
return (



<View style={styles.container}>

<Text style={styles.header}> PÁGINA A SER ACESSADA </Text>

</View>

);
}
}


const styles = StyleSheet.create({
container: {
flex: 1;
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#7FFFD4'
},
Text: {
color: '#fff'
}
});