From fb086aac58836f7ac441fa39c8ad4ddf566aeb60 Mon Sep 17 00:00:00 2001 From: keplyx Date: Mon, 5 Aug 2019 16:08:39 +0200 Subject: [PATCH] Added planning screen placeholder --- screens/PlanningScreen.js | 54 +++++++++++++++++++++++++++++++++++++- screens/ProxiwashScreen.js | 2 +- translations/en.json | 4 +++ translations/fr.json | 4 +++ 4 files changed, 62 insertions(+), 2 deletions(-) diff --git a/screens/PlanningScreen.js b/screens/PlanningScreen.js index 2c53a04..996d3c4 100644 --- a/screens/PlanningScreen.js +++ b/screens/PlanningScreen.js @@ -1,14 +1,26 @@ // @flow 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 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 = { 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 */ @@ -18,6 +30,46 @@ export default class PlanningScreen extends React.Component { return ( + + + + + +

+ {i18n.t('planningScreen.wipTitle')} +

+ + {i18n.t('planningScreen.wipSubtitle')} + + {Platform.OS === 'android' ? + + : } +
); } diff --git a/screens/ProxiwashScreen.js b/screens/ProxiwashScreen.js index d899980..d8d5414 100644 --- a/screens/ProxiwashScreen.js +++ b/screens/ProxiwashScreen.js @@ -42,7 +42,7 @@ export default class ProxiwashScreen extends FetchedDataSectionList { * Creates machine state parameters using current theme and translations */ constructor() { - super(DATA_URL, 1000 * 10); // Refresh every minute + super(DATA_URL, 1000 * 30); // Refresh every half minute let colors = ThemeManager.getCurrentThemeVariables(); stateColors[MACHINE_STATES.TERMINE] = colors.proxiwashFinishedColor; stateColors[MACHINE_STATES.DISPONIBLE] = colors.proxiwashReadyColor; diff --git a/translations/en.json b/translations/en.json index 6c2e67e..30aa158 100644 --- a/translations/en.json +++ b/translations/en.json @@ -28,6 +28,10 @@ "listUpdated": "List updated!", "listUpdateFail": "Error while updating list" }, + "planningScreen": { + "wipTitle": "WORK IN PROGRESS", + "wipSubtitle": "Soon, every event at the INSA Toulouse in one place !" + }, "aboutScreen": { "appstore": "See on the Appstore", "playstore": "See on the Playstore", diff --git a/translations/fr.json b/translations/fr.json index 974171f..891b5b1 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -28,6 +28,10 @@ "listUpdated": "List mise à jour!", "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": { "appstore": "Voir sur l'Appstore", "playstore": "Voir sur le Playstore",