Added planning screen placeholder
This commit is contained in:
parent
062ac9ac5d
commit
fb086aac58
4 changed files with 62 additions and 2 deletions
|
@ -1,14 +1,26 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Container, Text} from 'native-base';
|
import {Button, Container, H3, Text} from 'native-base';
|
||||||
import CustomHeader from "../components/CustomHeader";
|
import CustomHeader from "../components/CustomHeader";
|
||||||
import i18n from "i18n-js";
|
import i18n from "i18n-js";
|
||||||
|
import {Platform, View} from "react-native";
|
||||||
|
import CustomMaterialIcon from "../components/CustomMaterialIcon";
|
||||||
|
import ThemeManager from "../utils/ThemeManager";
|
||||||
|
import {Linking} from "expo";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
navigation: Object,
|
navigation: Object,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Opens a link in the device's browser
|
||||||
|
* @param link The link to open
|
||||||
|
*/
|
||||||
|
function openWebLink(link) {
|
||||||
|
Linking.openURL(link).catch((err) => console.error('Error opening link', err));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class defining the app's planning screen
|
* Class defining the app's planning screen
|
||||||
*/
|
*/
|
||||||
|
@ -18,6 +30,46 @@ export default class PlanningScreen extends React.Component<Props> {
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container>
|
||||||
<CustomHeader navigation={nav} title={i18n.t('screens.planning')}/>
|
<CustomHeader navigation={nav} title={i18n.t('screens.planning')}/>
|
||||||
|
<View style={{
|
||||||
|
flexGrow: 1,
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
}}>
|
||||||
|
<View style={{
|
||||||
|
justifyContent: 'center',
|
||||||
|
alignItems: 'center',
|
||||||
|
width: '100%',
|
||||||
|
height: 100,
|
||||||
|
marginBottom: 20
|
||||||
|
}}>
|
||||||
|
<CustomMaterialIcon
|
||||||
|
icon={'forklift'}
|
||||||
|
fontSize={100}
|
||||||
|
width={100}
|
||||||
|
color={ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText}/>
|
||||||
|
</View>
|
||||||
|
|
||||||
|
<H3 style={{
|
||||||
|
textAlign: 'center',
|
||||||
|
marginRight: 20,
|
||||||
|
marginLeft: 20,
|
||||||
|
color: ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText
|
||||||
|
}}>
|
||||||
|
{i18n.t('planningScreen.wipTitle')}
|
||||||
|
</H3>
|
||||||
|
<Text style={{
|
||||||
|
textAlign: 'center',
|
||||||
|
color: ThemeManager.getCurrentThemeVariables().fetchedDataSectionListErrorText
|
||||||
|
}}>
|
||||||
|
{i18n.t('planningScreen.wipSubtitle')}
|
||||||
|
</Text>
|
||||||
|
{Platform.OS === 'android' ?
|
||||||
|
<Button block style={{marginTop: 20, marginRight: 10, marginLeft: 10}}
|
||||||
|
onPress={() => openWebLink('https://expo.io/@amicaleinsat/application-amicale')}>
|
||||||
|
<Text>Try the beta</Text>
|
||||||
|
</Button>
|
||||||
|
: <View/>}
|
||||||
|
</View>
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,7 +42,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList {
|
||||||
* Creates machine state parameters using current theme and translations
|
* Creates machine state parameters using current theme and translations
|
||||||
*/
|
*/
|
||||||
constructor() {
|
constructor() {
|
||||||
super(DATA_URL, 1000 * 10); // Refresh every minute
|
super(DATA_URL, 1000 * 30); // Refresh every half minute
|
||||||
let colors = ThemeManager.getCurrentThemeVariables();
|
let colors = ThemeManager.getCurrentThemeVariables();
|
||||||
stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor;
|
stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor;
|
||||||
stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor;
|
stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor;
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
"listUpdated": "List updated!",
|
"listUpdated": "List updated!",
|
||||||
"listUpdateFail": "Error while updating list"
|
"listUpdateFail": "Error while updating list"
|
||||||
},
|
},
|
||||||
|
"planningScreen": {
|
||||||
|
"wipTitle": "WORK IN PROGRESS",
|
||||||
|
"wipSubtitle": "Soon, every event at the INSA Toulouse in one place !"
|
||||||
|
},
|
||||||
"aboutScreen": {
|
"aboutScreen": {
|
||||||
"appstore": "See on the Appstore",
|
"appstore": "See on the Appstore",
|
||||||
"playstore": "See on the Playstore",
|
"playstore": "See on the Playstore",
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
"listUpdated": "List mise à jour!",
|
"listUpdated": "List mise à jour!",
|
||||||
"listUpdateFail": "Erreur lors de la mise à jour de la liste"
|
"listUpdateFail": "Erreur lors de la mise à jour de la liste"
|
||||||
},
|
},
|
||||||
|
"planningScreen": {
|
||||||
|
"wipTitle": "WORK IN PROGRESS",
|
||||||
|
"wipSubtitle": "Bientôt, tous les évènements de l'INSA Toulouse en un seul endroit !"
|
||||||
|
},
|
||||||
"aboutScreen": {
|
"aboutScreen": {
|
||||||
"appstore": "Voir sur l'Appstore",
|
"appstore": "Voir sur l'Appstore",
|
||||||
"playstore": "Voir sur le Playstore",
|
"playstore": "Voir sur le Playstore",
|
||||||
|
|
Loading…
Reference in a new issue