diff --git a/navigation/AppNavigator.js b/navigation/AppNavigator.js index 453021a..b649a0f 100644 --- a/navigation/AppNavigator.js +++ b/navigation/AppNavigator.js @@ -7,6 +7,7 @@ import AboutScreen from '../screens/About/AboutScreen'; import ProximoListScreen from '../screens/Proximo/ProximoListScreen'; import AboutDependenciesScreen from '../screens/About/AboutDependenciesScreen'; import ProxiwashAboutScreen from '../screens/ProxiwashAboutScreen'; +import ProximoAboutScreen from '../screens/Proximo/ProximoAboutScreen'; import SelfMenuScreen from '../screens/SelfMenuScreen'; import {fromRight} from "react-navigation-transitions"; @@ -23,6 +24,7 @@ export default createAppContainer( AboutDependenciesScreen: {screen: AboutDependenciesScreen}, SelfMenuScreen: {screen: SelfMenuScreen}, ProxiwashAboutScreen: {screen: ProxiwashAboutScreen}, + ProximoAboutScreen: {screen: ProximoAboutScreen}, }, { initialRouteName: "Main", diff --git a/screens/Proximo/ProximoAboutScreen.js b/screens/Proximo/ProximoAboutScreen.js new file mode 100644 index 0000000..4b759e3 --- /dev/null +++ b/screens/Proximo/ProximoAboutScreen.js @@ -0,0 +1,78 @@ +// @flow + +import * as React from 'react'; +import {Image, Linking, View} from 'react-native'; +import {Body, Card, CardItem, Container, Content, H2, Left, Text} from 'native-base'; +import CustomHeader from "../../components/CustomHeader"; +import i18n from "i18n-js"; +import CustomMaterialIcon from "../../components/CustomMaterialIcon"; + +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 an about screen. This screen shows the user information about the app and it's author. + */ +export default class ProximoAboutScreen extends React.Component { + + render() { + const nav = this.props.navigation; + return ( + + + + + + + + Le Proximo c’est ta petite épicerie étudiante tenu par les étudiants directement sur le + campus. Ouvert tous les jours de 18h30 à 19h30, nous t’accueillons et te souvent quand tu n’as + plus de pâtes ou de diluant ! Différents produits pour différentes galère, le tout à prix + coûtant. Tu peux payer par Lydia ou par espèce. + + + + + +

Horaires

+
+
+ + 18h30 - 19h30 + +
+ + + + +

Paiement

+
+
+ + Espèce ou Lydia + +
+
+
+ ); + } +} diff --git a/screens/Proximo/ProximoMainScreen.js b/screens/Proximo/ProximoMainScreen.js index 2ed1688..178a87a 100644 --- a/screens/Proximo/ProximoMainScreen.js +++ b/screens/Proximo/ProximoMainScreen.js @@ -1,11 +1,13 @@ // @flow import * as React from 'react'; -import {View} from 'react-native' +import {Platform, View} from 'react-native' import {Badge, Body, H2, Left, ListItem, Right, Text} from 'native-base'; import i18n from "i18n-js"; import CustomMaterialIcon from "../../components/CustomMaterialIcon"; import FetchedDataSectionList from "../../components/FetchedDataSectionList"; +import ThemeManager from "../../utils/ThemeManager"; +import Touchable from "react-native-platform-touchable"; const DATA_URL = "https://srv-falcon.etud.insa-toulouse.fr/~proximo/data/stock.json"; @@ -78,6 +80,18 @@ export default class ProximoMainScreen extends FetchedDataSectionList { return finalData; } + getRightButton() { + return ( + this.props.navigation.navigate('ProximoAboutScreen')}> + + + ); + } + getRenderItem(item: Object, section: Object, data: Object) { if (item.data.length > 0) { return ( diff --git a/screens/ProxiwashAboutScreen.js b/screens/ProxiwashAboutScreen.js index efb36c5..9acc22f 100644 --- a/screens/ProxiwashAboutScreen.js +++ b/screens/ProxiwashAboutScreen.js @@ -2,7 +2,7 @@ import * as React from 'react'; import {Image, Linking, View} from 'react-native'; -import {Body, Card, CardItem, Container, Content, H1, Left, Tab, TabHeading, Tabs, Text} from 'native-base'; +import {Card, CardItem, Container, Content, H2, Left, Tab, TabHeading, Tabs, Text} from 'native-base'; import CustomHeader from "../components/CustomHeader"; import i18n from "i18n-js"; import CustomMaterialIcon from "../components/CustomMaterialIcon"; @@ -62,9 +62,8 @@ export default class ProxiwashAboutScreen extends React.Component { - -

Seche linge

- + +

Seche linge

@@ -74,9 +73,8 @@ export default class ProxiwashAboutScreen extends React.Component { - -

Machine a laver

- + +

Machine a laver

@@ -102,9 +100,8 @@ export default class ProxiwashAboutScreen extends React.Component { - -

Tarifs

- + +

Tarifs

@@ -114,9 +111,8 @@ export default class ProxiwashAboutScreen extends React.Component { - -

Moyens de Paiement

- + +

Moyens de Paiement