diff options
Diffstat (limited to 'www')
| -rw-r--r-- | www/css/style.css | 3 | ||||
| -rw-r--r-- | www/index.html | 9 | ||||
| -rwxr-xr-x | www/js/DataModel.js | 4 | ||||
| -rw-r--r-- | www/js/LogCtrl.js | 29 | ||||
| -rwxr-xr-x | www/js/app.js | 16 | ||||
| -rw-r--r-- | www/lang/locale-en.json | 1 |
6 files changed, 53 insertions, 9 deletions
diff --git a/www/css/style.css b/www/css/style.css index 5f4fdd0e..4c4af862 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -1313,8 +1313,11 @@ fill-opacity: 0.8; body { font-family: sans-serif; height:100%; + padding-top: constant(safe-area-inset-top); } + + * { font-family: -apple-system, "Helvetica Neue", sans-serif; }
\ No newline at end of file diff --git a/www/index.html b/www/index.html index 26946674..9773297b 100644 --- a/www/index.html +++ b/www/index.html @@ -5,7 +5,7 @@ <meta charset="utf-8"> - <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover"> <meta http-equiv="Content-Security-Policy" content="img-src * blob: android-webview-video-poster: cdvphotolibrary: 'self' data: ws: wss://*; default-src * blob: 'self' gap: wss: ws: data:; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; connect-src * http: https: ws: wss://*;"> @@ -27,9 +27,11 @@ <link rel="stylesheet" href="external/ionic.content.banner.min.css"> <link rel="stylesheet" href="external/radio.css"> <script src="lib/ionic/js/ionic.bundle.js"></script> + <script src="lib/ngCordova/dist/ng-cordova.min.js"></script> + <script src="cordova.js"></script> <script src="lib/filelogger/dist/filelogger.min.js"></script> - <script src="cordova.js"></script> + <script src="lib/localforage/dist/localforage.js"></script> <script src="lib/localforage-cordovasqlitedriver/dist/localforage-cordovasqlitedriver.js"></script> <script src="js/ionicUtils.js"></script> @@ -252,7 +254,8 @@ --> <script> /* global angular, $*/ - window.addEventListener('native.keyboardshow', keyboardShowHandler); + // window.addEventListener('native.keyboardshow', keyboardShowHandler); + //alert ('Hello'); function keyboardShowHandler(e) { diff --git a/www/js/DataModel.js b/www/js/DataModel.js index e138fd72..8f702c66 100755 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -1505,8 +1505,8 @@ angular.module('zmApp.controllers') }) .error(function(error) { - log("Error retrieving ZM_PATH_ZMS: " + JSON.stringify(error)); - d.reject(""); + log("Can't retrieving ZM_PATH_ZMS: " + JSON.stringify(error)); + d.resolve(""); return (d.promise); }); return (d.promise); diff --git a/www/js/LogCtrl.js b/www/js/LogCtrl.js index af7b037e..b7be82ba 100644 --- a/www/js/LogCtrl.js +++ b/www/js/LogCtrl.js @@ -155,7 +155,34 @@ angular.module('zmApp.controllers').controller('zmApp.LogCtrl', ['$scope', '$roo logstring = logstring.replace(re4, "<server>"); } - window.plugins.emailComposer.showEmailComposerWithCallback(callback, $rootScope.appName + ' logs', logstring, [zm.authoremail]); + cordova.plugins.email.isAvailable( + function (isAvailable) { + + if (isAvailable) { + cordova.plugins.email.open({ + to: zm.authoremail, + subject: $rootScope.appName + ' logs', + body: logstring + }); + } + else { + // kEmailNotConfigured + $rootScope.zmPopup = SecuredPopups.show('alert', + { + title: $translate.instant('kError'), + template: $translate.instant('kEmailNotConfigured'), + okText: $translate.instant('kButtonOk'), + cancelText: $translate.instant('kButtonCancel'), + }); + + } + + }); + + + + + // window.plugins.emailComposer.showEmailComposerWithCallback(callback, $rootScope.appName + ' logs', logstring, [zm.authoremail]); } else diff --git a/www/js/app.js b/www/js/app.js index 34e9343e..c859efc3 100755 --- a/www/js/app.js +++ b/www/js/app.js @@ -1430,12 +1430,14 @@ angular.module('zmApp', [ NVRDataModel.log("You are running on " + $rootScope.platformOS); - if (window.cordova) - MobileAccessibility.getTextZoom(getTextZoomCallback); + console.log ("Mobile acc"); + if (window.cordova) + MobileAccessibility.getTextZoom(getTextZoomCallback); // $rootScope.lastState = "events"; //$rootScope.lastStateParam = "0"; +console.log ("localforage config"); localforage.config({ name: zm.dbName @@ -1462,6 +1464,7 @@ angular.module('zmApp', [ } +console.log ("forage driver"); localforage.defineDriver(window.cordovaSQLiteDriver).then(function () { return localforage.setDriver( // Try setting cordovaSQLiteDriver if available, @@ -1555,6 +1558,7 @@ angular.module('zmApp', [ }); function continueInitialInit() { + console.log ("continueinit"); var pixelRatio = window.devicePixelRatio || 1; $rootScope.devWidth = ((window.innerWidth > 0) ? window.innerWidth : screen.width); $rootScope.devHeight = ((window.innerHeight > 0) ? window.innerHeight : screen.height); @@ -1564,10 +1568,12 @@ angular.module('zmApp', [ $rootScope.$stateParams = $stateParams; if (window.cordova && window.cordova.plugins.Keyboard) { - cordova.plugins.Keyboard.disableScroll(true); + console.log ("no keyboard"); + // cordova.plugins.Keyboard.disableScroll(true); } if (window.StatusBar) { // org.apache.cordova.statusbar required + console.log ("statusbar"); NVRDataModel.log("Updating statusbar"); StatusBar.styleDefault(); //StatusBar.overlaysWebView(false); @@ -1575,10 +1581,12 @@ angular.module('zmApp', [ } if (window.cordova) { + console.log ("Hiding splash"); $cordovaSplashscreen.hide(); + console.log ("app version"); cordova.getAppVersion.getVersionNumber().then(function (version) { appVersion = version; NVRDataModel.log("App Version: " + appVersion); @@ -1586,8 +1594,10 @@ angular.module('zmApp', [ }); } + console.log ("file logger"); $fileLogger.checkFile().then(function (resp) { if (parseInt(resp.size) > zm.logFileMaxSize) { + console.log ("inside file logger"); $fileLogger.deleteLogfile().then(function () { NVRDataModel.log("Deleting old log file as it exceeds " + zm.logFileMaxSize + " bytes"); diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index ffc5c5de..24f2a031 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -72,6 +72,7 @@ "kDiscoveringPortal" :"discovering portal", "kDone" :"done", "kDownload" :"download", + "kEmailNotConfigured" : "Email not configured", "kEnable24hr" :"enable 24hr time format", "kEnableDebug" :"Enable debug logs", "kEnableGIFMP4" :"Enable GIF/MP4 downloads", |
