1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

password history

This commit is contained in:
Kyle Spearrin
2018-02-17 22:37:43 -05:00
parent 22d5b23e5b
commit 8dafca3706
8 changed files with 119 additions and 29 deletions

View File

@@ -15,7 +15,7 @@ import { PasswordGenerationService } from 'jslib/abstractions/passwordGeneration
import { PlatformUtilsService } from 'jslib/abstractions/platformUtils.service';
@Component({
selector: 'password-generator',
selector: 'app-password-generator',
template: template,
})
export class PasswordGeneratorComponent implements OnInit {
@@ -60,14 +60,13 @@ export class PasswordGeneratorComponent implements OnInit {
await this.passwordGenerationService.saveOptions(this.options);
if (regenerate) {
this.password = this.passwordGenerationService.generatePassword(this.options);
await this.passwordGenerationService.addHistory(this.password);
this.analytics.eventTrack.next({ action: 'Regenerated Password' });
await this.regenerate();
}
}
regenerate() {
async regenerate() {
this.password = this.passwordGenerationService.generatePassword(this.options);
await this.passwordGenerationService.addHistory(this.password);
this.analytics.eventTrack.next({ action: 'Regenerated Password' });
}