Small bug fixes

This commit is contained in:
brantje 2016-09-26 20:12:14 +02:00
parent 46b82a5b1d
commit 096d97e7a9
5 changed files with 6 additions and 7 deletions

View file

@ -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

View file

@ -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!');
}

View file

@ -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);
});
});

View file

@ -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',
'<div ng-controller="ImportCtrl"><div class="row"><div class="col-xs-6"><label>Import type<select ng-init="importerType" ng-model="importerType" ng-change="setImporter(importerType)"><option ng-repeat="importer in available_importers" value="{{importer}}">{{importer.name}}</option></select></label><div><b>{{selectedImporter.description}}</b></div><input ng-if="selectedImporter" type="file" file-select success="fileLoaded" error="fileLoadError" progress="fileSelectProgress"><br><button class="button" ng-click="startImport()" ng-if="selectedImporter">Import</button><div ng-if="file_read_progress.percent > 0">Read progress<div progress-bar="file_read_progress.percent"></div><br>{{ file_read_progress.loaded }} / {{ file_read_progress.total }}</div><div ng-if="import_progress.progress > 0">Upload progress<div progress-bar="import_progress.progress"></div><br>{{ import_progress.loaded }} / {{ import_progress.total }}</div></div><div class="col-xs-6"><div ng-if="log" class="import_log"><textarea id="import_log" auto-scroll="log">{{log.join(\'\\n\')}}</textarea></div></div></div></div>');
'<div ng-controller="ImportCtrl"><div class="row"><div class="col-xs-6"><label>Import type<select ng-init="importerType" ng-model="importerType" ng-change="setImporter(importerType)"><option ng-repeat="importer in available_importers" value="{{importer}}">{{importer.name}}</option></select></label><div><b>{{selectedImporter.description}}</b></div><input ng-if="selectedImporter" type="file" file-select success="fileLoaded" error="fileLoadError" progress="fileSelectProgress"><br><button class="button" ng-click="startImport()" ng-if="selectedImporter">Import</button><div ng-if="file_read_progress.percent > 0">Read progress<div progress-bar="file_read_progress.percent"></div>{{ file_read_progress.loaded }} / {{ file_read_progress.total }}</div><div ng-if="import_progress.progress > 0">Upload progress<div progress-bar="import_progress.progress"></div>{{ import_progress.loaded }} / {{ import_progress.total }}</div></div><div class="col-xs-6"><div ng-if="log" class="import_log"><textarea id="import_log" auto-scroll="log">{{log.join(\'\\n\')}}</textarea></div></div></div></div>');
}]);
angular.module('views/partials/forms/settings/sharing.html', []).run(['$templateCache', function($templateCache) {

View file

@ -20,13 +20,11 @@
<div ng-if="file_read_progress.percent > 0">
Read progress
<div progress-bar="file_read_progress.percent"></div>
<br />
{{ file_read_progress.loaded }} / {{ file_read_progress.total }}
</div>
<div ng-if="import_progress.progress > 0">
Upload progress
<div progress-bar="import_progress.progress"></div>
<br />
{{ import_progress.loaded }} / {{ import_progress.total }}
</div>
</div>