From bbc76585387b65532ce87d8d2031ec7693ba72c1 Mon Sep 17 00:00:00 2001 From: Pliable Pixels Date: Tue, 20 Aug 2019 14:28:00 -0400 Subject: more fine grained event nav --- build_android.sh | 2 +- config.xml | 4 +- package.json | 12 ++-- resources/android/icon/drawable-hdpi-icon.png | Bin 3161 -> 3161 bytes resources/android/icon/drawable-ldpi-icon.png | Bin 1398 -> 1398 bytes resources/android/icon/drawable-mdpi-icon.png | Bin 2078 -> 2078 bytes resources/android/icon/drawable-xhdpi-icon.png | Bin 4154 -> 4154 bytes resources/android/icon/drawable-xxhdpi-icon.png | Bin 6195 -> 6195 bytes resources/android/icon/drawable-xxxhdpi-icon.png | Bin 8231 -> 8231 bytes .../android/splash/drawable-land-hdpi-screen.png | Bin 17726 -> 17726 bytes .../android/splash/drawable-land-ldpi-screen.png | Bin 6771 -> 6771 bytes .../android/splash/drawable-land-mdpi-screen.png | Bin 10105 -> 10105 bytes .../android/splash/drawable-land-xhdpi-screen.png | Bin 30192 -> 30192 bytes .../android/splash/drawable-land-xxhdpi-screen.png | Bin 40693 -> 40693 bytes .../splash/drawable-land-xxxhdpi-screen.png | Bin 53718 -> 53718 bytes .../android/splash/drawable-port-hdpi-screen.png | Bin 18160 -> 18160 bytes .../android/splash/drawable-port-ldpi-screen.png | Bin 6903 -> 6903 bytes .../android/splash/drawable-port-mdpi-screen.png | Bin 10366 -> 10366 bytes .../android/splash/drawable-port-xhdpi-screen.png | Bin 31026 -> 31026 bytes .../android/splash/drawable-port-xxhdpi-screen.png | Bin 41584 -> 41584 bytes .../splash/drawable-port-xxxhdpi-screen.png | Bin 54940 -> 54940 bytes www/js/EventModalCtrl.js | 72 ++++++++++++++++++--- www/js/NVR.js | 2 +- www/templates/events-modal.html | 23 +++++++ 24 files changed, 97 insertions(+), 18 deletions(-) diff --git a/build_android.sh b/build_android.sh index 64dc7a5c..290daf2b 100755 --- a/build_android.sh +++ b/build_android.sh @@ -1,5 +1,5 @@ #!/bin/bash -SDK_VERSION='29.0.1' +SDK_VERSION='29.0.2' build_debug() { diff --git a/config.xml b/config.xml index 5b68627f..d13597cf 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + zmNinja High performance ZoneMinder client @@ -177,8 +177,8 @@ - + diff --git a/package.json b/package.json index 7a8cc3e9..c72cc491 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,14 @@ { "name": "zmninjapro", "description": "Home security mobile app for ZoneMinder", - "version": "1.3.075", + "version": "1.3.076", "displayName": "zmNinja", "author": "Pliable Pixels", "license": "custom see LICENSE.md", "cordova": { "platforms": [ - "android", - "ios" + "ios", + "android" ], "plugins": { "cordova-plugin-add-swift-support": {}, @@ -25,7 +25,6 @@ "cordova-plugin-inappbrowser": {}, "cordova-plugin-insomnia": {}, "cordova-plugin-pin-dialog": {}, - "cordova-plugin-splashscreen": {}, "cordova-plugin-whitelist": {}, "cordova-sqlite-storage": {}, "cordova-plugin-touch-id": { @@ -57,6 +56,7 @@ "PHOTO_LIBRARY_USAGE_DESCRIPTION": "Save monitor photos to albums " }, "cordova-plugin-media-pp-fork": {}, + "cordova-plugin-splashscreen": {}, "cordova-plugin-ionic-webview": { "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+" } @@ -64,7 +64,7 @@ }, "dependencies": { "clivas": "^0.2.0", - "cordova-android": "7.1.4", + "cordova-android": "8.0.0", "cordova-custom-config": "^5.1.0", "cordova-ios": "4.5.5", "cordova-library-helper-pp-fork": "^1.0.1", @@ -90,7 +90,7 @@ "cordova-plugin-network-information": "^2.0.1", "cordova-plugin-photo-library": "git+https://github.com/nilebma/cordova-plugin-photo-library.git", "cordova-plugin-pin-dialog": "^0.1.3", - "cordova-plugin-splashscreen": "^4.1.0", + "cordova-plugin-splashscreen": "git+https://github.com/prageeth/cordova-plugin-splashscreen.git", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-touch-id": "^3.4.0", "cordova-plugin-whitelist": "^1.3.3", diff --git a/resources/android/icon/drawable-hdpi-icon.png b/resources/android/icon/drawable-hdpi-icon.png index 9fd9692e..70e1de37 100644 Binary files a/resources/android/icon/drawable-hdpi-icon.png and b/resources/android/icon/drawable-hdpi-icon.png differ diff --git a/resources/android/icon/drawable-ldpi-icon.png b/resources/android/icon/drawable-ldpi-icon.png index a2b3b90f..cca94ee1 100644 Binary files a/resources/android/icon/drawable-ldpi-icon.png and b/resources/android/icon/drawable-ldpi-icon.png differ diff --git a/resources/android/icon/drawable-mdpi-icon.png b/resources/android/icon/drawable-mdpi-icon.png index 1a724f6e..86a22aa5 100644 Binary files a/resources/android/icon/drawable-mdpi-icon.png and b/resources/android/icon/drawable-mdpi-icon.png differ diff --git a/resources/android/icon/drawable-xhdpi-icon.png b/resources/android/icon/drawable-xhdpi-icon.png index 22155bf4..aef732ed 100644 Binary files a/resources/android/icon/drawable-xhdpi-icon.png and b/resources/android/icon/drawable-xhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxhdpi-icon.png b/resources/android/icon/drawable-xxhdpi-icon.png index b5710c9b..eaef24ee 100644 Binary files a/resources/android/icon/drawable-xxhdpi-icon.png and b/resources/android/icon/drawable-xxhdpi-icon.png differ diff --git a/resources/android/icon/drawable-xxxhdpi-icon.png b/resources/android/icon/drawable-xxxhdpi-icon.png index a0e3e582..8e38897e 100644 Binary files a/resources/android/icon/drawable-xxxhdpi-icon.png and b/resources/android/icon/drawable-xxxhdpi-icon.png differ diff --git a/resources/android/splash/drawable-land-hdpi-screen.png b/resources/android/splash/drawable-land-hdpi-screen.png index cee9c53c..d7abdcb6 100644 Binary files a/resources/android/splash/drawable-land-hdpi-screen.png and b/resources/android/splash/drawable-land-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-ldpi-screen.png b/resources/android/splash/drawable-land-ldpi-screen.png index 594b7526..e36f21d7 100644 Binary files a/resources/android/splash/drawable-land-ldpi-screen.png and b/resources/android/splash/drawable-land-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-land-mdpi-screen.png b/resources/android/splash/drawable-land-mdpi-screen.png index 58d71a35..723e37a0 100644 Binary files a/resources/android/splash/drawable-land-mdpi-screen.png and b/resources/android/splash/drawable-land-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xhdpi-screen.png b/resources/android/splash/drawable-land-xhdpi-screen.png index a7f1eedd..e657ecaa 100644 Binary files a/resources/android/splash/drawable-land-xhdpi-screen.png and b/resources/android/splash/drawable-land-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxhdpi-screen.png b/resources/android/splash/drawable-land-xxhdpi-screen.png index 7f6183b7..6ed767e4 100644 Binary files a/resources/android/splash/drawable-land-xxhdpi-screen.png and b/resources/android/splash/drawable-land-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-land-xxxhdpi-screen.png b/resources/android/splash/drawable-land-xxxhdpi-screen.png index 091a059e..92044db2 100644 Binary files a/resources/android/splash/drawable-land-xxxhdpi-screen.png and b/resources/android/splash/drawable-land-xxxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-hdpi-screen.png b/resources/android/splash/drawable-port-hdpi-screen.png index 893f0033..a4ce3644 100644 Binary files a/resources/android/splash/drawable-port-hdpi-screen.png and b/resources/android/splash/drawable-port-hdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-ldpi-screen.png b/resources/android/splash/drawable-port-ldpi-screen.png index 4f19d48f..5721aa5f 100644 Binary files a/resources/android/splash/drawable-port-ldpi-screen.png and b/resources/android/splash/drawable-port-ldpi-screen.png differ diff --git a/resources/android/splash/drawable-port-mdpi-screen.png b/resources/android/splash/drawable-port-mdpi-screen.png index c7ef1558..1233eed1 100644 Binary files a/resources/android/splash/drawable-port-mdpi-screen.png and b/resources/android/splash/drawable-port-mdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xhdpi-screen.png b/resources/android/splash/drawable-port-xhdpi-screen.png index bd3e32ee..0c5291a2 100644 Binary files a/resources/android/splash/drawable-port-xhdpi-screen.png and b/resources/android/splash/drawable-port-xhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxhdpi-screen.png b/resources/android/splash/drawable-port-xxhdpi-screen.png index 1f020189..65084e07 100644 Binary files a/resources/android/splash/drawable-port-xxhdpi-screen.png and b/resources/android/splash/drawable-port-xxhdpi-screen.png differ diff --git a/resources/android/splash/drawable-port-xxxhdpi-screen.png b/resources/android/splash/drawable-port-xxxhdpi-screen.png index afed96a3..c52441b9 100644 Binary files a/resources/android/splash/drawable-port-xxxhdpi-screen.png and b/resources/android/splash/drawable-port-xxxhdpi-screen.png differ diff --git a/www/js/EventModalCtrl.js b/www/js/EventModalCtrl.js index ce884f9e..bce632ed 100644 --- a/www/js/EventModalCtrl.js +++ b/www/js/EventModalCtrl.js @@ -13,6 +13,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro ACTIVE: 2, // using zms STOPPED: 3 // starts off in this mode }; + + // from parent scope var currentEvent = $scope.currentEvent; var nphTimer; @@ -30,6 +32,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro var isSnapShotEnabled = false; var playState = 'play'; + $scope.useFilters = true; var broadcastHandles = []; @@ -48,7 +51,8 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro var frameoptions = []; - var eventImageDigits = 5; // failsafe + + var eventImageDigits = 5; // failsafe $scope.currentProgress = { progress: 0 }; @@ -1106,6 +1110,7 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro NVR.debug("If recording is in progress, live feed will be shown"); } $scope.isToggleListMenu = true; + $scope.isToggleListEventParamsMenu = false; $scope.videoDynamicTime = ""; $scope.videoIsReady = false; var ld = NVR.getLogin(); @@ -1330,6 +1335,44 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro ); + }; + + $scope.toggleFilters = function () { + $scope.useFilters=!$scope.useFilters; + $scope.nextId = "..."; + $scope.prevId = "..."; + neighborEvents($scope.eventId) + .then(function (success) { + $scope.nextId = success.next; + $scope.prevId = success.prev; + }, + function (error) { + //console.log(JSON.stringify(error)); + }); + + }; + + $scope.toggleFollowSameMonitor = function () { + + if ($scope.followSameMonitor == '1') { + NVR.debug ('followSame Monitor was 1, making null'); + $scope.followSameMonitor = ''; + } else { + NVR.debug ('followSame Monitor was null, making 1'); + $scope.followSameMonitor = '1'; + } + $scope.nextId = "..."; + $scope.prevId = "..."; + neighborEvents($scope.eventId) + .then(function (success) { + $scope.nextId = success.next; + $scope.prevId = success.prev; + }, + function (error) { + //console.log(JSON.stringify(error)); + }); + + }; $scope.toggleListMenu = function () { @@ -1337,6 +1380,13 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro $scope.isToggleListMenu = !$scope.isToggleListMenu; }; + $scope.toggleListEventParamsMenu = function () { + + $scope.isToggleListEventParamsMenu = !$scope.isToggleListEventParamsMenu; + }; + + + $scope.toggleGapless = function () { // console.log(">>>>>>>>>>>>>>GAPLESS TOGGLE INSIDE MODAL"); $scope.loginData.gapless = !$scope.loginData.gapless; @@ -1392,16 +1442,22 @@ angular.module('zmApp.controllers').controller('EventModalCtrl', ['$scope', '$ro var loginData = NVR.getLogin(); var nextEvent = loginData.apiurl + "/events/index" + "/StartTime >: " + currentEvent.Event.StartTime + - ($scope.followSameMonitor == '1' ? "/MonitorId =: " + currentEvent.Monitor.Id : "") + - "/AlarmFrames >=: " + (loginData.enableAlarmCount ? loginData.minAlarmCount : 0) + - ".json?sort=StartTime&direction=asc&limit=1"+$rootScope.authSession; - + ($scope.followSameMonitor == '1' ? "/MonitorId =: " + currentEvent.Monitor.Id : "") ; + if ($scope.useFilters) { + nextEvent = nextEvent + "/AlarmFrames >=: " + (loginData.enableAlarmCount ? loginData.minAlarmCount : 0); + } + nextEvent = nextEvent + ".json?sort=StartTime&direction=asc&limit=1"+$rootScope.authSession; + var prevEvent = loginData.apiurl + "/events/index" + "/StartTime <: " + currentEvent.Event.StartTime + - ($scope.followSameMonitor == '1' ? "/MonitorId =: " + currentEvent.Monitor.Id : "") + - "/AlarmFrames >=: " + (loginData.enableAlarmCount ? loginData.minAlarmCount : 0) + - ".json?sort=StartTime&direction=desc&limit=1"+$rootScope.authSession; + ($scope.followSameMonitor == '1' ? "/MonitorId =: " + currentEvent.Monitor.Id : ""); + + if ($scope.useFilters) { + prevEvent = prevEvent + "/AlarmFrames >=: " + (loginData.enableAlarmCount ? loginData.minAlarmCount : 0); + } + prevEvent = prevEvent + ".json?sort=StartTime&direction=desc&limit=1"+$rootScope.authSession; + NVR.debug("Neighbor next URL=" + nextEvent); diff --git a/www/js/NVR.js b/www/js/NVR.js index d785683a..b86c4676 100644 --- a/www/js/NVR.js +++ b/www/js/NVR.js @@ -21,7 +21,7 @@ angular.module('zmApp.controllers') DO NOT TOUCH zmAppVersion It is changed by sync_version.sh */ - var zmAppVersion = "1.3.075"; + var zmAppVersion = "1.3.076"; var isBackground = false; var justResumed = false; var timeSinceResumed = -1; diff --git a/www/templates/events-modal.html b/www/templates/events-modal.html index 073beb60..466cd18e 100644 --- a/www/templates/events-modal.html +++ b/www/templates/events-modal.html @@ -155,6 +155,29 @@  {{videoDynamicTime}} ({{humanizeTime}}) [{{d_eventId}}] {{eventWarning}} + + +
  • -- cgit v1.2.3