aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--web/app/controller/Root.js4
-rw-r--r--web/debug.html2
-rw-r--r--web/release.html2
3 files changed, 4 insertions, 4 deletions
diff --git a/web/app/controller/Root.js b/web/app/controller/Root.js
index 7ad8dacc2..9eef35dc0 100644
--- a/web/app/controller/Root.js
+++ b/web/app/controller/Root.js
@@ -28,7 +28,7 @@ Ext.define('Traccar.controller.Root', {
var indicator = document.createElement('div');
indicator.className = 'state-indicator';
document.body.appendChild(indicator);
- isPhone = parseInt(window.getComputedStyle(indicator).getPropertyValue('z-index'), 10);
+ this.isPhone = parseInt(window.getComputedStyle(indicator).getPropertyValue('z-index'), 10) !== 0;
},
onLaunch: function () {
@@ -67,7 +67,7 @@ Ext.define('Traccar.controller.Root', {
loadApp: function() {
Ext.getStore('Devices').load();
Ext.getBody().empty();
- if (isPhone) {
+ if (this.isPhone) {
Ext.create('Traccar.view.main.MainMobile');
} else {
Ext.create('Traccar.view.main.Main');
diff --git a/web/debug.html b/web/debug.html
index 811451315..fa3836ce2 100644
--- a/web/debug.html
+++ b/web/debug.html
@@ -6,7 +6,7 @@
<title>Traccar</title>
<style>
.state-indicator { position: absolute; top: -999em; left: -999em; z-index: 0; }
-@media all and (max-width: 768px) { .state-indicator { z-index: 1; } }
+@media all and (max-device-width: 768px) { .state-indicator { z-index: 1; } }
</style>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/resources/theme-neptune-all.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.css">
diff --git a/web/release.html b/web/release.html
index 9b10b9d7f..bc4d902c0 100644
--- a/web/release.html
+++ b/web/release.html
@@ -6,7 +6,7 @@
<title>Traccar</title>
<style>
.state-indicator { position: absolute; top: -999em; left: -999em; z-index: 0; }
-@media all and (max-width: 768px) { .state-indicator { z-index: 1; } }
+@media all and (max-device-width: 768px) { .state-indicator { z-index: 1; } }
</style>
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/extjs/6.0.0/classic/theme-neptune/resources/theme-neptune-all.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/ol3/3.7.0/ol.min.css">