Show text to tell user to rotate the screen

This commit is contained in:
keplyx 2019-11-08 12:27:15 +01:00
parent bb0ff390a9
commit e4a002c8dc
3 changed files with 12 additions and 1 deletions

View file

@ -3,6 +3,7 @@
import * as React from 'react'; import * as React from 'react';
import ThemeManager from "../utils/ThemeManager"; import ThemeManager from "../utils/ThemeManager";
import WebViewScreen from "../components/WebViewScreen"; import WebViewScreen from "../components/WebViewScreen";
import i18n from "i18n-js";
type Props = { type Props = {
navigation: Object, navigation: Object,
@ -26,7 +27,9 @@ export default class PlanexScreen extends React.Component<Props> {
super(); super();
this.customInjectedJS = this.customInjectedJS =
'document.querySelector(\'head\').innerHTML += \'<meta name="viewport" content="width=device-width, initial-scale=1.0">\';' + 'document.querySelector(\'head\').innerHTML += \'<meta name="viewport" content="width=device-width, initial-scale=1.0">\';' +
'document.querySelector(\'head\').innerHTML += \'<link rel="stylesheet" href="' + CUSTOM_CSS_GENERAL + '" type="text/css"/>\';'; 'document.querySelector(\'head\').innerHTML += \'<link rel="stylesheet" href="' + CUSTOM_CSS_GENERAL + '" type="text/css"/>\';' +
'$(".fc-toolbar .fc-center").append(\'<p id="rotateToLandscape">' + i18n.t("planexScreen.rotateToLandscape") + '</p>\');' +
'$(".fc-toolbar .fc-center").append(\'<p id="rotateToPortrait">' + i18n.t("planexScreen.rotateToPortrait") + '</p>\');';
if (ThemeManager.getNightMode()) if (ThemeManager.getNightMode())
this.customInjectedJS += 'document.querySelector(\'head\').innerHTML += \'<link rel="stylesheet" href="' + CUSTOM_CSS_NIGHTMODE + '" type="text/css"/>\';'; this.customInjectedJS += 'document.querySelector(\'head\').innerHTML += \'<link rel="stylesheet" href="' + CUSTOM_CSS_NIGHTMODE + '" type="text/css"/>\';';
} }

View file

@ -182,6 +182,10 @@
"machineRunningBody": "The machine n°{{number}} is still running" "machineRunningBody": "The machine n°{{number}} is still running"
} }
}, },
"planexScreen": {
"rotateToLandscape": "Turn your screen to see the whole week",
"rotateToPortrait": "Turn your screen to see only 2 days"
},
"availableRoomScreen": { "availableRoomScreen": {
"normalRoom": "Work", "normalRoom": "Work",
"computerRoom": "Computer", "computerRoom": "Computer",

View file

@ -184,6 +184,10 @@
"machineRunningBody": "La machine n°{{number}} n'est pas encore terminée" "machineRunningBody": "La machine n°{{number}} n'est pas encore terminée"
} }
}, },
"planexScreen": {
"rotateToLandscape": "Tournez votre téléphone pour voir la semaine entière",
"rotateToPortrait": "Tournez votre téléphone pour voir seulement 2 jours"
},
"availableRoomScreen": { "availableRoomScreen": {
"normalRoom": "Travail", "normalRoom": "Travail",
"computerRoom": "Ordi", "computerRoom": "Ordi",