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.

ProxiwashAboutScreen.js 7.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // @flow
  2. import * as React from 'react';
  3. import {Image, Linking, View} from 'react-native';
  4. import {Body, Card, CardItem, Container, Content, H2, H3, Left, Tab, TabHeading, Tabs, Text} from 'native-base';
  5. import CustomHeader from "../../components/CustomHeader";
  6. import i18n from "i18n-js";
  7. import CustomMaterialIcon from "../../components/CustomMaterialIcon";
  8. import ThemeManager from "../../utils/ThemeManager";
  9. type Props = {
  10. navigation: Object,
  11. };
  12. /**
  13. * Opens a link in the device's browser
  14. * @param link The link to open
  15. */
  16. function openWebLink(link) {
  17. Linking.openURL(link).catch((err) => console.error('Error opening link', err));
  18. }
  19. /**
  20. * Class defining an about screen. This screen shows the user information about the app and it's author.
  21. */
  22. export default class ProxiwashAboutScreen extends React.Component<Props> {
  23. render() {
  24. const nav = this.props.navigation;
  25. return (
  26. <Container>
  27. <CustomHeader
  28. navigation={nav} title={i18n.t('screens.proxiwash')}
  29. hasBackButton={true}
  30. hasTabs={true}/>
  31. <Tabs
  32. tabContainerStyle={{
  33. elevation: 0, // Fix for android shadow
  34. }}>
  35. <Tab
  36. heading={
  37. <TabHeading>
  38. <CustomMaterialIcon
  39. icon={'information'}
  40. color={ThemeManager.getCurrentThemeVariables().tabIconColor}
  41. fontSize={20}
  42. />
  43. <Text>{i18n.t('proxiwashScreen.informationTab')}</Text>
  44. </TabHeading>
  45. }
  46. key={1}
  47. style={{backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor}}>
  48. <Content padder>
  49. <View style={{
  50. width: '100%',
  51. height: 100,
  52. marginTop: 20,
  53. marginBottom: 20,
  54. justifyContent: 'center',
  55. alignItems: 'center'
  56. }}>
  57. <Image
  58. source={require('../../assets/proxiwash-logo.png')}
  59. style={{flex: 1, resizeMode: "contain"}}
  60. resizeMode="contain"/>
  61. </View>
  62. <Text>{i18n.t('proxiwashScreen.description')}</Text>
  63. <Card>
  64. <CardItem>
  65. <Left>
  66. <CustomMaterialIcon icon={'tumble-dryer'}/>
  67. <H2>{i18n.t('proxiwashScreen.dryer')}</H2>
  68. </Left>
  69. </CardItem>
  70. <CardItem>
  71. <Body>
  72. <H3>{i18n.t('proxiwashScreen.procedure')}</H3>
  73. <Text>{i18n.t('proxiwashScreen.dryerProcedure')}</Text>
  74. </Body>
  75. </CardItem>
  76. <CardItem>
  77. <Body>
  78. <H3>{i18n.t('proxiwashScreen.tips')}</H3>
  79. <Text>{i18n.t('proxiwashScreen.dryerTips')}</Text>
  80. </Body>
  81. </CardItem>
  82. </Card>
  83. <Card>
  84. <CardItem>
  85. <Left>
  86. <CustomMaterialIcon icon={'washing-machine'}/>
  87. <H2>{i18n.t('proxiwashScreen.washer')}</H2>
  88. </Left>
  89. </CardItem>
  90. <CardItem>
  91. <Body>
  92. <H3>{i18n.t('proxiwashScreen.procedure')}</H3>
  93. <Text>{i18n.t('proxiwashScreen.washerProcedure')}</Text>
  94. </Body>
  95. </CardItem>
  96. <CardItem>
  97. <Body>
  98. <H3>{i18n.t('proxiwashScreen.tips')}</H3>
  99. <Text>{i18n.t('proxiwashScreen.washerTips')}</Text>
  100. </Body>
  101. </CardItem>
  102. </Card>
  103. </Content>
  104. </Tab>
  105. <Tab
  106. heading={
  107. <TabHeading>
  108. <CustomMaterialIcon
  109. icon={'cash'}
  110. color={ThemeManager.getCurrentThemeVariables().tabIconColor}
  111. fontSize={20}
  112. />
  113. <Text>{i18n.t('proxiwashScreen.paymentTab')}</Text>
  114. </TabHeading>
  115. }
  116. key={2}
  117. style={{backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor}}>
  118. <Content padder>
  119. <Card>
  120. <CardItem>
  121. <Left>
  122. <CustomMaterialIcon icon={'coins'}/>
  123. <H2>{i18n.t('proxiwashScreen.tariffs')}</H2>
  124. </Left>
  125. </CardItem>
  126. <CardItem>
  127. <Body>
  128. <Text>{i18n.t('proxiwashScreen.washersTariff')}</Text>
  129. <Text>{i18n.t('proxiwashScreen.dryersTariff')}</Text>
  130. </Body>
  131. </CardItem>
  132. </Card>
  133. <Card>
  134. <CardItem>
  135. <Left>
  136. <CustomMaterialIcon icon={'cash'}/>
  137. <H2>{i18n.t('proxiwashScreen.paymentMethods')}</H2>
  138. </Left>
  139. </CardItem>
  140. <CardItem>
  141. <Body>
  142. <Text>{i18n.t('proxiwashScreen.paymentMethodsDescription')}</Text>
  143. </Body>
  144. </CardItem>
  145. </Card>
  146. </Content>
  147. </Tab>
  148. </Tabs>
  149. </Container>
  150. );
  151. }
  152. }