Browse Source

Improved Planex display and webview fullscreen

keplyx 4 years ago
parent
commit
d654a5d7a8
3 changed files with 7 additions and 5 deletions
  1. 3
    2
      components/BaseContainer.js
  2. 2
    1
      components/WebViewScreen.js
  3. 2
    2
      screens/Websites/PlanexScreen.js

+ 3
- 2
components/BaseContainer.js View File

@@ -5,7 +5,7 @@ import {Container} from "native-base";
5 5
 import CustomHeader from "./CustomHeader";
6 6
 import CustomSideMenu from "./CustomSideMenu";
7 7
 import CustomMaterialIcon from "./CustomMaterialIcon";
8
-import {Platform, View} from "react-native";
8
+import {Platform, View, StatusBar} from "react-native";
9 9
 import ThemeManager from "../utils/ThemeManager";
10 10
 import Touchable from "react-native-platform-touchable";
11 11
 import {ScreenOrientation} from "expo";
@@ -80,6 +80,7 @@ export default class BaseContainer extends React.Component<Props, State> {
80 80
                                 key: this.props.navigation.state.key,
81 81
                             });
82 82
                             this.props.navigation.dispatch(setParamsAction);
83
+                            StatusBar.setHidden(isLandscape);
83 84
                         }
84 85
                     });
85 86
                 }
@@ -122,7 +123,7 @@ export default class BaseContainer extends React.Component<Props, State> {
122 123
                         rightButton={this.props.headerRightButton}
123 124
                         hasTabs={this.props.hasTabs}
124 125
                         hasBackButton={this.props.hasBackButton}/>
125
-                    : <View style={{paddingTop: 20}}/>}
126
+                    : <View/>}
126 127
                 {this.props.children}
127 128
             </Container>
128 129
         );

+ 2
- 1
components/WebViewScreen.js View File

@@ -144,7 +144,8 @@ export default class WebViewScreen extends React.Component<Props> {
144 144
                 hasBackButton={this.props.hasHeaderBackButton}
145 145
                 hasSideMenu={this.props.hasSideMenu}
146 146
                 enableRotation={true}
147
-                hideHeaderOnLandscape={true}>
147
+                hideHeaderOnLandscape={true}
148
+                hasTabs={this.props.data.length > 1}>
148 149
                 {this.props.data.length === 1 ?
149 150
                     this.getWebview(this.props.data[0]) :
150 151
                     <Tabs

+ 2
- 2
screens/Websites/PlanexScreen.js View File

@@ -12,7 +12,7 @@ type Props = {
12 12
 
13 13
 const PLANEX_URL = 'http://planex.insa-toulouse.fr/';
14 14
 
15
-const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customMobile2.css';
15
+const CUSTOM_CSS_GENERAL = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customMobile3.css';
16 16
 const CUSTOM_CSS_NIGHTMODE = 'https://srv-falcon.etud.insa-toulouse.fr/~amicale_app/custom_css/planex/customDark2.css';
17 17
 
18 18
 // // JS + JQuery functions used to remove alpha from events. Copy paste in browser console for quick testing
@@ -73,7 +73,7 @@ export default class PlanexScreen extends React.Component<Props> {
73 73
         this.customInjectedJS =
74 74
             '$(document).ready(function() {' +
75 75
             OBSERVE_MUTATIONS_INJECTED +
76
-            '$("head").append(\'<meta name="viewport" content="width=device-width, initial-scale=0.8">\');' +
76
+            '$("head").append(\'<meta name="viewport" content="width=device-width, initial-scale=0.7">\');' +
77 77
             '$("head").append(\'<link rel="stylesheet" href="' + CUSTOM_CSS_GENERAL + '" type="text/css"/>\');';
78 78
 
79 79
         if (ThemeManager.getNightMode())

Loading…
Cancel
Save