summaryrefslogtreecommitdiff
path: root/www/js/DevOptionsCtrl.js
diff options
context:
space:
mode:
authorlucas_nz <lucas_nz@outlook.com>2020-09-05 11:41:25 +1200
committerlucas_nz <lucas_nz@outlook.com>2020-09-05 11:41:25 +1200
commit1139b026aedbc609189a5b3cb7ef446e1ceec09d (patch)
tree544f5a45be850d069ee6440274eb5a5a6b0cb00c /www/js/DevOptionsCtrl.js
parent2f565924960a7487ecc75d504bf2c7b0d4586580 (diff)
select event view thumbnails type, replaces enableThumbs in dev options.
Enables selection of different thumbnail types. If gif is selected limit the number of events returned to 5 to improve load time.
Diffstat (limited to 'www/js/DevOptionsCtrl.js')
-rw-r--r--www/js/DevOptionsCtrl.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/www/js/DevOptionsCtrl.js b/www/js/DevOptionsCtrl.js
index 2ad40bfa..d735f967 100644
--- a/www/js/DevOptionsCtrl.js
+++ b/www/js/DevOptionsCtrl.js
@@ -181,6 +181,35 @@ angular.module('zmApp.controllers').controller('zmApp.DevOptionsCtrl', ['$scope'
});
};
+ $scope.selectEventViewThumbs = function() {
+
+ var buttons = [
+ { text: $translate.instant('kNone').toLowerCase(), value:'none' },
+ { text: 'snapshot', value:'snapshot' },
+ { text: 'objdetect', value:'objdetect' },
+ { text: 'objdetect_jpg', value:'objdetect_jpg' },
+ { text: 'objdetect_gif', value:'objdetect_gif' },
+
+ ];
+
+ $ionicActionSheet.show({
+ titleText: $translate.instant('kSelect'),
+ buttons: buttons,
+
+ cancelText: $translate.instant('kButtonCancel'),
+ cancel: function() {
+ NVR.debug ('obfuscation actionsheet cancelled');
+ },
+ buttonClicked: function(index) {
+
+ $scope.loginData.eventViewThumbs = buttons[index].value;
+ NVR.debug ('changed event view thumbs to:'+$scope.loginData.eventViewThumbs );
+ return true;
+ },
+
+ });
+ };
+
$scope.saveDevOptions = function () {
saveDevOptions();