This commit is contained in:
henrydays 2019-02-18 17:44:02 +00:00
parent 0c2a2d5b5c
commit c5a43f6420
27 changed files with 447 additions and 69 deletions

0
App/android/app/src/main/assets/fonts/AntDesign.ttf Executable file → Normal file
View File

0
App/android/app/src/main/assets/fonts/Entypo.ttf Executable file → Normal file
View File

0
App/android/app/src/main/assets/fonts/EvilIcons.ttf Executable file → Normal file
View File

0
App/android/app/src/main/assets/fonts/FontAwesome.ttf Executable file → Normal file
View File

View File

View File

View File

0
App/android/app/src/main/assets/fonts/Foundation.ttf Executable file → Normal file
View File

View File

View File

0
App/android/app/src/main/assets/fonts/Octicons.ttf Executable file → Normal file
View File

View File

0
App/android/app/src/main/assets/fonts/Zocial.ttf Executable file → Normal file
View File

View File

@ -195,7 +195,7 @@ class App extends Component {
<Button onPress={this.props.closeLoginQRScan} title={"Fechar scanner"}> </Button>
<QRCodeScanner
onRead={this.onSuccess.bind(this)}
onRead={this.onSuccess}
cameraStyle={ styles.cameraContainer}

View File

@ -1,5 +1,9 @@
import React from 'react';
import {TouchableOpacity} from 'react-native';
import {
TouchableOpacity,
Text,
View
} from 'react-native';
import {
createStackNavigator,
createAppContainer,
@ -26,21 +30,23 @@ import Icon from "react-native-vector-icons/Ionicons"
import IconF from "react-native-vector-icons/Foundation"
import IconFA from "react-native-vector-icons/FontAwesome5"
import Profile from "./screens/Profile";
import editCalendar from './screens/editCalendar';
import choosePath from './screens/choosePath';
const AppStack = createBottomTabNavigator(
{
Home: {
screen: Home,
Calendar: {
screen: Calendar,
navigationOptions: {
tabBarIcon: ({tintColor}) => (
<Icon name="md-home" color={tintColor} size={30}/>
<IconF name="calendar" color={tintColor} size={30}/>
)
},
},
Social: {
screen: Social,
@ -62,18 +68,8 @@ const AppStack = createBottomTabNavigator(
},
},
Calendar: {
screen: Calendar,
navigationOptions: {
tabBarIcon: ({tintColor}) => (
<IconF name="calendar" color={tintColor} size={30}/>
)
},
},
Eventos: {
Eventos: {
screen: Eventos,
navigationOptions: {
@ -83,6 +79,17 @@ const AppStack = createBottomTabNavigator(
)
},
},
Home: {
screen: Home,
navigationOptions: {
tabBarIcon: ({tintColor}) => (
<Icon name="md-home" color={tintColor} size={30}/>
)
},
},
},
@ -106,7 +113,7 @@ const Stack = createStackNavigator({
navigationOptions: ({navigation}) => {
const index = navigation.state.index;
if (navigation.state.routes[index].routeName !== 'Scan') {
if (navigation.state.routes[index].routeName == 'Home') {
return {
headerTitle: `${navigation.state.routes[index].routeName}`,
headerRight: (
@ -115,7 +122,27 @@ const Stack = createStackNavigator({
</TouchableOpacity>
)
}
} else {
}
else if(navigation.state.routes[index].routeName == 'Calendar'){
return {
headerTitle: 'Calendário',
headerRight: (
<View style={{flex:1, flexDirection:'row'}}>
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('Edit')}>
<Text>FAQ</Text>
</TouchableOpacity>
<TouchableOpacity style={{marginRight: 20, flex:1, flexDirection:'row'}} onPress={() => navigation.navigate('choosePath')}>
<Text>Escolher</Text>
<IconFA name="user-edit" size={22}/>
</TouchableOpacity></View>
)
}
}
else {
return {
header: null
}
@ -124,8 +151,16 @@ const Stack = createStackNavigator({
},
Profile: {
screen: Profile
},
Edit:{
screen: editCalendar
},
choosePath:{
screen: choosePath
}
});

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -76,6 +76,7 @@ class Calendar extends React.Component {
</View>
</View>
</View>
);
}
@ -129,40 +130,6 @@ class Calendar extends React.Component {
this.data = [
{
time: '09:30',
title: 'Sessão de Check-In',
description: 'Os participantes devem fazer o check-in e recolher o kit fornecido pela organização',
lineColor: '#009688',
icon: ArcheryImage,
imageUrl: 'https://blogsimages.adobe.com/conversations/files/2014/03/Check_In-1.jpg'
},
{
time: '17:45',
title: 'Sessão de Abertura',
lineColor: '#009688',
description: 'Bem vindo a Coimbra, a cidade dos estudantes! Obrigado por participares na 13ª edição do ENEI.',
icon: BadmintonImage,
imageUrl: 'https://d2v9y0dukr6mq2.cloudfront.net/video/thumbnail/Vjkyj2hBg/welcome-white-sign-with-falling-colorful-confetti-animation-on-white-background_sglmmh3qm__F0013.png'
},
{
time: '19:30',
title: 'Jantar',
lineColor: '#009688',
description: 'Time to eat',
icon: BadmintonImage,
imageUrl: 'https://www.retailmenot.com/blog/wp-content/uploads/2016/08/kids-eat-free-hero1-1471459190.jpg'
},
{
time: '23:30',
title: 'Festarola',
lineColor: '#009688',
description: 'Sabes beber? Se não sabes, aprende com os da casa!',
icon: BadmintonImage,
imageUrl: 'http://www.revistaversatille.com.br/wp-content/uploads/Party.jpg'
},
]
}
@ -175,7 +142,7 @@ class Calendar extends React.Component {
<ScrollView contentContainerStyle={styles.contentContainer}>
<Button onPress={this._update} title="LOGOUT"/>
<Timeline
data={this.props.events}
@ -261,6 +228,7 @@ class Calendar extends React.Component {
third: ThirdRoute,
fourth: FourthRoute
})}
useNativeDriver
onIndexChange={index => this.setState({index})}
initialLayout={{width: Dimensions.get('window').width, height: Dimensions.get('window').height}}
/>

View File

@ -1,5 +1,10 @@
import * as React from 'react';
import { View, StyleSheet, Dimensions } from 'react-native';
import {
View,
StyleSheet,
Dimensions,
Text
} from 'react-native';
import { TabView, TabBar, SceneMap } from 'react-native-tab-view';
@ -38,17 +43,9 @@ export default class Eventos extends React.Component {
render() {
return (
<TabView
navigationState={this.state}
renderScene={SceneMap({
first: FirstRoute,
second: SecondRoute,
third:ThirdRoute,
fourth: FourthRoute
})}
onIndexChange={index => this.setState({ index })}
initialLayout={{ width: Dimensions.get('window').width }}
/>
<View>
<Text>asd</Text>
</View>
);
}
}

View File

@ -0,0 +1,209 @@
import * as React from 'react';
import {
View,
StyleSheet,
Dimensions,
Image,
ScrollView,
Text,
Button,
TouchableOpacity
} from 'react-native';
import {TabView, TabBar, SceneMap} from 'react-native-tab-view';
import {
RkButton, RkCard, RkText,
RkTheme
} from 'react-native-ui-kitten';
import Timeline from 'react-native-timeline-feed'
import * as Progress from 'react-native-progress';
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as Actions from '../store/actions'; //Import your actionss
import Swiper from 'react-native-swiper';
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
import FitImage from 'react-native-fit-image';
const formatObj = (obj) => {
let a = {};
a.push({})
return a
};
class choosePath extends React.Component {
state = {
};
componentDidMount() {
this.props.getEvents(this.props.user);
console.log('didMount');
console.log(this.props.events);
}
_update = () => {
this.setState({user: this.props.user});
console.log(this.props.events);
}
constructor() {
super()
this.data = [
]
}
render() {
return (
<Swiper style={styles.wrapper} showsButtons={false}>
<View style={styles.company}>
<ScrollView>
<View style={styles.carreerPathContainer}>
<Text style={styles.carreerPathText}>Web development</Text>
</View>
<View style={styles.aboutCompany}>
<View style={styles.companyLogoContainer}>
<FitImage source={{uri:'http://trabalhotemporario.pt/wp-content/uploads/2014/03/blip.jpg'}} style={styles.companyLogo}/>
</View>
</View>
<View style={styles.companyHeader}>
<Text style={styles.companyTitle}>Blip: Game On</Text>
<Text>Based in Porto, Blip is a software engineering company with a difference. Founded in 2009, we already have 300 Blippers. And were still growing.</Text>
<Text>Were in the API Billionaires Club alongside Twitter, Facebook and Google. The code we write is used by over five million people across the world. The websites, mobile apps and retail systems we create keep us three steps ahead of the competition, from Europe to Australia.</Text>
</View>
</ScrollView>
</View>
<View>
<Text>asd</Text>
</View>
</Swiper>
)
}
}
const styles = StyleSheet.create({
carreerPathContainer:{
backgroundColor:'#CC1A17',
height:50,
flex:1,
alignItems:'center',
justifyContent:'center',
paddingTop:15,
},
carreerPathText:{
height:50,
color:'white',
fontWeight:'bold',
fontSize:20,
},
companyHeader:{
backgroundColor:'#dddddd',
// height:150,
borderRadius:5,
margin:10,
padding:10
},
companyTitle:{
paddingBottom:5,
fontWeight:'bold',
color:'#777777',
fontSize:17,
// padding:20
},
companyLogo: {
borderRadius: 20,
},
wrapper: {
},
company:{
flex:1,
flexDirection:'row',
// backgroundColor:'red',
color:'black'
},
companyLogoContainer:{
flex:1,
justifyContent: 'center',
width:'60%',
// backgroundColor:'white',
margin:20,
},
aboutCompany:{
width:SCREEN_WIDTH,
flex:1,
justifyContent: 'center',
alignItems: 'center',
}
});
function mapStateToProps(state, props) {
return {
token: state.apiReducer.token,
user: state.apiReducer.user,
logged: state.apiReducer.logged,
events: state.apiReducer.events
}
}
function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(choosePath);

View File

@ -0,0 +1,160 @@
import React, {Component} from 'react'
import {Card, Divider} from 'react-native-elements'
import {
Image,
ImageBackground,
Linking,
ListView,
Platform,
ScrollView,
StyleSheet,
Text,
View,
TouchableOpacity,
Dimensions,
TextInput,
Button
} from 'react-native'
import PropTypes from 'prop-types';
import {connect, Provider} from "react-redux";
import {bindActionCreators} from "redux";
import * as Actions from "../store/actions";
import {createStore} from 'redux';
import Email from '../components/Email';
import Separator from '../components/Separator';
import Tel from '../components/Telephone';
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
import Icon from "react-native-vector-icons/Ionicons"
import Swiper from 'react-native-swiper';
class editCalendar extends Component {
static navigationOptions = ({ navigation }) => ({
title: 'Editar Calendário',
headerTitleStyle : {textAlign: 'center',alignSelf:'center'},
headerStyle:{
backgroundColor:'white',
},
});
constructor(props) {
super(props);
this.state = {
token: false,
tokenData: '',
loggedIn: false,
onHold: true,
user: {},
cenas:{Name:'as'},
text:'',
};
}
render() {
return (
<ScrollView>
<View styles={styles.header}>
<View style={styles.carreerPath}>
<Text style={styles.carreerPathText}>Carreer Paths</Text>
</View>
<View style={styles.carreerPathDescription}>
<Text >Nesta edição do enei vai ser possível aos participantes ecolherem uma área</Text>
</View>
<TouchableOpacity style={{marginRight: 20}} onPress={() => navigation.navigate('Profile')}>
<Text>Escolher path</Text>
</TouchableOpacity>
</View>
<View>
</View>
</ScrollView>
)
}
}
const styles = StyleSheet.create({
header:{
flex:1,
height: SCREEN_HEIGHT*0.1,
backgroundColor:'red'
},
carreerPath:{
flex:1,
backgroundColor:'#CC1A17',
height:SCREEN_HEIGHT*0.1,
justifyContent: 'center',
alignItems: 'center',
},
carreerPathText:{
fontSize:20,
fontWeight: 'bold',
color:'white'
},
carreerPathDescription:{
padding:10,
marginBottom:100
},
wrapper: {
},
slide1: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#9DD6EB',
},
slide2: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#97CAE5',
},
slide3: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#92BBD9',
},
text: {
color: '#fff',
fontSize: 30,
fontWeight: 'bold',
}
});
mapStateToProps = (state, props) => {
return {
token: state.apiReducer.token,
user: state.apiReducer.user
}
};
function mapDispatchToProps(dispatch) {
return bindActionCreators(Actions, dispatch);
}
export default connect(mapStateToProps, mapDispatchToProps)(editCalendar);

View File

@ -47,7 +47,7 @@
<string>FontAwesome5_Solid.ttf</string>
</array>
<key>LSApplicationCategoryType</key>
<string></string>
<string/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>

8
App/package-lock.json generated
View File

@ -7748,6 +7748,14 @@
"yargs": "^9.0.0"
}
},
"react-native-action-button": {
"version": "2.8.5",
"resolved": "https://registry.npmjs.org/react-native-action-button/-/react-native-action-button-2.8.5.tgz",
"integrity": "sha512-BvGZpzuGeuFR2Y6j93+vKiSqDhsF87VHvNXFs/qEYKfzT4b1ASAT/GQbgS6gNt4jRJCUnJWYrIwlBzRjesZQmQ==",
"requires": {
"prop-types": "^15.5.10"
}
},
"react-native-animatable": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/react-native-animatable/-/react-native-animatable-1.3.1.tgz",

View File

@ -14,6 +14,7 @@
"prop-types": "^15.6.2",
"react": "16.6.3",
"react-native": "0.57.8",
"react-native-action-button": "^2.8.5",
"react-native-app-intro-slider": "^1.0.1",
"react-native-camera": "^1.9.2",
"react-native-confirmation-code-input": "^1.0.4",