Application Android et IOS pour l'amicale des élèves https://play.google.com/store/apps/details?id=fr.amicaleinsat.application
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.

PlanningScreen.js 2.7KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. // @flow
  2. import * as React from 'react';
  3. import {Button, Container, H3, Text} from 'native-base';
  4. import CustomHeader from "../components/CustomHeader";
  5. import i18n from "i18n-js";
  6. import {Platform, View} from "react-native";
  7. import CustomMaterialIcon from "../components/CustomMaterialIcon";
  8. import ThemeManager from "../utils/ThemeManager";
  9. import {Linking} from "expo";
  10. type Props = {
  11. navigation: Object,
  12. }
  13. /**
  14. * Opens a link in the device's browser
  15. * @param link The link to open
  16. */
  17. function openWebLink(link) {
  18. Linking.openURL(link).catch((err) => console.error('Error opening link', err));
  19. }
  20. /**
  21. * Class defining the app's planning screen
  22. */
  23. export default class PlanningScreen extends React.Component<Props> {
  24. render() {
  25. const nav = this.props.navigation;
  26. return (
  27. <Container>
  28. <CustomHeader navigation={nav} title={i18n.t('screens.planning')}/>
  29. <View style={{
  30. flexGrow: 1,
  31. justifyContent: 'center',
  32. alignItems: 'center',
  33. }}>
  34. <View style={{
  35. justifyContent: 'center',
  36. alignItems: 'center',
  37. width: '100%',
  38. height: 100,
  39. marginBottom: 20
  40. }}>
  41. <CustomMaterialIcon
  42. icon={'forklift'}
  43. fontSize={100}
  44. width={100}
  45. color={ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText}/>
  46. </View>
  47. <H3 style={{
  48. textAlign: 'center',
  49. marginRight: 20,
  50. marginLeft: 20,
  51. color: ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText
  52. }}>
  53. {i18n.t('planningScreen.wipTitle')}
  54. </H3>
  55. <Text style={{
  56. textAlign: 'center',
  57. color: ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText
  58. }}>
  59. {i18n.t('planningScreen.wipSubtitle')}
  60. </Text>
  61. {Platform.OS === 'android' ?
  62. <Button block style={{marginTop: 20, marginRight: 10, marginLeft: 10}}
  63. onPress={() => openWebLink('https://expo.io/@amicaleinsat/application-amicale')}>
  64. <Text>Try the beta</Text>
  65. </Button>
  66. : <View/>}
  67. </View>
  68. </Container>
  69. );
  70. }
  71. }