2019-11-02 15:44:19 +01:00
|
|
|
// @flow
|
|
|
|
|
|
|
|
import * as React from 'react';
|
2020-01-30 17:42:11 +01:00
|
|
|
import WebViewScreen from "../../components/WebViewScreen";
|
|
|
|
import i18n from "i18n-js";
|
2019-11-02 15:44:19 +01:00
|
|
|
|
|
|
|
type Props = {
|
|
|
|
navigation: Object,
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2020-01-30 17:42:11 +01:00
|
|
|
const URL = 'https://etud-mel.insa-toulouse.fr/webmail/';
|
|
|
|
|
2020-02-23 17:21:34 +01:00
|
|
|
const CUSTOM_CSS_GENERAL = 'https://etud.insa-toulouse.fr/~amicale_app/custom_css/bluemind/customMobile.css';
|
2020-01-30 17:42:11 +01:00
|
|
|
|
2019-11-02 15:44:19 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class defining the app's planex screen.
|
|
|
|
* This screen uses a webview to render the planex page
|
|
|
|
*/
|
2020-01-31 16:00:22 +01:00
|
|
|
export default class BlueMindScreen extends React.Component<Props> {
|
2019-11-02 15:44:19 +01:00
|
|
|
|
2020-01-30 17:42:11 +01:00
|
|
|
customInjectedJS: string;
|
|
|
|
|
|
|
|
constructor() {
|
|
|
|
super();
|
2020-02-01 20:50:02 +01:00
|
|
|
// Breaks website on ios
|
|
|
|
this.customInjectedJS = '';
|
|
|
|
// '$("head").append(\'<meta name="viewport" content="width=device-width, initial-scale=1.0">\');' +
|
|
|
|
// '$("head").append(\'<link rel="stylesheet" href="' + CUSTOM_CSS_GENERAL + '" type="text/css"/>\');true;';
|
2020-01-30 17:42:11 +01:00
|
|
|
}
|
|
|
|
|
2019-11-02 15:44:19 +01:00
|
|
|
render() {
|
|
|
|
const nav = this.props.navigation;
|
|
|
|
return (
|
|
|
|
<WebViewScreen
|
|
|
|
navigation={nav}
|
2019-11-08 02:37:38 +01:00
|
|
|
data={[
|
|
|
|
{
|
|
|
|
url: URL,
|
|
|
|
icon: '',
|
|
|
|
name: '',
|
2020-01-31 16:00:22 +01:00
|
|
|
customJS: this.customInjectedJS
|
2019-11-08 02:37:38 +01:00
|
|
|
},
|
|
|
|
]}
|
2020-01-31 16:00:22 +01:00
|
|
|
headerTitle={i18n.t('screens.bluemind')}
|
2019-11-02 15:44:19 +01:00
|
|
|
hasHeaderBackButton={true}
|
|
|
|
hasSideMenu={false}/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|