diff --git a/app.json b/app.json index 1ed1a35..e997450 100644 --- a/app.json +++ b/app.json @@ -10,7 +10,7 @@ "android", "web" ], - "version": "0.0.5", + "version": "0.0.6", "orientation": "portrait", "primaryColor": "#e42612", "icon": "./assets/icon.png", @@ -32,7 +32,7 @@ ], "ios": { "bundleIdentifier": "amicale.insat.application", - "buildNumber": "0.0.5", + "buildNumber": "0.0.6", "icon": "./assets/ios.icon.png" }, "android": { diff --git a/components/SideMenu.js b/components/SideMenu.js index baff6ea..e48bc6e 100644 --- a/components/SideMenu.js +++ b/components/SideMenu.js @@ -12,7 +12,6 @@ const drawerCover = require("../assets/drawer-cover.png"); const WIKETUD_LINK = "https://www.etud.insa-toulouse.fr/wiketud"; const Amicale_LINK = "https://www.etud.insa-toulouse.fr/~amicale"; -const TIMETABLE_LINK = "http://planex.insa-toulouse.fr"; type Props = { navigation: Object, @@ -63,18 +62,17 @@ export default class SideBar extends React.Component { route: "Proximo", icon: "shopping", }, + { + name: 'Planex', + route: "Planex", + icon: "timetable", + }, { name: "Amicale", route: "amicale", icon: "web", link: Amicale_LINK }, - { - name: i18n.t('screens.timetable'), - route: "timetable", - icon: "timetable", - link: TIMETABLE_LINK - }, { name: "Wiketud", route: "wiketud", @@ -120,7 +118,7 @@ export default class SideBar extends React.Component { renderItem={({item}) => { if (item.link !== undefined) diff --git a/navigation/MainDrawerNavigator.js b/navigation/MainDrawerNavigator.js index dd3c9d5..a543b44 100644 --- a/navigation/MainDrawerNavigator.js +++ b/navigation/MainDrawerNavigator.js @@ -7,6 +7,7 @@ import HomeScreen from '../screens/HomeScreen'; import PlanningScreen from '../screens/PlanningScreen'; import ProxiwashScreen from '../screens/ProxiwashScreen'; import ProximoMainScreen from '../screens/Proximo/ProximoMainScreen'; +import PlanexScreen from '../screens/PlanexScreen'; import SettingsScreen from '../screens/SettingsScreen'; import AboutScreen from '../screens/About/AboutScreen'; import SideMenu from "../components/SideMenu"; @@ -19,6 +20,7 @@ export default createDrawerNavigator({ Planning: {screen: PlanningScreen,}, Proxiwash: {screen: ProxiwashScreen,}, Proximo: {screen: ProximoMainScreen,}, + Planex: {screen: PlanexScreen}, Settings: {screen: SettingsScreen,}, About: {screen: AboutScreen,}, }, { diff --git a/package-lock.json b/package-lock.json index ec2b19f..b80ca85 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2595,6 +2595,15 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/expo-linear-gradient/-/expo-linear-gradient-5.0.1.tgz", "integrity": "sha512-5dKn9JIXmXXHq6itC/Jpqo65Tkgjwacyw1kpD8sekoFTEVfT6ciFd2djqIcciUqIa57FF/5d2q54mUvjoqD/TA==" + }, + "react-native-webview": { + "version": "5.8.1", + "resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-5.8.1.tgz", + "integrity": "sha512-b6pSvmjoiWtcz6YspggW02X+BRXJWuquHwkh37BRx1NMW1iwMZA31SnFQvTpPzWYYIb9WF/mRsy2nGtt9C6NIg==", + "requires": { + "escape-string-regexp": "1.0.5", + "invariant": "2.2.4" + } } } }, @@ -5998,9 +6007,9 @@ "integrity": "sha512-yO9vWi/11m2hEJl8FrW1SMeVzFfPtMKh20MUInGqlsL0H8Ya2JGGlFfrBzx1KiFR2hFb5OdsTLYNtcVZtJ6pLQ==" }, "react-native-webview": { - "version": "5.8.1", - "resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-5.8.1.tgz", - "integrity": "sha512-b6pSvmjoiWtcz6YspggW02X+BRXJWuquHwkh37BRx1NMW1iwMZA31SnFQvTpPzWYYIb9WF/mRsy2nGtt9C6NIg==", + "version": "5.12.1", + "resolved": "https://registry.npmjs.org/react-native-webview/-/react-native-webview-5.12.1.tgz", + "integrity": "sha512-pFYzyNUG+k7Jk2a0Z3S1+OL9qtp0VQxVP08d1ume/O6l1Xibi0K0hRZms7zPUHqQc2uWEfjZ0FOa17MIN7vruw==", "requires": { "escape-string-regexp": "1.0.5", "invariant": "2.2.4" diff --git a/package.json b/package.json index f5a25eb..a929ac4 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "react-native-autolink": "^1.8.1", "react-native-platform-touchable": "^1.1.1", "react-native-status-bar-height": "^2.3.1", + "react-native-webview": "^5.8.1", "react-navigation": "^3.11.0" }, "devDependencies": { diff --git a/screens/PlanexScreen.js b/screens/PlanexScreen.js new file mode 100644 index 0000000..5fadda9 --- /dev/null +++ b/screens/PlanexScreen.js @@ -0,0 +1,50 @@ +// @flow + +import * as React from 'react'; +import {View} from 'react-native'; +import {Container, Content, Spinner} from 'native-base'; +import CustomHeader from "../components/CustomHeader"; +import WebView from "react-native-webview"; + +type Props = { + navigation: Object, +} + +type State = { + isFinishedLoading: boolean +} + +const PLANEX_URL = 'http://planex.insa-toulouse.fr/'; + +/** + * Class defining the app's planex screen. + * This screen uses a webview to render the planex page + */ +export default class PlanningScreen extends React.Component { + + state = { + isFinishedLoading: false, + }; + + render() { + const nav = this.props.navigation; + return ( + + + { + this.setState({isFinishedLoading: true}) + }} + /> + {this.state.isFinishedLoading ? + : + + + } + + ); + } +} + diff --git a/translations/en.json b/translations/en.json index cbd3904..30aa158 100644 --- a/translations/en.json +++ b/translations/en.json @@ -4,7 +4,6 @@ "planning": "Planning", "proxiwash": "Proxiwash", "proximo": "Proximo", - "timetable": "Timetable", "settings": "Settings", "about": "About" }, diff --git a/translations/fr.json b/translations/fr.json index 285bfd5..891b5b1 100644 --- a/translations/fr.json +++ b/translations/fr.json @@ -4,7 +4,6 @@ "planning": "Planning", "proxiwash": "Proxiwash", "proximo": "Proximo", - "timetable": "Emploi du temps", "settings": "Paramètres", "about": "À Propos" },