2019-06-25 22:20:24 +02:00
|
|
|
import React from 'react';
|
|
|
|
import {Platform, StyleSheet, Linking, Alert} from 'react-native';
|
|
|
|
import {Container, Content, Text, Card, CardItem, Body, Icon, Left, Right, Thumbnail, H1} from 'native-base';
|
2019-06-27 11:08:56 +02:00
|
|
|
import CustomHeader from "../../components/CustomHeader";
|
2019-06-25 22:20:24 +02:00
|
|
|
import i18n from "i18n-js";
|
2019-06-27 11:08:56 +02:00
|
|
|
import appJson from '../../app';
|
|
|
|
import packageJson from '../../package';
|
2019-06-25 22:20:24 +02:00
|
|
|
|
|
|
|
const links = {
|
|
|
|
appstore: 'https://qwant.com',
|
|
|
|
playstore: 'https://qwant.com',
|
|
|
|
gitlab: 'https://qwant.com',
|
|
|
|
bugs: 'https://qwant.com',
|
|
|
|
changelog: 'https://qwant.com',
|
|
|
|
license: 'https://qwant.com',
|
|
|
|
mail: "mailto:arnaud.vergnet@netc.fr?subject=Application Amicale INSA Toulouse&body=",
|
|
|
|
linkedin: 'https://www.linkedin.com/in/arnaud-vergnet-434ba5179/',
|
|
|
|
facebook: 'https://www.facebook.com/arnaud.vergnet',
|
|
|
|
react: 'https://facebook.github.io/react-native/',
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export default class AboutScreen extends React.Component {
|
|
|
|
|
|
|
|
openWebLink(link) {
|
|
|
|
Linking.openURL(link).catch((err) => console.error('Error opening link', err));
|
|
|
|
}
|
|
|
|
|
|
|
|
render() {
|
|
|
|
const nav = this.props.navigation;
|
|
|
|
return (
|
|
|
|
<Container>
|
|
|
|
<CustomHeader navigation={nav} title={i18n.t('screens.about')}/>
|
|
|
|
<Content>
|
|
|
|
<Card>
|
|
|
|
<CardItem>
|
|
|
|
<Left>
|
2019-06-27 11:08:56 +02:00
|
|
|
<Thumbnail square source={require('../../assets/amicale.png')}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
<Body>
|
|
|
|
<H1>Amicale INSA Toulouse</H1>
|
|
|
|
<Text note>
|
2019-06-27 11:08:56 +02:00
|
|
|
v.{appJson.expo.version}
|
2019-06-25 22:20:24 +02:00
|
|
|
</Text>
|
|
|
|
</Body>
|
|
|
|
</Left>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(Platform.OS === "ios" ? links.appstore : links.playstore)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name={Platform.OS === "ios" ? 'apple' : 'google-play'}
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>{Platform.OS === "ios" ? i18n.t('aboutScreen.appstore') : i18n.t('aboutScreen.playstore')}</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.gitlab)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="git"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>Gitlab</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.bugs)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="bug"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>{i18n.t('aboutScreen.bugs')}</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.changelog)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="refresh"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
{i18n.t('aboutScreen.changelog')}
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.license)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="file-document"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
{i18n.t('aboutScreen.license')}
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
<Card>
|
|
|
|
<CardItem header>
|
|
|
|
<Text>{i18n.t('aboutScreen.author')}</Text>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => Alert.alert('Coucou', 'Whaou')}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="account-circle"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>Arnaud VERGNET</Text>
|
|
|
|
</Left>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.mail)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="email"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
{i18n.t('aboutScreen.mail')}
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.linkedin)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="linkedin"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
Linkedin
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.facebook)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="facebook"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
Facebook
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
</Card>
|
|
|
|
|
|
|
|
<Card>
|
|
|
|
<CardItem header>
|
|
|
|
<Text>{i18n.t('aboutScreen.technologies')}</Text>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
|
|
|
onPress={() => this.openWebLink(links.react)}>
|
|
|
|
<Left>
|
|
|
|
<Icon active name="react"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
{i18n.t('aboutScreen.reactNative')}
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
<CardItem button
|
2019-06-27 11:08:56 +02:00
|
|
|
onPress={() => this.props.navigation.navigate('AboutDependenciesScreen', {data: packageJson.dependencies})}>
|
2019-06-25 22:20:24 +02:00
|
|
|
<Left>
|
|
|
|
<Icon active name="developer-board"
|
|
|
|
type={'MaterialCommunityIcons'}
|
|
|
|
style={{color: "#777", fontSize: 26, width: 30}}
|
|
|
|
/>
|
|
|
|
<Text>
|
|
|
|
{i18n.t('aboutScreen.libs')}
|
|
|
|
</Text>
|
|
|
|
</Left>
|
|
|
|
<Right>
|
2019-06-27 10:17:51 +02:00
|
|
|
<Icon name="chevron-right"
|
|
|
|
type={'MaterialCommunityIcons'}/>
|
2019-06-25 22:20:24 +02:00
|
|
|
</Right>
|
|
|
|
</CardItem>
|
|
|
|
</Card>
|
|
|
|
</Content>
|
|
|
|
</Container>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
container: {
|
|
|
|
flex: 1,
|
|
|
|
backgroundColor: '#fff',
|
|
|
|
alignItems: 'center',
|
|
|
|
justifyContent: 'center',
|
|
|
|
},
|
|
|
|
});
|