From 096d97e7a9b695e3ab1ffde9c5e566d80c7c09dd Mon Sep 17 00:00:00 2001 From: brantje Date: Mon, 26 Sep 2016 20:12:14 +0200 Subject: [PATCH] Small bug fixes --- appinfo/routes.php | 1 + js/app/controllers/import.js | 4 ++-- js/importers/importer-randomdata.js | 4 ++-- js/templates.js | 2 +- templates/views/partials/forms/settings/import.html | 2 -- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 54a8b904..07439625 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -27,6 +27,7 @@ return [ ['name' => 'vault#get', 'url' => '/api/v2/vaults/{vault_id}', 'verb' => 'GET'], ['name' => 'vault#update', 'url' => '/api/v2/vaults/{vault_id}', 'verb' => 'PATCH'], ['name' => 'vault#delete', 'url' => '/api/v2/vaults/{vault_id}', 'verb' => 'DELETE'], + //@TODO make frontend use PATCH ['name' => 'vault#updateSharingKeys', 'url' => '/api/v2/vaults/{vault_id}/sharing-keys', 'verb' => 'POST'], //Credential diff --git a/js/app/controllers/import.js b/js/app/controllers/import.js index 1d2cdb0f..91eed59d 100644 --- a/js/app/controllers/import.js +++ b/js/app/controllers/import.js @@ -85,8 +85,8 @@ angular.module('passmanApp') } else { $scope.import_progress = { progress: 100, - loaded: parsed_data.length-1, - total: parsed_data.length-1 + loaded: parsed_data.length, + total: parsed_data.length }; _log('DONE!'); } diff --git a/js/importers/importer-randomdata.js b/js/importers/importer-randomdata.js index 062443a7..a9eb350a 100644 --- a/js/importers/importer-randomdata.js +++ b/js/importers/importer-randomdata.js @@ -57,7 +57,7 @@ PassmanImporter.randomData.readFile = function (file_data, callback) { } } credential_list.push(_credential); - if (i <= max) { + if (i < max) { var progress = { percent: i / max * 100, loaded: i, @@ -74,7 +74,7 @@ PassmanImporter.randomData.readFile = function (file_data, callback) { }; - generateCredential(10, 1, function (credential_list) { + generateCredential(350, 1, function (credential_list) { _this.call_then(credential_list); }); }); diff --git a/js/templates.js b/js/templates.js index 88aa0c12..da4c3ad1 100644 --- a/js/templates.js +++ b/js/templates.js @@ -57,7 +57,7 @@ angular.module('views/partials/forms/settings/general_settings.html', []).run([' angular.module('views/partials/forms/settings/import.html', []).run(['$templateCache', function($templateCache) { 'use strict'; $templateCache.put('views/partials/forms/settings/import.html', - '
{{selectedImporter.description}}

Read progress

{{ file_read_progress.loaded }} / {{ file_read_progress.total }}
Upload progress

{{ import_progress.loaded }} / {{ import_progress.total }}
'); + '
{{selectedImporter.description}}

Read progress
{{ file_read_progress.loaded }} / {{ file_read_progress.total }}
Upload progress
{{ import_progress.loaded }} / {{ import_progress.total }}
'); }]); angular.module('views/partials/forms/settings/sharing.html', []).run(['$templateCache', function($templateCache) { diff --git a/templates/views/partials/forms/settings/import.html b/templates/views/partials/forms/settings/import.html index 2aaa9daf..31321695 100644 --- a/templates/views/partials/forms/settings/import.html +++ b/templates/views/partials/forms/settings/import.html @@ -20,13 +20,11 @@
Read progress
-
{{ file_read_progress.loaded }} / {{ file_read_progress.total }}
Upload progress
-
{{ import_progress.loaded }} / {{ import_progress.total }}