1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 18:53:29 +00:00

data breach report

This commit is contained in:
Kyle Spearrin
2018-06-28 11:58:33 -04:00
parent 0ec9045849
commit ce96a32af3
7 changed files with 148 additions and 3 deletions

View File

@@ -0,0 +1,32 @@
import {
Component,
OnInit,
} from '@angular/core';
import { AuditService } from 'jslib/abstractions/audit.service';
import { UserService } from 'jslib/abstractions/user.service';
import { BreachAccountResponse } from 'jslib/models/response/breachAccountResponse';
@Component({
selector: 'app-breach-report',
templateUrl: 'breach-report.component.html',
})
export class BreachReportComponent implements OnInit {
loading = true;
error = false;
email: string;
breachedAccounts: BreachAccountResponse[] = [];
constructor(private auditService: AuditService, private userService: UserService) { }
async ngOnInit() {
this.loading = true;
try {
this.email = await this.userService.getEmail();
this.breachedAccounts = await this.auditService.breachedAccounts(this.email);
} catch {
this.error = true;
}
this.loading = false;
}
}