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