diff --git a/src/_locales/en/messages.json b/src/_locales/en/messages.json index 52b100e324..afd88010fb 100644 --- a/src/_locales/en/messages.json +++ b/src/_locales/en/messages.json @@ -946,11 +946,8 @@ "typeIdentity": { "message": "Identity" }, - "viewPasswordHistory": { - "message": "View Password History" - }, - "generatePasswordHistory": { - "message": "Generated Passwords History" + "passwordHistory": { + "message": "Password History" }, "back": { "message": "Back" diff --git a/src/popup/app/accounts/views/accountsHint.html b/src/popup/app/accounts/views/accountsHint.html index fc4ccdb21b..7a36bc4549 100644 --- a/src/popup/app/accounts/views/accountsHint.html +++ b/src/popup/app/accounts/views/accountsHint.html @@ -1,7 +1,7 @@ 
diff --git a/src/popup/app/accounts/views/accountsLoginTwoFactor.html b/src/popup/app/accounts/views/accountsLoginTwoFactor.html index f67db02c98..f1e0a0b11b 100644 --- a/src/popup/app/accounts/views/accountsLoginTwoFactor.html +++ b/src/popup/app/accounts/views/accountsLoginTwoFactor.html @@ -2,7 +2,7 @@ ng-if="providerType === constantsProvider.authenticator || providerType === constantsProvider.email">
@@ -47,7 +47,7 @@ @@ -75,7 +75,7 @@ autocomplete="off">
@@ -112,7 +112,7 @@
@@ -147,7 +147,7 @@
{{i18n.loginUnavailable}}
diff --git a/src/popup/app/settings/views/settingsAbout.html b/src/popup/app/settings/views/settingsAbout.html index c60074af48..afa873417d 100644 --- a/src/popup/app/settings/views/settingsAbout.html +++ b/src/popup/app/settings/views/settingsAbout.html @@ -1,6 +1,6 @@  diff --git a/src/popup/app/settings/views/settingsCredits.html b/src/popup/app/settings/views/settingsCredits.html index ad31781a4c..f75f5c6718 100644 --- a/src/popup/app/settings/views/settingsCredits.html +++ b/src/popup/app/settings/views/settingsCredits.html @@ -1,6 +1,6 @@ 
{{i18n.thankYou}}
diff --git a/src/popup/app/settings/views/settingsFeatures.html b/src/popup/app/settings/views/settingsFeatures.html index 18bc5c7a28..5e5a8e1e7e 100644 --- a/src/popup/app/settings/views/settingsFeatures.html +++ b/src/popup/app/settings/views/settingsFeatures.html @@ -1,6 +1,6 @@ 
{{i18n.features}}
diff --git a/src/popup/app/settings/views/settingsFolders.html b/src/popup/app/settings/views/settingsFolders.html index 508fb17f3c..3c912c0049 100644 --- a/src/popup/app/settings/views/settingsFolders.html +++ b/src/popup/app/settings/views/settingsFolders.html @@ -1,6 +1,6 @@ 
diff --git a/src/popup/app/settings/views/settingsHelp.html b/src/popup/app/settings/views/settingsHelp.html index 9c16cf51ed..75fcb89364 100644 --- a/src/popup/app/settings/views/settingsHelp.html +++ b/src/popup/app/settings/views/settingsHelp.html @@ -1,6 +1,6 @@ 
{{i18n.helpFeedback}}
diff --git a/src/popup/app/settings/views/settingsPremium.html b/src/popup/app/settings/views/settingsPremium.html index 475c600bbc..647f23a525 100644 --- a/src/popup/app/settings/views/settingsPremium.html +++ b/src/popup/app/settings/views/settingsPremium.html @@ -1,6 +1,6 @@ 
{{i18n.premiumMembership}}
diff --git a/src/popup/app/settings/views/settingsSync.html b/src/popup/app/settings/views/settingsSync.html index 0f2c28e4ff..0fc18c60da 100644 --- a/src/popup/app/settings/views/settingsSync.html +++ b/src/popup/app/settings/views/settingsSync.html @@ -1,6 +1,6 @@  diff --git a/src/popup/app/tools/toolsPasswordGeneratorController.js b/src/popup/app/tools/toolsPasswordGeneratorController.js index a9498293b7..19da18ea60 100644 --- a/src/popup/app/tools/toolsPasswordGeneratorController.js +++ b/src/popup/app/tools/toolsPasswordGeneratorController.js @@ -2,7 +2,7 @@ .module('bit.tools') .controller('toolsPasswordGeneratorController', function ($scope, $state, $stateParams, passwordGenerationService, - toastr, $q, utilsService, $analytics, i18nService) { + toastr, utilsService, $analytics, i18nService) { $scope.i18n = i18nService; var addState = $stateParams.addState, editState = $stateParams.editState; @@ -12,10 +12,11 @@ utilsService.initListSectionItemListeners($(document), angular); $scope.password = '-'; - $q.when(passwordGenerationService.getOptions()).then(function (options) { + passwordGenerationService.getOptions().then(function (options) { $scope.options = options; $scope.regenerate(false); $analytics.eventTrack('Generated Password'); + passwordGenerationService.addHistory($scope.password); }); $scope.sliderMoved = function () { @@ -26,14 +27,16 @@ e.preventDefault(); $analytics.eventTrack('Generated Password'); $scope.saveOptions($scope.options); + passwordGenerationService.addHistory($scope.password); }); - $scope.regenerate = function (trackRegenerateEvent) { - if (trackRegenerateEvent) { - $analytics.eventTrack('Regenerated Password'); - } - + $scope.regenerate = function (trackEvent) { $scope.password = passwordGenerationService.generatePassword($scope.options); + + if (trackEvent) { + $analytics.eventTrack('Regenerated Password'); + passwordGenerationService.addHistory($scope.password); + } }; $scope.saveOptions = function (options) { @@ -57,7 +60,6 @@ }; $scope.clipboardSuccess = function (e) { - passwordGenerationService.addHistory(e.text); $analytics.eventTrack('Copied Generated Password'); e.clearSelection(); toastr.info(i18nService.passwordCopied); diff --git a/src/popup/app/tools/toolsPasswordGeneratorHistoryController.js b/src/popup/app/tools/toolsPasswordGeneratorHistoryController.js index b1627ad697..fa0c258571 100644 --- a/src/popup/app/tools/toolsPasswordGeneratorHistoryController.js +++ b/src/popup/app/tools/toolsPasswordGeneratorHistoryController.js @@ -1,10 +1,9 @@ angular .module('bit.tools') - .controller('toolsPasswordGeneratorHistoryController', function ( - $scope, $state, $stateParams, toastr, $analytics, i18nService, passwordGenerationService) { + .controller('toolsPasswordGeneratorHistoryController', function ($scope, $state, $stateParams, toastr, $analytics, + i18nService, passwordGenerationService) { $scope.i18n = i18nService; - $scope.passwords = passwordGenerationService.getHistory(); $scope.clipboardError = function (e, password) { diff --git a/src/popup/app/tools/views/toolsPasswordGenerator.html b/src/popup/app/tools/views/toolsPasswordGenerator.html index c1be065a3b..e322c81137 100644 --- a/src/popup/app/tools/views/toolsPasswordGenerator.html +++ b/src/popup/app/tools/views/toolsPasswordGenerator.html @@ -22,7 +22,7 @@ {{i18n.copyPassword}} - {{i18n.viewPasswordHistory}} + {{i18n.passwordHistory}}
diff --git a/src/popup/app/tools/views/toolsPasswordGeneratorHistory.html b/src/popup/app/tools/views/toolsPasswordGeneratorHistory.html index f56b957c1b..d08630bd40 100644 --- a/src/popup/app/tools/views/toolsPasswordGeneratorHistory.html +++ b/src/popup/app/tools/views/toolsPasswordGeneratorHistory.html @@ -1,26 +1,24 @@
-
{{i18n.generatePasswordHistory}}
+
{{i18n.passwordHistory}}
-
-
-
-
-
- - - -
- - {{password.password}} +
+
+
+
+ + - {{password.date | date}}
+ + {{password.password}} + + {{password.date | date: 'medium'}}
diff --git a/src/popup/app/vault/views/vaultViewFolder.html b/src/popup/app/vault/views/vaultViewFolder.html index 451e0facd5..da91ed6f1a 100644 --- a/src/popup/app/vault/views/vaultViewFolder.html +++ b/src/popup/app/vault/views/vaultViewFolder.html @@ -1,6 +1,6 @@