|
@@ -16,6 +16,8 @@ type Props = {
|
16
|
16
|
|
17
|
17
|
const PLANEX_URL = 'http://planex.insa-toulouse.fr/';
|
18
|
18
|
|
|
19
|
+const CUSTOM_CSS_LINK = 'https://srv-falcon.etud.insa-toulouse.fr/~vergnet/appli-amicale/planex/generalCustom.css';
|
|
20
|
+
|
19
|
21
|
/**
|
20
|
22
|
* Class defining the app's planex screen.
|
21
|
23
|
* This screen uses a webview to render the planex page
|
|
@@ -23,6 +25,17 @@ const PLANEX_URL = 'http://planex.insa-toulouse.fr/';
|
23
|
25
|
export default class PlanningScreen extends React.Component<Props> {
|
24
|
26
|
|
25
|
27
|
webview: WebView;
|
|
28
|
+ customInjectedJS: string;
|
|
29
|
+
|
|
30
|
+ constructor() {
|
|
31
|
+ super();
|
|
32
|
+ this.customInjectedJS =
|
|
33
|
+ 'document.querySelector(\'head\').innerHTML += \'<meta name="viewport" content="width=device-width, initial-scale=1.0">\';' +
|
|
34
|
+ 'document.querySelector(\'head\').innerHTML += \'<link rel="stylesheet" href="https://srv-falcon.etud.insa-toulouse.fr/~vergnet/appli-amicale/planex/customMobile.css" type="text/css"/>\';';
|
|
35
|
+ if (ThemeManager.getNightMode())
|
|
36
|
+ this.customInjectedJS += 'document.querySelector(\'head\').innerHTML += \'<link rel="stylesheet" href="https://srv-falcon.etud.insa-toulouse.fr/~vergnet/appli-amicale/planex/customDark.css" type="text/css"/>\';';
|
|
37
|
+ }
|
|
38
|
+
|
26
|
39
|
|
27
|
40
|
getRefreshButton() {
|
28
|
41
|
return (
|
|
@@ -52,6 +65,8 @@ export default class PlanningScreen extends React.Component<Props> {
|
52
|
65
|
height: '100%',
|
53
|
66
|
}}
|
54
|
67
|
startInLoadingState={true}
|
|
68
|
+ injectedJavaScript={this.customInjectedJS}
|
|
69
|
+ javaScriptEnabled={true}
|
55
|
70
|
renderLoading={() =>
|
56
|
71
|
<View style={{
|
57
|
72
|
backgroundColor: ThemeManager.getCurrentThemeVariables().containerBgColor,
|