diff --git a/js/app/controllers/credential.js b/js/app/controllers/credential.js
index bd4b93f9..c1ad718d 100644
--- a/js/app/controllers/credential.js
+++ b/js/app/controllers/credential.js
@@ -8,7 +8,7 @@
* Controller of the passmanApp
*/
angular.module('passmanApp')
- .controller('CredentialCtrl', ['$scope', 'VaultService', 'SettingsService', '$location', 'CredentialService', '$rootScope', function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope) {
+ .controller('CredentialCtrl', ['$scope', 'VaultService', 'SettingsService', '$location', 'CredentialService', '$rootScope','EncryptService', function ($scope, VaultService, SettingsService, $location, CredentialService, $rootScope, EncryptService) {
$scope.active_vault = VaultService.getActiveVault();
if (!SettingsService.getSetting('defaultVault') || !SettingsService.getSetting('defaultVaultPass')) {
if (!$scope.active_vault) {
@@ -40,7 +40,7 @@ angular.module('passmanApp')
$scope.selectedCredential = false;
$scope.selectCredential = function (credential) {
console.log(credential);
- $scope.selectedCredential = credential
+ $scope.selectedCredential = CredentialService.decryptCredential(angular.copy(credential));
}
$rootScope.$on('logout', function () {
diff --git a/js/app/filters/decrypt.js b/js/app/filters/decrypt.js
index 97ae1792..ff2699b1 100644
--- a/js/app/filters/decrypt.js
+++ b/js/app/filters/decrypt.js
@@ -12,7 +12,9 @@ angular.module('passmanApp')
.filter('decrypt',['EncryptService', function (EncryptService) {
return function (input) {
if(input) {
- return EncryptService.decryptString(input);
+ var string = EncryptService.decryptString(input).toString();
+ console.log(string);
+ return string;
}
};
}]);
diff --git a/js/templates.js b/js/templates.js
index 2b0b2283..bf92e075 100644
--- a/js/templates.js
+++ b/js/templates.js
@@ -47,7 +47,7 @@ angular.module('views/partials/password-meter.html', []).run(['$templateCache',
angular.module('views/show_vault.html', []).run(['$templateCache', function($templateCache) {
'use strict';
$templateCache.put('views/show_vault.html',
- '
{{credential.label}} Tag 1 Tag 2 Tag 4 Tag 4 Long tag xD |
Label
{{selectedCredential.label}}
Account
{{selectedCredential.label}}
Password
{{selectedCredential.label}}
Files
{{selectedCredential.label}}
Custom fields
{{selectedCredential.label}}
Changed
{{selectedCredential.label}}
Created
{{selectedCredential.label}}
');
+ '{{credential.label}} Tag 1 Tag 2 Tag 4 Tag 4 Long tag xD |
Label
{{selectedCredential.label}}
Account
{{selectedCredential.username}}
Password
{{selectedCredential.password}}
E-mail
{{selectedCredential.email}}
Files
{{file.filename}} ({{file.size}})
{{field.label}}
{{field.value}} {{field.secret}}
Changed
{{selectedCredential.changed * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
Created
{{selectedCredential.created * 1000 | date:\'dd-MM-yyyy @ HH:mm:ss\'}}
');
}]);
angular.module('views/vaults.html', []).run(['$templateCache', function($templateCache) {
diff --git a/templates/views/show_vault.html b/templates/views/show_vault.html
index 95eb3047..04fcc9eb 100644
--- a/templates/views/show_vault.html
+++ b/templates/views/show_vault.html
@@ -67,7 +67,7 @@
-
+
Label
@@ -75,52 +75,64 @@
-
+
Account
- {{selectedCredential.label}}
+ {{selectedCredential.username}}
-
+
Password
- {{selectedCredential.label}}
+ {{selectedCredential.password}}
-
+
+ E-mail
+
+
+ {{selectedCredential.email}}
+
+
+
+
+
Files
- {{selectedCredential.label}}
+
+ {{file.filename}} ({{file.size}})
+
-
-
- Custom fields
+
+
+ {{field.label}}
- {{selectedCredential.label}}
+ {{field.value}}
+ {{field.secret}}
-
+
Changed
- {{selectedCredential.label}}
+ {{selectedCredential.changed * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}
-
+
Created
- {{selectedCredential.label}}
+ {{selectedCredential.created * 1000 | date:'dd-MM-yyyy @ HH:mm:ss'}}