diff --git a/src/components/Custom/HeaderButton.js b/src/components/Custom/HeaderButton.js
index 4031c20..f6f9ef2 100644
--- a/src/components/Custom/HeaderButton.js
+++ b/src/components/Custom/HeaderButton.js
@@ -8,18 +8,17 @@ import * as Touchable from "react-native/Libraries/Components/Touchable/Touchabl
const MaterialHeaderButton = (props: Object) => (
);
const MaterialHeaderButtons = (props: Object) => {
return (
{
color={props.theme.colors.text}
/>
}
+ {...props}
/>
);
};
diff --git a/src/components/Screens/WebViewScreen.js b/src/components/Screens/WebViewScreen.js
index 2bc6b5f..e4c89a7 100644
--- a/src/components/Screens/WebViewScreen.js
+++ b/src/components/Screens/WebViewScreen.js
@@ -6,19 +6,14 @@ import BasicLoadingScreen from "../Custom/BasicLoadingScreen";
import ErrorView from "../Custom/ErrorView";
import {ERROR_TYPE} from "../../utils/WebData";
import MaterialHeaderButtons, {Item} from '../Custom/HeaderButton';
+import {HiddenItem} from "react-navigation-header-buttons";
+import {Linking} from "expo";
+import i18n from 'i18n-js';
type Props = {
navigation: Object,
- data: Array<{
- url: string,
- icon: string,
- name: string,
- customJS: string
- }>,
- headerTitle: string,
- hasHeaderBackButton: boolean,
- hasSideMenu: boolean,
- hasFooter: boolean,
+ url: string,
+ customJS: string,
}
/**
@@ -27,9 +22,7 @@ type Props = {
class WebViewScreen extends React.PureComponent {
static defaultProps = {
- hasBackButton: false,
- hasSideMenu: true,
- hasFooter: true,
+ customJS: '',
};
webviewRef: Object;
@@ -57,7 +50,22 @@ class WebViewScreen extends React.PureComponent {
getRefreshButton() {
return (
- -
+
-
+
+
+
);
};
@@ -66,6 +74,10 @@ class WebViewScreen extends React.PureComponent {
* Callback to use when refresh button is clicked. Reloads the webview.
*/
onRefreshClicked = () => this.webviewRef.current.reload();
+ onGoBackClicked = () => this.webviewRef.current.goBack();
+ onGoForwardClicked = () => this.webviewRef.current.goForward();
+
+ onOpenClicked = () => Linking.openURL(this.props.url);
/**
* Gets the loading indicator
@@ -78,13 +90,9 @@ class WebViewScreen extends React.PureComponent {
return (
{
return (
+ url={ROOM_URL}
+ customJS={this.customInjectedJS}
+ customInjectedJS={this.customInjectedJS}/>
);
}
}
diff --git a/src/screens/Websites/BibScreen.js b/src/screens/Websites/BibScreen.js
index 48d5864..30eb0e6 100644
--- a/src/screens/Websites/BibScreen.js
+++ b/src/screens/Websites/BibScreen.js
@@ -2,7 +2,6 @@
import * as React from 'react';
import WebViewScreen from "../../components/Screens/WebViewScreen";
-import i18n from "i18n-js";
type Props = {
navigation: Object,
@@ -50,19 +49,8 @@ export default class AvailableRoomScreen extends React.Component {
return (
+ url={BIB_URL}
+ customJS={this.customBibInjectedJS}/>
);
}
}
diff --git a/src/screens/Websites/PlanexScreen.js b/src/screens/Websites/PlanexScreen.js
index bf8bab1..4fd7658 100644
--- a/src/screens/Websites/PlanexScreen.js
+++ b/src/screens/Websites/PlanexScreen.js
@@ -165,18 +165,8 @@ export default class PlanexScreen extends React.Component {
+ url={PLANEX_URL}
+ customJS={this.customInjectedJS}/>
);
}
diff --git a/translations/en.json b/translations/en.json
index 46449c8..3e63a69 100644
--- a/translations/en.json
+++ b/translations/en.json
@@ -345,7 +345,10 @@
"general": {
"loading": "Loading...",
"retry": "Retry",
- "networkError": "Unable to contact servers. Make sure you are connected to Internet."
+ "networkError": "Unable to contact servers. Make sure you are connected to Internet.",
+ "goBack": "Go Back",
+ "goForward": "Go Forward",
+ "openInBrowser": "Open in Browser"
},
"date": {
"daysOfWeek": {
diff --git a/translations/fr.json b/translations/fr.json
index 71a0b19..70e7ed1 100644
--- a/translations/fr.json
+++ b/translations/fr.json
@@ -345,7 +345,10 @@
"general": {
"loading": "Chargement...",
"retry": "Réessayer",
- "networkError": "Impossible de contacter les serveurs. Assurez-vous d'être connecté à internet."
+ "networkError": "Impossible de contacter les serveurs. Assurez-vous d'être connecté à internet.",
+ "goBack": "Suivant",
+ "goForward": "Précédent",
+ "openInBrowser": "Ouvrir dans le navigateur"
},
"date": {
"daysOfWeek": {