diff options
| -rw-r--r-- | config.xml | 2 | ||||
| -rw-r--r-- | package.json | 3 | ||||
| -rw-r--r-- | plugins/fetch.json | 8 | ||||
| -rw-r--r-- | www/css/style.css | 6 | ||||
| -rw-r--r-- | www/index.html | 2 | ||||
| -rw-r--r-- | www/js/DataModel.js | 48 | ||||
| -rw-r--r-- | www/js/EventModalCtrl.js | 28 | ||||
| -rw-r--r-- | www/js/LoginCtrl.js | 4 | ||||
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 2 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 76 | ||||
| -rw-r--r-- | www/js/app.js | 47 | ||||
| -rw-r--r-- | www/lang/locale-en.json | 1 | ||||
| -rw-r--r-- | www/templates/login.html | 163 | ||||
| -rw-r--r-- | www/templates/montage.html | 2 |
14 files changed, 259 insertions, 133 deletions
@@ -1,5 +1,5 @@ <?xml version='1.0' encoding='utf-8'?> -<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninjapro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.2.19" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> +<widget android-packageName="com.pliablepixels.zmninja_pro" id="com.pliablepixels.zmninjapro" ios-CFBundleIdentifier="com.pliablepixels.zmninja-pro" version="1.2.20" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>zmNinja</name> <description> High performance ZoneMinder client diff --git a/package.json b/package.json index acb0583a..f0562c23 100644 --- a/package.json +++ b/package.json @@ -82,7 +82,8 @@ "locator": "https://github.com/hypery2k/cordova-certificate-plugin", "id": "cordova-plugin-certificates" }, - "cordova-plugin-android-permissions" + "cordova-plugin-android-permissions", + "cordova-plugin-network-information" ], "cordovaPlatforms": [ {}, diff --git a/plugins/fetch.json b/plugins/fetch.json index 44bf03fa..d5cb12fb 100644 --- a/plugins/fetch.json +++ b/plugins/fetch.json @@ -202,5 +202,13 @@ }, "is_top_level": true, "variables": {} + }, + "cordova-plugin-network-information": { + "source": { + "type": "registry", + "id": "cordova-plugin-network-information" + }, + "is_top_level": true, + "variables": {} } }
\ No newline at end of file diff --git a/www/css/style.css b/www/css/style.css index c1c78f1e..8efb5d24 100644 --- a/www/css/style.css +++ b/www/css/style.css @@ -781,6 +781,12 @@ input[type=range]::-webkit-slider-thumb { } +.content-banner.net +{ + background-color: #9b59b6; + color:white; +} + /* This accordion list is used for event server monitor filter * http://docs.angularjs.org/api/ng/directive/ngShow#usage_animations */ diff --git a/www/index.html b/www/index.html index c6bea392..5ca3042f 100644 --- a/www/index.html +++ b/www/index.html @@ -195,7 +195,7 @@ <ion-item href="#/montage" menu-close> - <span ng-if="$root.runMode=='low'" style="float:right;margin-top:-18px;background-color:#f1c40f;color:#000;font-size:11px;opacity:0.7;width:20px;border-radius: 0px 0px 5px 5px;display:inline-block;text-align:center;"> <i class="icon ion-arrow-graph-down-left"></i> </span> + <span ng-if="$root.runMode=='lowbw'" style="float:right;margin-top:-18px;background-color:#f1c40f;color:#000;font-size:11px;opacity:0.7;width:20px;border-radius: 0px 0px 5px 5px;display:inline-block;text-align:center;"> <i class="icon ion-arrow-graph-down-left"></i> </span> <span class=" item-icon-left"> <i class="icon ion-ios-eye"></i> diff --git a/www/js/DataModel.js b/www/js/DataModel.js index 11451916..ee69b09c 100644 --- a/www/js/DataModel.js +++ b/www/js/DataModel.js @@ -2,7 +2,7 @@ /* jslint browser: true*/ -/* global cordova,StatusBar,angular,console, URI, moment, localforage, CryptoJS */ +/* global cordova,StatusBar,angular,console, URI, moment, localforage, CryptoJS, Connection */ // This is my central data respository and common functions // that many other controllers use @@ -109,6 +109,7 @@ angular.module('zmApp.controllers') 'cycleMonitors': false, 'cycleMonitorsInterval':10, // 10sec 'enableLowBandwidth':false, + 'autoSwitchBandwidth':false, @@ -691,12 +692,28 @@ angular.module('zmApp.controllers') } + if (typeof loginData.enableLowBandwidth == 'undefined') { + loginData.enableLowBandwidth = false; } - $rootScope.runMode = loginData.enableLowBandwith? "low": "normal"; + // wtf is wrong with this ternary? + //$rootScope.runMode = (loginData.enableLowBandwith==true)? "low": "normal"; + + + + + if (typeof loginData.autoSwitchBandwidth == 'undefined') { + + + loginData.autoSwitchBandwidth = false; + + } + + + if (typeof loginData.refreshSecLowBW == 'undefined') { @@ -1079,6 +1096,33 @@ angular.module('zmApp.controllers') }, + //-------------------------------------------------------------------------- + // returns high or low BW mode + //-------------------------------------------------------------------------- + getBandwidth: function () { + // if mode is not on always return high + if (loginData.enableLowBandwidth == false) + { + return "highbw"; + } + // if mode is force on, return low + if (loginData.enableLowBandwidth == true && loginData.autoSwitchBandwidth != true) + { + return "lowbw"; + } + // else return real state + var networkState = navigator.connection.type; + var strState; + switch (networkState) + { + + case Connection.WIFI: strState="highbw"; break; + case Connection.ETHERNET: strState="highbw"; break; + default: strState = "lowbw"; break; + + } + return strState; + }, //-------------------------------------------------------------------------- // This is really a hack for now & is very ugly. I need to clean this up a lot diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index 8a2c3c4c..e091b5f7 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -101,6 +101,30 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro //$rootScope.authSession=""; NVRDataModel.log("Modal: Error returned Stream authentication construction. Retaining old value of: " + $rootScope.authSession); }); + + + + //-------------------------------------------------------------------------------------- + // Handles bandwidth change, if required + // + //-------------------------------------------------------------------------------------- + + $rootScope.$on("bandwidth-change", function (e,data) { + // not called for offline, I'm only interested in BW switches + NVRDataModel.debug("Got network change:" + data); + var ds; + if (data == 'lowbw') { + ds = "low bandwidth mode"; + } else { + ds = "high bandwidth mode"; + } + NVRDataModel.displayBanner('net', [ds]); + + var ld = NVRDataModel.getLogin(); + + $scope.singleImageQuality = (NVRDataModel.getBandwidth()=="lowbw" )? zm.eventSingleImageQualityLowBW: ld.singleImageQuality; + }); + @@ -740,7 +764,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro var ld = NVRDataModel.getLogin(); $scope.loginData = NVRDataModel.getLogin(); - $scope.singleImageQuality = ld.enableLowBandwidth? 70: ld.singleImageQuality; + $scope.singleImageQuality = (NVRDataModel.getBandwidth()=="lowbw" )? zm.eventSingleImageQualityLowBW: ld.singleImageQuality; $scope.blockSlider = false; $scope.checkEventOn = false; //$scope.singleImageQuality = 100; @@ -776,7 +800,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro eventQueryHandle = $interval(function () { checkEvent(); // console.log ("Refreshing Image..."); - }.bind(this), ld.enableLowBandwidth? zm.eventPlaybackQueryLowBW: zm.eventPlaybackQuery); + }.bind(this), (NVRDataModel.getBandwidth()=="lowbw")? zm.eventPlaybackQueryLowBW: zm.eventPlaybackQuery); } else { NVRDataModel.log(">>>Modal was exited, not starting checkAllEvents"); } diff --git a/www/js/LoginCtrl.js b/www/js/LoginCtrl.js index 457ebe79..28f16670 100644 --- a/www/js/LoginCtrl.js +++ b/www/js/LoginCtrl.js @@ -424,7 +424,7 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r NVRDataModel.setFirstUse(false); // used for menu display - $rootScope.runMode = $scope.loginData.enableLowBandwidth ? "low":"normal"; + // lets so some basic sanitization of the data // I am already adding "/" so lets remove spurious ones @@ -529,6 +529,8 @@ angular.module('zmApp.controllers').controller('zmApp.LoginCtrl', ['$scope', '$r } NVRDataModel.setLogin($scope.loginData); + $rootScope.runMode = NVRDataModel.getBandwidth(); + oldName = $scope.loginData.serverName; if ($scope.check.isUseEventServer) { diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index 84553d6e..b5ac114f 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -1259,7 +1259,7 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $scope.isCycle = ld.cycleMonitors; $scope.cycleText = $scope.isCycle ? $translate.instant('kOn') : $translate.instant('kOff'); - $scope.quality = ld.enableLowBandwidth? 70:ld.monSingleImageQuality; + $scope.quality = ld.enableLowBandwidth? zm.monSingleImageQualityLowBW:ld.monSingleImageQuality; configurePTZ($scope.monitorId); diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 5cc06739..87542f0b 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -24,6 +24,43 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' var ld; var refreshSec; + + //-------------------------------------------------------------------------------------- + // Handles bandwidth change, if required + // + //-------------------------------------------------------------------------------------- + + $rootScope.$on("bandwidth-change", function (e,data) { + // not called for offline, I'm only interested in BW switches + NVRDataModel.debug("Got network change:" + data); + var ds; + if (data == 'lowbw') { + ds = "low bandwidth mode"; + } else { + ds = "high bandwidth mode"; + } + NVRDataModel.displayBanner('net', [ds]); + + var ld = NVRDataModel.getLogin(); + + refreshSec = (NVRDataModel.getBandwidth()=='lowbw') ? ld.refreshSecLowBW : ld.refreshSec; + $interval.cancel(intervalHandleMontage); + intervalHandleMontage = $interval(function () { + loadNotifications(); + }.bind(this), refreshSec * 1000); + + + if (NVRDataModel.getBandwidth() == 'lowbw') + { + NVRDataModel.debug("Enabling low bandwidth parameters"); + $scope.LoginData.montageQuality = zm.montageQualityLowBW; + $scope.LoginData.singleImageQuality = zm.eventSingleImageQualityLowBW; + $scope.LoginData.montageHistoryQuality = zm.montageQualityLowBW; + + } + }); + + // -------------------------------------------------------- // Handling of back button in case modal is open should // close the modal @@ -261,9 +298,8 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' return; } - - if (NVRDataModel.getLogin().enableLowBandwidth) - { + + if (NVRDataModel.getBandwidth() == 'lowbw') { return; } @@ -794,7 +830,7 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $scope.toggleSizeButtons = function () { $scope.showSizeButtons = !$scope.showSizeButtons; - + NVRDataModel.debug("toggling size buttons:" + $scope.showSizeButtons); if ($scope.showSizeButtons) $ionicScrollDelegate.$getByHandle("montage-delegate").scrollTop(); }; @@ -818,18 +854,18 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' $scope.allImagesLoaded = false; $scope.gridScale = "grid-item-50"; $scope.LoginData = NVRDataModel.getLogin(); + //FIXME - if ($scope.LoginData.enableLowBandwidth) - { - NVRDataModel.debug ("Enabling low bandwidth parameters"); - $scope.LoginData.montageQuality = 50; - $scope.LoginData.singleImageQuality = 70; - $scope.LoginData.montageHistoryQuality = 50; - - + if (NVRDataModel.getBandwidth() == 'lowbw') { + NVRDataModel.debug("Enabling low bandwidth parameters"); + $scope.LoginData.montageQuality = zm.montageQualityLowBW; + $scope.LoginData.singleImageQuality = zm.eventSingleImageQualityLowBW; + $scope.LoginData.montageHistoryQuality = zm.montageQualityLowBW; + + } - - + + $scope.monLimit = $scope.LoginData.maxMontage; $scope.showSizeButtons = false; @@ -851,11 +887,11 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' //$scope.areImagesLoading = true; var ld = NVRDataModel.getLogin(); - - refreshSec = ld.enableLowBandwidth ? ld.refreshSecLowBW: ld.refreshSec; - - NVRDataModel.debug ("Enable Low bandwidth: " + ld.enableLowBandwidth+ " montage refresh set to: " + refreshSec); - + + refreshSec = (NVRDataModel.getBandwidth()=='lowbw') ? ld.refreshSecLowBW : ld.refreshSec; + + NVRDataModel.debug("bandwidth: " + NVRDataModel.getBandwidth() + " montage refresh set to: " + refreshSec); + //console.log("Setting Awake to " + NVRDataModel.getKeepAwake()); NVRDataModel.setAwake(NVRDataModel.getKeepAwake()); @@ -1141,4 +1177,4 @@ angular.module('zmApp.controllers').controller('zmApp.MontageCtrl', ['$scope', ' }; -}]);
\ No newline at end of file +}]); diff --git a/www/js/app.js b/www/js/app.js index 367fc0af..a4cf59f7 100644 --- a/www/js/app.js +++ b/www/js/app.js @@ -1,6 +1,6 @@ /* jshint -W041 */ /* jslint browser: true*/ -/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI,Packery, ConnectSDK, CryptoJS, localforage,$*/ +/* global cordova,StatusBar,angular,console,alert,PushNotification, moment ,ionic, URI,Packery, ConnectSDK, CryptoJS, ContactFindOptions, localforage,$, Connection*/ var appVersion = "0.0.0"; @@ -46,7 +46,7 @@ angular.module('zmApp', [ authoremail: 'pliablepixels+zmNinja@gmail.com', logFileMaxSize: 20000, // after this limit log gets reset loginInterval: 300000, //5m*60s*1000 - ZM auto login after 5 mins - loginIntervalLowBW: 600000, //10m login + //loginInterval: 30000, updateCheckInterval: 86400000, // 24 hrs loadingTimeout: 15000, @@ -78,11 +78,17 @@ angular.module('zmApp', [ nphSwitchTimer: 3000, eventHistoryTimer: 10000, eventPlaybackQuery: 3000, - eventPlaybackQueryLowBW: 6000, + packeryTimer: 500, dbName: 'zmninja', cipherKey: 'sdf#@#%FSXSA_AR', minCycleTime: 5, + + eventPlaybackQueryLowBW: 6000, + loginIntervalLowBW: 600000, //10m login + eventSingleImageQualityLowBW:70, + monSingleImageQualityLowBW:70, + montageQualityLowBW:50, }) @@ -968,11 +974,35 @@ angular.module('zmApp', [ $rootScope.$apply(function () { $rootScope.online = false; NVRDataModel.log("Your network went offline"); + + //$rootScope.$emit('network-change', "offline"); + }); }, false); + $window.addEventListener("online", function () { $rootScope.$apply(function () { $rootScope.online = true; + + $timeout ( function () { + var networkState = navigator.connection.type; + NVRDataModel.debug ("Detected network type as: "+ networkState); + var strState = NVRDataModel.getBandwidth(); + NVRDataModel.debug ("getBandwidth() normalized it as: " + strState); + $rootScope.runMode = strState; + if ((NVRDataModel.getLogin().autoSwitchBandwidth == true) && + (NVRDataModel.getLogin().enableLowBandwidth == true)) + { + NVRDataModel.debug ("Setting app state to: "+ strState); + $rootScope.$emit('bandwidth-change', strState); + } + else + { + NVRDataModel.debug ("Not changing bandwidth state, as auto change is not on"); + } + + },1000); // need a time gap, seems network type registers late + NVRDataModel.log("Your network is online, re-authenticating"); zmAutoLogin.doLogin($translate.instant('kReAuthenticating')); @@ -1077,11 +1107,8 @@ angular.module('zmApp', [ - - - $rootScope.db = null; - $rootScope.runMode = "normal"; + $rootScope.runMode = "highbw"; $rootScope.platformOS = "desktop"; NVRDataModel.log("Device is ready"); @@ -1424,12 +1451,6 @@ angular.module('zmApp', [ } - - - - - - }); //platformReady }) //run diff --git a/www/lang/locale-en.json b/www/lang/locale-en.json index 7af0db3b..711a301d 100644 --- a/www/lang/locale-en.json +++ b/www/lang/locale-en.json @@ -16,6 +16,7 @@ "kAt" :"at", "kAuthSuccess" :"authentication success", "kAuthenticating" :"authenticating", + "kAutoSwitchBW" :"auto switch bandwidth", "kAwake1" :"Keep display on", "kAwake2" :"(when viewing footage)", "kBannerAPICheckFailed" :"API check failed", diff --git a/www/templates/login.html b/www/templates/login.html index e2a65168..054aaf49 100644 --- a/www/templates/login.html +++ b/www/templates/login.html @@ -3,135 +3,118 @@ <ion-nav-buttons side="left"> <button class="button button-icon button-clear ion-navicon" ng-click="openMenu()"></button> <button class="button button-icon button-clear ion-arrow-down-b" ng-click="serverActionSheet()"></button> - - - - <button data-badge="{{$root.alarmCount}}" class="animated infinite tada button button-icon button-clear ion-ios-bell notification-badge" ng-click="handleAlarms();" ng-if="$root.isAlarm"></button> + + + + <button data-badge="{{$root.alarmCount}}" class="animated infinite tada button button-icon button-clear ion-ios-bell notification-badge" ng-click="handleAlarms();" ng-if="$root.isAlarm"></button> </ion-nav-buttons> - + <ion-nav-buttons side="right"> <button class="button button-clear" ng-click="saveItems()">Save</button> </ion-nav-buttons> - <ion-content padding="true" > - - <div class="item item-input-inset"> - {{'kServerName' | translate }}: - <label class="item-input-wrapper"> - <input autocorrect="off" type="text" placeholder="{{'kExampleServer' | translate}}" ng-model="loginData.serverName"> - </label> + <ion-content padding="true"> + + <div class="item item-input-inset"> + {{'kServerName' | translate }}: + <label class="item-input-wrapper"> + <input autocorrect="off" type="text" placeholder="{{'kExampleServer' | translate}}" ng-model="loginData.serverName"> + </label> </div> - + <label> - - <ion-toggle ng-model="loginData.enableLowBandwidth" - - toggle-class="toggle-calm">{{'kLowBandwidth'|translate}} + <ion-toggle ng-model="loginData.enableLowBandwidth" toggle-class="toggle-calm">{{'kLowBandwidth'|translate}} </ion-toggle> - </label> - + </label> + <label ng-if="loginData.enableLowBandwidth"> + <ion-toggle ng-model="loginData.autoSwitchBandwidth" toggle-class="toggle-calm">{{'kAutoSwitchBW'|translate}} + </ion-toggle> + </label> + + <div class="list list-inset"> <span style="color:rgb(100,100,100)"> <i class="ion-android-home" style="font-size:150%"></i> {{'kZMSettingsFor' | translate}} {{loginData.serverName || ('kUnknown' | translate)}} </span> - + <div class="item"> - <ion-checkbox ng-model="check.isUseAuth">{{'kUseZmAuth' | translate }}</ion-checkbox> - - <div ng-if = "check.isUseAuth" > - - <label class="item item-input item-floating-label" > - <span class="input-label">{{'kUserName'|translate}}</span> - <input autocapitalize="none" autocomplete="off" - autocorrect="off" type="text" - placeholder="username" - ng-model="loginData.username"> - </label> + <ion-checkbox ng-model="check.isUseAuth">{{'kUseZmAuth' | translate }}</ion-checkbox> - <label class="item item-input item-floating-label" > - <span class="input-label">{{'kPassword' | translate}}</span> - <input type="password" placeholder="password" - ng-model="loginData.password"> - </label> - </div> - + <div ng-if="check.isUseAuth"> + + <label class="item item-input item-floating-label"> + <span class="input-label">{{'kUserName'|translate}}</span> + <input autocapitalize="none" autocomplete="off" autocorrect="off" type="text" placeholder="username" ng-model="loginData.username"> + </label> + + <label class="item item-input item-floating-label"> + <span class="input-label">{{'kPassword' | translate}}</span> + <input type="password" placeholder="password" ng-model="loginData.password"> + </label> </div> - <label class="item item-input item-floating-label" > + + </div> + <label class="item item-input item-floating-label"> <span class="input-label">{{'kPortalUrl' | translate}}</span> - <input autocapitalize="none" autocomplete="off" - autocorrect="off" type="text" - placeholder="ZM portal url " - ng-model="loginData.url" ng-keyup="portalKeypress($event)"> + <input autocapitalize="none" autocomplete="off" autocorrect="off" type="text" placeholder="ZM portal url " ng-model="loginData.url" ng-keyup="portalKeypress($event)"> </label> - - <!--<button class="button button-small button-clear icon-left ion-wand" ng-click="detectCgi()">tap here to discover cgi-bin + + <!--<button class="button button-small button-clear icon-left ion-wand" ng-click="detectCgi()">tap here to discover cgi-bin </button>--> - - <label class="item item-input item-floating-label" > - - - <!--<span style="float:right;margin-top:-7px;background-color:#6d0909;color:#fff;font-size:14px;opacity:0.7;width:90px;border-radius: 0px 0px 5px 5px;" on-tap="detectCgi();"> <i class="ion-wand"></i>discover</span>--> - + + <label class="item item-input item-floating-label"> + + + <!--<span style="float:right;margin-top:-7px;background-color:#6d0909;color:#fff;font-size:14px;opacity:0.7;width:90px;border-radius: 0px 0px 5px 5px;" on-tap="detectCgi();"> <i class="ion-wand"></i>discover</span>--> + <span class="input-label">{{'kPathToCgi' | translate}}</span> - - <input autocapitalize="none" autocomplete="off" - autocorrect="off" type="text" - placeholder="eg. server.com/zm/cgi-bin" - ng-model="loginData.streamingurl"> - + + <input autocapitalize="none" autocomplete="off" autocorrect="off" type="text" placeholder="eg. server.com/zm/cgi-bin" ng-model="loginData.streamingurl"> + </label> - - - - <label class="item item-input item-floating-label" > + + + + <label class="item item-input item-floating-label"> <span class="input-label">{{'kApiUrl' | translate}}</span> - <input autocapitalize="none" - autocomplete="off" autocorrect="off" - type="text" placeholder="ZM api url" - ng-model="loginData.apiurl"> + <input autocapitalize="none" autocomplete="off" autocorrect="off" type="text" placeholder="ZM api url" ng-model="loginData.apiurl"> </label> - + <a class="item item-icon-right" href="" ng-click="selectFallback()"> <i class="icon ion-ios-arrow-right"> - </i> - {{'kFallback' | translate}}<p>{{loginData.fallbackConfiguration}}</p> - </a> - + </i> {{'kFallback' | translate}} + <p>{{loginData.fallbackConfiguration}}</p> + </a> + <a class="item item-icon-right" href="" ng-click="eventServerSettings()"> <i class="icon ion-ios-arrow-right"> - </i> - {{'kEventServer' | translate}} + </i> {{'kEventServer' | translate}} </a> - - + + <div ng-if="$root.platformOS != 'desktop'"> <label> - <ion-toggle ng-model="loginData.usePin" ng-change="pinPrompt();" - ng-checked="{{loginData.usePin}}" - toggle-class="toggle-calm">{{'kPassword' | translate}} {{'kProtect'|translate}}</ion-toggle> + <ion-toggle ng-model="loginData.usePin" ng-change="pinPrompt();" ng-checked="{{loginData.usePin}}" toggle-class="toggle-calm">{{'kPassword' | translate}} {{'kProtect'|translate}}</ion-toggle> </label> </div> - + <label> - <ion-toggle ng-model="loginData.useSSL" - ng-checked="{{loginData.useSSL}}" - toggle-class="toggle-calm">{{'kUseSSL' | translate}}</ion-toggle> + <ion-toggle ng-model="loginData.useSSL" ng-checked="{{loginData.useSSL}}" toggle-class="toggle-calm">{{'kUseSSL' | translate}}</ion-toggle> </label> <div ng-if="$root.platformOS != 'desktop'"> - <label> - - <ion-toggle ng-model="loginData.keepAwake" - ng-checked="{{loginData.keepAwake}}" - toggle-class="toggle-calm">{{'kAwake1'|translate}}<p>{{'kAwake2'| translate}}</p> - </ion-toggle> - </label> + <label> + + <ion-toggle ng-model="loginData.keepAwake" ng-checked="{{loginData.keepAwake}}" toggle-class="toggle-calm">{{'kAwake1'|translate}} + <p>{{'kAwake2'| translate}}</p> + </ion-toggle> + </label> </div> </div> - + </ion-content> -</ion-view> +</ion-view>
\ No newline at end of file diff --git a/www/templates/montage.html b/www/templates/montage.html index 4ce29ab3..9e0be000 100644 --- a/www/templates/montage.html +++ b/www/templates/montage.html @@ -91,7 +91,7 @@ <figcaption id="slowpulse" ng-class="monitor.Monitor.isAlarmed==true?'alarmed-figcaption animated infinite flash':'normal-figcaption'" > <i class="ion-ios-videocam"></i> - {{monitor.Monitor.Name}} <i style="{{monitor.Monitor.alarmState}}" class="ion-record"></i> + {{monitor.Monitor.Name}} <i ng-if="$root.runMode!='lowbw'" style="{{monitor.Monitor.alarmState}}" class="ion-record"></i> </figcaption> |
