Application Android et IOS pour l'amicale des élèves
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AboutScreen.js 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. import React from 'react';
  2. import {Platform, StyleSheet, Linking, Alert} from 'react-native';
  3. import {Container, Content, Text, Card, CardItem, Body, Icon, Left, Right, Thumbnail, H1} from 'native-base';
  4. import CustomHeader from "../components/CustomHeader";
  5. import i18n from "i18n-js";
  6. const version = 'a0.0.1';
  7. const links = {
  8. appstore: 'https://qwant.com',
  9. playstore: 'https://qwant.com',
  10. gitlab: 'https://qwant.com',
  11. bugs: 'https://qwant.com',
  12. changelog: 'https://qwant.com',
  13. license: 'https://qwant.com',
  14. mail: "mailto:arnaud.vergnet@netc.fr?subject=Application Amicale INSA Toulouse&body=",
  15. linkedin: 'https://www.linkedin.com/in/arnaud-vergnet-434ba5179/',
  16. facebook: 'https://www.facebook.com/arnaud.vergnet',
  17. react: 'https://facebook.github.io/react-native/',
  18. };
  19. export default class AboutScreen extends React.Component {
  20. openWebLink(link) {
  21. Linking.openURL(link).catch((err) => console.error('Error opening link', err));
  22. }
  23. render() {
  24. const nav = this.props.navigation;
  25. return (
  26. <Container>
  27. <CustomHeader navigation={nav} title={i18n.t('screens.about')}/>
  28. <Content>
  29. <Card>
  30. <CardItem>
  31. <Left>
  32. <Thumbnail square source={require('../assets/amicale.png')}/>
  33. <Body>
  34. <H1>Amicale INSA Toulouse</H1>
  35. <Text note>
  36. v.{version}
  37. </Text>
  38. </Body>
  39. </Left>
  40. </CardItem>
  41. <CardItem button
  42. onPress={() => this.openWebLink(Platform.OS === "ios" ? links.appstore : links.playstore)}>
  43. <Left>
  44. <Icon active name={Platform.OS === "ios" ? 'apple' : 'google-play'}
  45. type={'MaterialCommunityIcons'}
  46. style={{color: "#777", fontSize: 26, width: 30}}
  47. />
  48. <Text>{Platform.OS === "ios" ? i18n.t('aboutScreen.appstore') : i18n.t('aboutScreen.playstore')}</Text>
  49. </Left>
  50. <Right>
  51. <Icon name="chevron-right"
  52. type={'MaterialCommunityIcons'}/>
  53. </Right>
  54. </CardItem>
  55. <CardItem button
  56. onPress={() => this.openWebLink(links.gitlab)}>
  57. <Left>
  58. <Icon active name="git"
  59. type={'MaterialCommunityIcons'}
  60. style={{color: "#777", fontSize: 26, width: 30}}
  61. />
  62. <Text>Gitlab</Text>
  63. </Left>
  64. <Right>
  65. <Icon name="chevron-right"
  66. type={'MaterialCommunityIcons'}/>
  67. </Right>
  68. </CardItem>
  69. <CardItem button
  70. onPress={() => this.openWebLink(links.bugs)}>
  71. <Left>
  72. <Icon active name="bug"
  73. type={'MaterialCommunityIcons'}
  74. style={{color: "#777", fontSize: 26, width: 30}}
  75. />
  76. <Text>{i18n.t('aboutScreen.bugs')}</Text>
  77. </Left>
  78. <Right>
  79. <Icon name="chevron-right"
  80. type={'MaterialCommunityIcons'}/>
  81. </Right>
  82. </CardItem>
  83. <CardItem button
  84. onPress={() => this.openWebLink(links.changelog)}>
  85. <Left>
  86. <Icon active name="refresh"
  87. type={'MaterialCommunityIcons'}
  88. style={{color: "#777", fontSize: 26, width: 30}}
  89. />
  90. <Text>
  91. {i18n.t('aboutScreen.changelog')}
  92. </Text>
  93. </Left>
  94. <Right>
  95. <Icon name="chevron-right"
  96. type={'MaterialCommunityIcons'}/>
  97. </Right>
  98. </CardItem>
  99. <CardItem button
  100. onPress={() => this.openWebLink(links.license)}>
  101. <Left>
  102. <Icon active name="file-document"
  103. type={'MaterialCommunityIcons'}
  104. style={{color: "#777", fontSize: 26, width: 30}}
  105. />
  106. <Text>
  107. {i18n.t('aboutScreen.license')}
  108. </Text>
  109. </Left>
  110. <Right>
  111. <Icon name="chevron-right"
  112. type={'MaterialCommunityIcons'}/>
  113. </Right>
  114. </CardItem>
  115. </Card>
  116. <Card>
  117. <CardItem header>
  118. <Text>{i18n.t('aboutScreen.author')}</Text>
  119. </CardItem>
  120. <CardItem button
  121. onPress={() => Alert.alert('Coucou', 'Whaou')}>
  122. <Left>
  123. <Icon active name="account-circle"
  124. type={'MaterialCommunityIcons'}
  125. style={{color: "#777", fontSize: 26, width: 30}}
  126. />
  127. <Text>Arnaud VERGNET</Text>
  128. </Left>
  129. </CardItem>
  130. <CardItem button
  131. onPress={() => this.openWebLink(links.mail)}>
  132. <Left>
  133. <Icon active name="email"
  134. type={'MaterialCommunityIcons'}
  135. style={{color: "#777", fontSize: 26, width: 30}}
  136. />
  137. <Text>
  138. {i18n.t('aboutScreen.mail')}
  139. </Text>
  140. </Left>
  141. <Right>
  142. <Icon name="chevron-right"
  143. type={'MaterialCommunityIcons'}/>
  144. </Right>
  145. </CardItem>
  146. <CardItem button
  147. onPress={() => this.openWebLink(links.linkedin)}>
  148. <Left>
  149. <Icon active name="linkedin"
  150. type={'MaterialCommunityIcons'}
  151. style={{color: "#777", fontSize: 26, width: 30}}
  152. />
  153. <Text>
  154. Linkedin
  155. </Text>
  156. </Left>
  157. <Right>
  158. <Icon name="chevron-right"
  159. type={'MaterialCommunityIcons'}/>
  160. </Right>
  161. </CardItem>
  162. <CardItem button
  163. onPress={() => this.openWebLink(links.facebook)}>
  164. <Left>
  165. <Icon active name="facebook"
  166. type={'MaterialCommunityIcons'}
  167. style={{color: "#777", fontSize: 26, width: 30}}
  168. />
  169. <Text>
  170. Facebook
  171. </Text>
  172. </Left>
  173. <Right>
  174. <Icon name="chevron-right"
  175. type={'MaterialCommunityIcons'}/>
  176. </Right>
  177. </CardItem>
  178. </Card>
  179. <Card>
  180. <CardItem header>
  181. <Text>{i18n.t('aboutScreen.technologies')}</Text>
  182. </CardItem>
  183. <CardItem button
  184. onPress={() => this.openWebLink(links.react)}>
  185. <Left>
  186. <Icon active name="react"
  187. type={'MaterialCommunityIcons'}
  188. style={{color: "#777", fontSize: 26, width: 30}}
  189. />
  190. <Text>
  191. {i18n.t('aboutScreen.reactNative')}
  192. </Text>
  193. </Left>
  194. <Right>
  195. <Icon name="chevron-right"
  196. type={'MaterialCommunityIcons'}/>
  197. </Right>
  198. </CardItem>
  199. <CardItem button
  200. onPress={() => console.log('libs')}>
  201. <Left>
  202. <Icon active name="developer-board"
  203. type={'MaterialCommunityIcons'}
  204. style={{color: "#777", fontSize: 26, width: 30}}
  205. />
  206. <Text>
  207. {i18n.t('aboutScreen.libs')}
  208. </Text>
  209. </Left>
  210. <Right>
  211. <Icon name="chevron-right"
  212. type={'MaterialCommunityIcons'}/>
  213. </Right>
  214. </CardItem>
  215. </Card>
  216. </Content>
  217. </Container>
  218. );
  219. }
  220. }
  221. const styles = StyleSheet.create({
  222. container: {
  223. flex: 1,
  224. backgroundColor: '#fff',
  225. alignItems: 'center',
  226. justifyContent: 'center',
  227. },
  228. });