Merge pull request #27 from henrydays/Borges_march

New layout Calendar Detail
This commit is contained in:
Henrique Dias 2019-03-11 18:26:19 +00:00 committed by GitHub
commit a017e03285
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 173 additions and 104 deletions

View File

@ -104,7 +104,10 @@ const AppStack = createBottomTabNavigator(
},
{
initialRouteName: 'Home',
//initialRouteName: 'Home',
initialRouteName: 'Eventos',
//initialRouteName: 'Calendário',
tabBarOptions: {
showLabel: true, // hide labels

View File

@ -1,7 +1,11 @@
import * as React from "react";
import { View, StyleSheet, Dimensions, Text, Button } from "react-native";
import {View, StyleSheet, Dimensions, Text, Button, ScrollView} from "react-native";
import {TabView, TabBar, SceneMap} from "react-native-tab-view";
const SCREEN_HEIGHT = Dimensions.get("window").height;
const SCREEN_WIDTH = Dimensions.get("window").width;
const FirstRoute = () => (
<View style={[styles.scene, {backgroundColor: "#ff4081"}]}/>
);
@ -17,6 +21,8 @@ const FourthRoute = () => (
<View style={[styles.scene, {backgroundColor: "#673ab7"}]}/>
);
export default class Eventos extends React.Component {
state = {
index: 0,
@ -28,19 +34,62 @@ export default class Eventos extends React.Component {
]
};
render() {
renderFebrada = () => {
return (
<View>
<Button
title="Febrada"
onPress={() => this.props.navigation.navigate("febrada")}
/>
<Text>Ola mundo</Text>
</View>
);
};
renderRally = () => {
};
renderCaching = () => {
};
render() {
return (
<View style={styles.container}>
<ScrollView styles={styles.scroll}>
<View styles={styles.cardContainer}>
{this.renderFebrada()}
</View>
<View styles={styles.cardContainer}>
</View>
<View styles={styles.cardContainer}>
</View>
</ScrollView>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
backgroundColor: '#eee',
flex: 1,
},
scroll: {
flex: 1,
},
cardContainer: {
flex: 1,
padding: 10,
margin: 20,
backgroundColor: 'white',
borderRadius: 5,
height: SCREEN_WIDTH * (1/2),
},
scene: {
flex: 1
}

View File

@ -158,11 +158,11 @@ class Profile extends Component {
Mobile: phone,
Avatar: "base64"
} ); this.props.getUserInfo(this.props.userDetails.token);
});
this.props.getUserInfo(this.props.userDetails.token);
}
else
console.log("data not valid");
@ -207,7 +207,6 @@ class Profile extends Component {
<Divider style={{backgroundColor: 'black'}}/>
<View style={styles.userBioRow}>
<Icon name="ios-phone-portrait" style={styles.userBioLogo} size={25}/>
@ -261,7 +260,7 @@ class Profile extends Component {
</View>
<View style={styles.userBio}>
<View style={styles.userBioRow}>
<Text style={styles.userPassText} size={25}>
<Text style={styles.userPassText} size={20}>
Old Password:
</Text>
@ -270,7 +269,7 @@ class Profile extends Component {
/>
</View>
<View style={styles.userBioRow}>
<Text style={styles.userPassText} size={25}>
<Text style={styles.userPassText} size={20}>
Nova Password:
</Text>
@ -279,7 +278,7 @@ class Profile extends Component {
/>
</View>
<View style={styles.userBioRow}>
<Text style={styles.userPassText} size={25}>
<Text style={styles.userPassText} size={20}>
Repetir Password:
</Text>
@ -293,7 +292,12 @@ class Profile extends Component {
</ScrollView>
<TouchableOpacity onPress={this._logout} style={{ height: 50, justifyContent: 'center', alignItems: 'center', backgroundColor: '#CC1A17'}}>
<TouchableOpacity onPress={this._logout} style={{
height: 50,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#CC1A17'
}}>
<Text style={{color: "#fff", fontWeight: 'bold'}}>Logout</Text>
</TouchableOpacity>
@ -330,23 +334,27 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: 'row',
justifyContent: 'flex-start',
padding: 10
padding: 10,
borderWidth: 2,
alignItems: 'center',
},
userBioText: {
width: SCREEN_WIDTH * 0.50,
width: SCREEN_WIDTH * 0.40,
flex: 2,
borderWidth: 2,
},
userPassText: {
flex: 1,
flexDirection: 'row',
justifyContent: 'flex-start',
//alignSelf: 'flex-start',
justifyContent: 'flex-end',
borderWidth: 2,
},
userBioLogo: {
marginLeft: SCREEN_WIDTH * 0.05,
width: SCREEN_WIDTH * 0.15,
},
bottomLogOut: {

View File

@ -101,11 +101,11 @@ class calendarDetail extends React.Component {
renderDescription = (info) => {
return (
<View>
<View style={styles.infoRow}>
<View style={{flexDirection: "row"}}>
<View style={styles.cardContainer}>
<View style={{flexDirection: "row", alignItems: 'center', alignSelf:'center'}}>
<Text style={styles.ramoText}>Onde está o ramo? xD </Text>
<View style={styles.timeText}>
<Text style={{color: "#CC1A17", fontSize: 20,}}>
<Text style={{color: "#CC1A17", fontSize: 15}}>
{info.time === info.timeEnd ? info.time : `${info.time} - ${info.timeEnd}`}
</Text>
</View>
@ -119,15 +119,14 @@ class calendarDetail extends React.Component {
</View>
</View>
<View style={styles.infoRow}>
<Text style={{fontSize: 30, color: "#CC1A17"}}>Descrição</Text>
<View style={styles.cardContainer}>
<Text style={{fontSize: 20, color: "#CC1A17"}}>Descrição</Text>
<Divider style={{backgroundColor: '#000'}}/>
<View style={{marginTop: 10}}>
<Text style={{fontSize: 15}}>
<Text style={{fontSize: 10}}>
{info.description}
</Text>
</View>
</View>
</View>
)
@ -203,13 +202,14 @@ class calendarDetail extends React.Component {
<View style={styles.mainViewStyle}>
<ScrollView style={styles.scroll}>
<View style={styles.container}>
<View style={styles.cardContainer}>
<View style={styles.headerContainer}>
{this.renderHeader(info)}
</View>
{this.renderDescription(info)}
</View>
<View style={styles.infoRow}>
<Text style={{fontSize: 30, color: "#CC1A17"}}>Localização</Text>
<View style={styles.cardContainer}>
<Text style={{fontSize: 20, color: "#CC1A17"}}>Localização</Text>
<Divider style={{backgroundColor: '#000', marginBottom: 10}}/>
{this.renderMap()}
</View>
@ -234,7 +234,7 @@ const styles = StyleSheet.create({
},
centerRow: {
alignItems: 'flex-start',
alignItems: 'center',
backgroundColor: 'transparent',
flex: 3,
flexDirection: 'column',
@ -246,7 +246,7 @@ const styles = StyleSheet.create({
flex: 1,
flexDirection: 'row',
justifyContent: 'flex-start',
alignSelf: 'center'
alignSelf: 'center',
},
rightRow: {
alignItems: 'flex-end',
@ -292,7 +292,7 @@ const styles = StyleSheet.create({
timeText: {
alignItems: 'flex-end',
flex: 2,
marginBottom: 5,
lineHeight: 10,
marginRight: 4,
},
@ -303,14 +303,23 @@ const styles = StyleSheet.create({
},
scroll: {
backgroundColor: '#FFF',
backgroundColor: '#eee',
flex: 1,
//marginBottom: 55,
},
cardContainer: {
flex: 1,
padding: 10,
margin: 20,
backgroundColor: 'white',
borderRadius: 5,
},
headerContainer: {
flex: 1,
},
container: {
flex: 1,
flexDirection: 'column',
@ -322,10 +331,10 @@ const styles = StyleSheet.create({
height: Dimensions.get('window').width * (2 / 4),
width: Dimensions.get('window').width,
},
headerContainer: {
/*headerContainer: {
alignItems: 'center',
backgroundColor: '#FFF',
},
},*/
carreerPathContainer: {