From 8a90f562ef9eebf142c1aca398b7014b2cf7bf87 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 6 Jul 2017 21:22:06 -0400 Subject: [PATCH] add field for totp to login --- src/app/directives/passwordMeterDirective.js | 5 +++-- src/app/services/cipherService.js | 4 +++- src/app/vault/views/vaultAddLogin.html | 17 +++++++++++++++-- src/app/vault/views/vaultEditLogin.html | 18 +++++++++++++++--- 4 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/app/directives/passwordMeterDirective.js b/src/app/directives/passwordMeterDirective.js index 15b6e86fcd..9b8e79b8e9 100644 --- a/src/app/directives/passwordMeterDirective.js +++ b/src/app/directives/passwordMeterDirective.js @@ -3,14 +3,15 @@ angular .directive('passwordMeter', function () { return { - template: '
{{value}}%
', restrict: 'A', scope: { password: '=passwordMeter', username: '=passwordMeterUsername', - outerClass: '@?' + outerClass: '@?', + outerStyle: '@?' }, link: function (scope) { var measureStrength = function (username, password) { diff --git a/src/app/services/cipherService.js b/src/app/services/cipherService.js index 9d35047564..d357044cbc 100644 --- a/src/app/services/cipherService.js +++ b/src/app/services/cipherService.js @@ -36,6 +36,7 @@ angular username: encryptedLogin.Username && encryptedLogin.Username !== '' ? cryptoService.decrypt(encryptedLogin.Username, key) : null, password: encryptedLogin.Password && encryptedLogin.Password !== '' ? cryptoService.decrypt(encryptedLogin.Password, key) : null, notes: encryptedLogin.Notes && encryptedLogin.Notes !== '' ? cryptoService.decrypt(encryptedLogin.Notes, key) : null, + totp: encryptedLogin.Totp && encryptedLogin.Totp !== '' ? cryptoService.decrypt(encryptedLogin.Totp, key) : null, attachments: null }; @@ -183,7 +184,8 @@ angular name: cryptoService.encrypt(unencryptedLogin.name, key), username: !unencryptedLogin.username || unencryptedLogin.username === '' ? null : cryptoService.encrypt(unencryptedLogin.username, key), password: !unencryptedLogin.password || unencryptedLogin.password === '' ? null : cryptoService.encrypt(unencryptedLogin.password, key), - notes: !unencryptedLogin.notes || unencryptedLogin.notes === '' ? null : cryptoService.encrypt(unencryptedLogin.notes, key) + notes: !unencryptedLogin.notes || unencryptedLogin.notes === '' ? null : cryptoService.encrypt(unencryptedLogin.notes, key), + totp: !unencryptedLogin.totp || unencryptedLogin.totp === '' ? null : cryptoService.encrypt(unencryptedLogin.totp, key) }; }; diff --git a/src/app/vault/views/vaultAddLogin.html b/src/app/vault/views/vaultAddLogin.html index b6af60a973..97e3dda6e7 100644 --- a/src/app/vault/views/vaultAddLogin.html +++ b/src/app/vault/views/vaultAddLogin.html @@ -56,7 +56,7 @@
-
+
@@ -75,7 +75,20 @@
-
+
+
+
+
+
+
+ + +
+
+
+
diff --git a/src/app/vault/views/vaultEditLogin.html b/src/app/vault/views/vaultEditLogin.html index 39fe76db8b..2d09f53b74 100644 --- a/src/app/vault/views/vaultEditLogin.html +++ b/src/app/vault/views/vaultEditLogin.html @@ -67,7 +67,7 @@
-
+
@@ -87,8 +87,20 @@
-
+
+
+
+
+
+
+ + +
+
+
+