Browse Source

Show text to tell user to rotate the screen

keplyx 2 years ago
parent
commit
e4a002c8dc
3 changed files with 12 additions and 1 deletions
  1. 4
    1
      screens/PlanexScreen.js
  2. 4
    0
      translations/en.json
  3. 4
    0
      translations/fr.json

+ 4
- 1
screens/PlanexScreen.js View File

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

+ 4
- 0
translations/en.json View File

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

+ 4
- 0
translations/fr.json View File

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

Loading…
Cancel
Save