diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..3578eb3e Binary files /dev/null and b/.DS_Store differ diff --git a/App/android/app/build.gradle b/App/android/app/build.gradle index ec49a2d4..911b0071 100755 --- a/App/android/app/build.gradle +++ b/App/android/app/build.gradle @@ -99,11 +99,11 @@ android { buildToolsVersion rootProject.ext.buildToolsVersion defaultConfig { - applicationId "com.app" + applicationId "pt.enei" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1 - versionName "1.0" + versionCode 3 + versionName "3" ndk { abiFilters "armeabi-v7a", "x86" } @@ -149,6 +149,7 @@ android { } dependencies { + compile project(':react-native-maps') compile project(':react-native-device-info') compile project(':react-native-material-shadows') diff --git a/App/android/app/src/main/assets/fonts/AntDesign.ttf b/App/android/app/src/main/assets/fonts/AntDesign.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/Entypo.ttf b/App/android/app/src/main/assets/fonts/Entypo.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/EvilIcons.ttf b/App/android/app/src/main/assets/fonts/EvilIcons.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/FontAwesome.ttf b/App/android/app/src/main/assets/fonts/FontAwesome.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf b/App/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf b/App/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf b/App/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/Foundation.ttf b/App/android/app/src/main/assets/fonts/Foundation.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/Ionicons.ttf b/App/android/app/src/main/assets/fonts/Ionicons.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf b/App/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/MaterialIcons.ttf b/App/android/app/src/main/assets/fonts/MaterialIcons.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/Octicons.ttf b/App/android/app/src/main/assets/fonts/Octicons.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/SimpleLineIcons.ttf b/App/android/app/src/main/assets/fonts/SimpleLineIcons.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/assets/fonts/Zocial.ttf b/App/android/app/src/main/assets/fonts/Zocial.ttf old mode 100644 new mode 100755 diff --git a/App/android/app/src/main/java/com/app/MainApplication.java b/App/android/app/src/main/java/com/app/MainApplication.java index 23ca3771..326eac1c 100755 --- a/App/android/app/src/main/java/com/app/MainApplication.java +++ b/App/android/app/src/main/java/com/app/MainApplication.java @@ -3,6 +3,7 @@ package com.app; import android.app.Application; import com.facebook.react.ReactApplication; + import com.airbnb.android.react.maps.MapsPackage; import com.learnium.RNDeviceInfo.RNDeviceInfo; import ui.materialshadows.RNMaterialShadowsPackage; @@ -30,6 +31,7 @@ public class MainApplication extends Application implements ReactApplication { protected List getPackages() { return Arrays.asList( new MainReactPackage(), + new MapsPackage(), new RNDeviceInfo(), new RNMaterialShadowsPackage(), diff --git a/App/android/app/src/main/res/drawable-hdpi/icon.png b/App/android/app/src/main/res/drawable-hdpi/icon.png deleted file mode 100755 index bb58ec1b..00000000 Binary files a/App/android/app/src/main/res/drawable-hdpi/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/drawable-ldpi/icon.png b/App/android/app/src/main/res/drawable-ldpi/icon.png deleted file mode 100755 index 08ead39a..00000000 Binary files a/App/android/app/src/main/res/drawable-ldpi/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/drawable-mdpi/icon.png b/App/android/app/src/main/res/drawable-mdpi/icon.png deleted file mode 100755 index d7d5010a..00000000 Binary files a/App/android/app/src/main/res/drawable-mdpi/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/drawable-xhdpi/icon.png b/App/android/app/src/main/res/drawable-xhdpi/icon.png deleted file mode 100755 index 478a2c57..00000000 Binary files a/App/android/app/src/main/res/drawable-xhdpi/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/drawable-xxhdpi/icon.png b/App/android/app/src/main/res/drawable-xxhdpi/icon.png deleted file mode 100755 index 5a16987c..00000000 Binary files a/App/android/app/src/main/res/drawable-xxhdpi/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/drawable-xxxhdpi/icon.png b/App/android/app/src/main/res/drawable-xxxhdpi/icon.png deleted file mode 100755 index f8f7db9c..00000000 Binary files a/App/android/app/src/main/res/drawable-xxxhdpi/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/drawable/icon.png b/App/android/app/src/main/res/drawable/icon.png deleted file mode 100755 index 478a2c57..00000000 Binary files a/App/android/app/src/main/res/drawable/icon.png and /dev/null differ diff --git a/App/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/App/android/app/src/main/res/mipmap-hdpi/ic_launcher.png old mode 100755 new mode 100644 index 1ace9a10..52a9086d Binary files a/App/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/App/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/App/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/App/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png old mode 100755 new mode 100644 index 1ace9a10..52a9086d Binary files a/App/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and b/App/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ diff --git a/App/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/App/android/app/src/main/res/mipmap-mdpi/ic_launcher.png old mode 100755 new mode 100644 index ec2bb085..a3197a8a Binary files a/App/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/App/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/App/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/App/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png old mode 100755 new mode 100644 index ec2bb085..a3197a8a Binary files a/App/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and b/App/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ diff --git a/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png old mode 100755 new mode 100644 index cf790963..64f3d65c Binary files a/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png old mode 100755 new mode 100644 index cf790963..64f3d65c Binary files a/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and b/App/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ diff --git a/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png old mode 100755 new mode 100644 index 44da4bbf..64802aa9 Binary files a/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png old mode 100755 new mode 100644 index 44da4bbf..64802aa9 Binary files a/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and b/App/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ diff --git a/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png old mode 100755 new mode 100644 index 142707bf..04d76124 Binary files a/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png old mode 100755 new mode 100644 index 142707bf..04d76124 Binary files a/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and b/App/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ diff --git a/App/android/app/src/main/res/playstore-icon.png b/App/android/app/src/main/res/playstore-icon.png new file mode 100644 index 00000000..9854dd53 Binary files /dev/null and b/App/android/app/src/main/res/playstore-icon.png differ diff --git a/App/android/app/src/main/res/values/strings.xml b/App/android/app/src/main/res/values/strings.xml index 23f81503..aebc39b5 100755 --- a/App/android/app/src/main/res/values/strings.xml +++ b/App/android/app/src/main/res/values/strings.xml @@ -1,3 +1,3 @@ - ENEI 2019 + ENEI 19 diff --git a/App/android/app/src/main/res/web_hi_res_512.png b/App/android/app/src/main/res/web_hi_res_512.png deleted file mode 100755 index 5482bbc6..00000000 Binary files a/App/android/app/src/main/res/web_hi_res_512.png and /dev/null differ diff --git a/App/android/gradle.properties b/App/android/gradle.properties index 8429033d..2cf04b41 100755 --- a/App/android/gradle.properties +++ b/App/android/gradle.properties @@ -21,5 +21,5 @@ android.enableAapt2=false MYAPP_RELEASE_STORE_FILE=my-release-key.keystore MYAPP_RELEASE_KEY_ALIAS=my-key-alias -MYAPP_RELEASE_STORE_PASSWORD=aspire98H -MYAPP_RELEASE_KEY_PASSWORD=aspire98H \ No newline at end of file +MYAPP_RELEASE_STORE_PASSWORD=9xbHZxMXjR +MYAPP_RELEASE_KEY_PASSWORD=9xbHZxMXjR diff --git a/App/android/settings.gradle b/App/android/settings.gradle index 8dc9c679..bf47bc13 100755 --- a/App/android/settings.gradle +++ b/App/android/settings.gradle @@ -1,4 +1,5 @@ rootProject.name = 'app' + include ':react-native-maps' project(':react-native-maps').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-maps/lib/android') include ':react-native-device-info' diff --git a/App/app/App.js b/App/app/App.js index ccc7ec78..3364947f 100755 --- a/App/app/App.js +++ b/App/app/App.js @@ -16,7 +16,7 @@ import { TouchableOpacity, TextInput, NetInfo, - Animated + Animated, Linking, } from "react-native"; import { bindActionCreators } from "redux"; @@ -34,12 +34,12 @@ import Modal from "react-native-modal"; import Router from "./Router"; import Icon from "react-native-vector-icons/Ionicons"; - +import IconFA from "react-native-vector-icons/FontAwesome5" const SCREEN_HEIGHT = Dimensions.get("window").height; const SCREEN_WIDTH = Dimensions.get("window").width; import Swiper from "react-native-swiper"; -import resetPassword from "./screens/resetPassword"; +//import resetPassword from "./screens/resetPassword"; var TimerMixin = require("react-timer-mixin"); function handleConnectivityChange() { @@ -48,7 +48,7 @@ function handleConnectivityChange() { class App extends Component { - + handleConnectivityChange = isConnected => { this.setState({ isConnected }); @@ -81,15 +81,15 @@ class App extends Component { logged: false, isModalVisible: false, state: { text: "" }, - username: "QR code ou", + username: "", failedAttempt: false, push: 4, UI_loginScannerActive: false, userDetails: { username: "", password: "" }, isConnected: true, modalOpen: false, - modalResetPassword:false, - resetText:'' + modalResetPassword: false, + resetText: '' }; } _print = () => { @@ -105,13 +105,13 @@ class App extends Component { componentDidMount() { //this.props.hold(); - // this.props.loginInternal(); + this.setState({ isModalVisible: false }); //verifica se o utilizador tem token guardado this.props.checkUser(this.props.token); - + } componentWillUnmount() { NetInfo.isConnected.removeEventListener( @@ -119,14 +119,14 @@ class App extends Component { this.handleConnectivityChange ); } - _toggle=()=>{ - this.setState({modalResetPassword:false}) + _toggle = () => { + this.setState({ modalResetPassword: false }) } //faz call - _reset=()=>{ + _reset = () => { //fecha modal - this.props.resetPassword(this.props.token,this.state.resetText), - this.setState({modalResetPassword:false}) + this.props.resetPassword(this.props.token, this.state.resetText), + this.setState({ modalResetPassword: false }) //faz call } @@ -148,14 +148,14 @@ class App extends Component { }; render() { - - + + if (!this.props.logged && this.props.onHold) { return ( - + ); } else { @@ -167,22 +167,35 @@ class App extends Component { return ; } return ( - - - - - - - + + + + + + + + Sim, o quadrado não está centrado. Era só para testar a tua atenção! + + + + - - - Reset Password - Deves introduzir o email com o qual efectuaste a compra do bilhete. - this.setState({ resetText:r })} - clearButtonMode="always" - value={this.state.resetText} - clearTextOnFocus={true} - onSubmitEditing={Keyboard.dismiss} - placeholder="Email ou Qr code" - /> - - - Caso tenhas problemas com este processo deves contactar a comissão organizadora atravês do email geral. - + > + + + + Reset Password + Deves introduzir o email com o qual efectuaste a compra do bilhete. + this.setState({ resetText: r })} + clearButtonMode="always" + value={this.state.resetText} + clearTextOnFocus={true} + onSubmitEditing={Keyboard.dismiss} + placeholder="Email ou Qr code" + /> + + + Caso tenhas problemas com este processo deves contactar a comissão organizadora atravês do email geral. + @@ -225,7 +239,7 @@ class App extends Component { justifyContent: "center", alignItems: "center", - margin:20 + margin: 20 }} > - - + {!this.props.loadingLogin && + + + { + this.setState({ username:user }); + }} + clearButtonMode="always" + + clearTextOnFocus={true} + onSubmitEditing={Keyboard.dismiss} + value={this.state.username} + placeholder="QR code" + + /> + + + + + + + + { - this.setState({ username:searchString }); - }} - maxLength={15} - underlineColorAndroid="transparent" + 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" /> - - - - + {!this.props.loadingLogin && + + + Login + - + } + - - this.setState({ text })} - clearButtonMode="always" - value={this.state.text} - clearTextOnFocus={true} - onSubmitEditing={Keyboard.dismiss} - placeholder="Password" - /> - { !this.props.loadingLogin && - - - Login - - - } - {this.props.alignItems && - - } - - + }{ + this.props.loadingLogin && + + + + } - + { + Linking.canOpenURL("https://www.facebook.com/ENEIConf/").then(supported => { + if (supported) { + Linking.openURL("https://www.facebook.com/ENEIConf/"); + } else { + + } + }); + }}> - - - - - - - - - - Não sabes a password? - - {this.setState({modalResetPassword:true})}}> - - Reset Password + { + Linking.canOpenURL("https://www.instagram.com/eneiconf/").then(supported => { + if (supported) { + Linking.openURL("https://www.instagram.com/eneiconf/"); + } else { + + } + }); + }}> + + + { + Linking.canOpenURL("https://enei.pt").then(supported => { + if (supported) { + Linking.openURL("https://enei.pt"); + } else { + + } + }); + }}> + + + + + + Não sabes a password? + + { this.setState({ modalResetPassword: true }) }}> + + Reset Password - - - + + + ); } } @@ -326,15 +379,15 @@ const overlayColor = "rgba(0,0,0,0.30)"; const styles = { cameraContainer: { - height: Dimensions.get('window').height , + height: Dimensions.get('window').height, }, - resetPassword:{ - - + resetPassword: { + + borderColor: "#bfbdbd", borderWidth: 1, - margin:20, + margin: 20, marginTop: 60, marginBottom: 60, @@ -349,7 +402,7 @@ const styles = { paddingLeft: SCREEN_WIDTH * 0.05 }, passwordInput: { - + borderColor: "#bfbdbd", borderWidth: 1, @@ -371,19 +424,19 @@ const styles = { }, scanQR: { //flexDirection: 'row', - flex:1, -//paddingTop: 5, + flex: 1, + //paddingTop: 5, backgroundColor: 10, - alignItems:'center', - padding:5, - paddingRight:15, + alignItems: 'center', + padding: 5, + paddingRight: 15, //width: 80, - // paddingLeft: 10, + // paddingLeft: 10, backgroundColor: "#CC1A17", borderBottomRightRadius: 3, borderTopRightRadius: 3, - // height: "100%" + // height: "100%" }, inputSection: { flexDirection: "row", @@ -560,7 +613,7 @@ mapStateToProps = (state, props) => { modalOpen: state.apiReducer.modalOpen, modalInfo: state.apiReducer.modalInfo, type: state.apiReducer.type, - loadingLogin:state.apiReducer.loadingLogin + loadingLogin: state.apiReducer.loadingLogin }; }; diff --git a/App/app/Router.js b/App/app/Router.js index c557ba5d..0477623c 100755 --- a/App/app/Router.js +++ b/App/app/Router.js @@ -36,8 +36,14 @@ import Profile from "./screens/Profile"; import editCalendar from './screens/editCalendar'; import choosePath from './screens/choosePath'; import calendarDetail from './screens/calendarDetail'; -import FebradaDetail from './screens/FebradaDetail'; -import resetPassword from './screens/resetPassword'; + +//import resetPassword from './screens/resetPassword'; + +import eventDetail from './screens/eventDetail'; + +import teamDetail from './screens/teamDetail'; + +import event from './screens/event'; const navigationOptions = ({navigation}) => ({ headerLeft: navigation.goBack(null)}/>, @@ -45,6 +51,7 @@ const navigationOptions = ({navigation}) => ({ }); + const AppStack = createBottomTabNavigator( { Calendário: { @@ -58,7 +65,7 @@ const AppStack = createBottomTabNavigator( }, }, - 'Jogo do...': { + 'Jogo': { screen: Jogo, navigationOptions: { @@ -107,6 +114,7 @@ const AppStack = createBottomTabNavigator( { initialRouteName: 'Home', + tabBarOptions: { showLabel: true, // hide labels activeTintColor: '#CC1A17', // active icon color @@ -132,28 +140,36 @@ const Stack = createStackNavigator({ navigation.navigate('Profile')}> - Editar dados + Editar dados ) } } + + if (navigation.state.routes[index].routeName == 'Jogo') { + return { + header: ( + Jogo do ENEI'19 + ) + + + + } + } else if (navigation.state.routes[index].routeName == 'Calendário') { return { headerTitle: 'Calendário', headerRight: ( - navigation.navigate('Edit')}> - FAQ - - + + navigation.navigate('choosePath')}> - Inscrições - + Inscrições + ) @@ -204,12 +220,16 @@ const Stack = createStackNavigator({ calendarDetail: { screen: calendarDetail, }, - FebradaDetail: { - screen: FebradaDetail, + eventDetail: { + screen: eventDetail, + }, + teamDetail:{ + screen: teamDetail, }, - resetPassword:{ - screen:resetPassword + + event:{ + screen: event } }); diff --git a/App/app/screens/Calendar.js b/App/app/screens/Calendar.js index 6b274962..cca831eb 100644 --- a/App/app/screens/Calendar.js +++ b/App/app/screens/Calendar.js @@ -29,7 +29,8 @@ const formatObj = obj => { return a; }; - +const SCREEN_HEIGHT = Dimensions.get("window").height; +const SCREEN_WIDTH = Dimensions.get("window").width; class Calendar extends React.Component { state = { index: 0, @@ -45,9 +46,12 @@ class Calendar extends React.Component { }; componentDidMount() { - this.props.getEvents(this.props.user); - this.props.getSessions(this.props.token); + + // this.props.getSessions(this.props.token); + + // this.props.getEvents(this.props.user,this.props.careerPath); + } _openDetails = () => { @@ -64,22 +68,11 @@ class Calendar extends React.Component { {item.name} - Local: 1 + {item.place} {item.description} - - - - {item.Enrolled} / {item.MaxAttendees} - - @@ -141,12 +134,14 @@ class Calendar extends React.Component { super(); } _refresh=()=>{ - this.props.getEvents(this.props.user); + this.props.getEvents(this.props.user,this.props.careerPath, this.props.token); + } render() { const ThirdRoute = () => ( + {this.props.events != undefined && ( ); const FirstRoute = () => ( + {this.props.events != undefined && ( )} + ); const SecondRoute = () => ( @@ -315,12 +312,13 @@ class Calendar extends React.Component { height: Dimensions.get("window").height }} style={{ backgroundColor: "#F2F2F2" }} - indicatorStyle={{ backgroundColor: "pink" }} - /> -