From f5b0bf6abf44a0309b7ff7c835f3c0df1835d415 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 11 Apr 2020 12:11:59 -0400 Subject: fix platform detection --- config.xml | 2 +- package.json | 2 +- www/js/NVR.js | 1 + www/js/app.js | 4 +++- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config.xml b/config.xml index f85ad68d..7af84f9c 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + zmNinja High performance ZoneMinder client diff --git a/package.json b/package.json index 56682b14..9f8e6608 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version":"1.4.1", + "version":"1.4.2", "displayName": "zmNinja", "author": "Pliable Pixels", "license": "custom see LICENSE.md", diff --git a/www/js/NVR.js b/www/js/NVR.js index 01d24730..914b824a 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -373,6 +373,7 @@ angular.module('zmApp.controllers') .then ( function () {return localforage.removeItem('cached_multi_port');}) .then ( function () {return localforage.removeItem('cached_timezone');}) .catch ( function (err) {debug ('Error removing all caches: '+JSON.stringify(err));}); + } function cache_or_http(url,key,doCrypt, expiry) { diff --git a/www/js/app.js b/www/js/app.js index 076bde17..9c745a9a 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1151,8 +1151,10 @@ angular.module('zmApp', [ NVR.log("Device is ready"); //console.log ("*************** PLATFORM IS: "+ionic.Platform.platform()); + var ua = navigator.userAgent.toLowerCase(); + NVR.debug ("UA is "+ua); // var ld = NVR.getLogin(); - if ($ionicPlatform.is('ios') || ionic.Platform.platform() == 'macintel') + if (($ionicPlatform.is('ios') || ionic.Platform.platform() == 'macintel') && ua.indexOf("electron") == -1) $rootScope.platformOS = "ios"; if ($ionicPlatform.is('android')) $rootScope.platformOS = "android"; -- cgit v1.2.3