From 1c544b656e47d8b8ddba19673daba07a35e3afb2 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Sat, 22 Sep 2018 13:28:05 -0400 Subject: various fixes for XCode 10 build process and iCloud --- www/js/DataModel.js | 6 ++++-- www/js/LogCtrl.js | 8 ++++++++ www/js/LoginCtrl.js | 1 + www/lang/locale-en.json | 2 +- www/templates/log.html | 5 +++++ 5 files changed, 19 insertions(+), 3 deletions(-) (limited to 'www') diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 8b282aee..575f369c 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -20,7 +20,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.3.020"; + var zmAppVersion = "1.3.022"; var isBackground = false; var justResumed = false; var timeSinceResumed = -1; @@ -895,10 +895,12 @@ angular.module('zmApp.controllers') log("Did not find a valid local configuration, trying cloud..."); window.cordova.plugin.cloudsettings.exists(function (exists) { - log ("A cloud configuration has been found"); + if (exists) { + log ("A cloud configuration has been found"); window.cordova.plugin.cloudsettings.load(function (cloudData) { console.log ("CLOUD DATA FOUND"+JSON.stringify(cloudData)); + debug ("Cloud data retrieved is:"+JSON.stringify(cloudData)); if (cloudData && cloudData.defaultServerName && cloudData.serverGroupList) { log("retrieved a valid cloud config with a defaultServerName of:"+cloudData.defaultServerName); log("replacing local DB with cloud..."); diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js index 8d2c2672..920cc499 100644 --- a/www/js/LogCtrl.js +++ b/www/js/LogCtrl.js @@ -260,6 +260,14 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo $scope.$on('$ionicView.enter', function () { //console.log("**VIEW ** Log Ctrl Entered"); + + /*n $scope.cloudString = "loading..."; + window.cordova.plugin.cloudsettings.load( + function (succ) {$scope.cloudString = JSON.stringify(succ);}, + function (err) {$scope.cloudString = JSON.stringify(err);} + + );*/ + $ionicSideMenuDelegate.canDragContent(false); $scope.selectOn = false; NVRDataModel.setAwake(false); diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index 155b648d..9410b276 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -596,6 +596,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r }, function () { NVRDataModel.debug("local data synced with cloud..."); + }, function (err) { diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 6674bd9b..fcdd8ecc 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -313,7 +313,7 @@ "kSave" :"Save", "kSavingSnapshot" :"saving snapshot", "kSaveToCloud" :"sync with cloud", - "kSaveToCloudIOS" :"saves settings to your personal iCloud account", + "kSaveToCloudIOS" :"saves settings to your personal iCloud account. May take several hours to sync", "kSaveToCloudANDROID" :"saves settings via Android's Backup Service. May take several hours to sync", "kScore" :"score", "kScrub" :"Scrub", diff --git a/www/templates/log.html b/www/templates/log.html index e505bda1..fb97ff72 100644 --- a/www/templates/log.html +++ b/www/templates/log.html @@ -21,6 +21,11 @@ + +