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

premium checks on reports

This commit is contained in:
Kyle Spearrin
2018-12-12 09:29:51 -05:00
parent 93c291dba1
commit cb953eda61
9 changed files with 71 additions and 23 deletions

View File

@@ -1,10 +1,13 @@
import {
Component,
ComponentFactoryResolver,
OnInit,
} from '@angular/core';
import { AuditService } from 'jslib/abstractions/audit.service';
import { CipherService } from 'jslib/abstractions/cipher.service';
import { MessagingService } from 'jslib/abstractions/messaging.service';
import { UserService } from 'jslib/abstractions/user.service';
import { CipherView } from 'jslib/models/view/cipherView';
@@ -16,12 +19,23 @@ import { CipherReportComponent } from './cipher-report.component';
selector: 'app-exposed-passwords-report',
templateUrl: 'exposed-passwords-report.component.html',
})
export class ExposedPasswordsReportComponent extends CipherReportComponent {
export class ExposedPasswordsReportComponent extends CipherReportComponent implements OnInit {
exposedPasswordMap = new Map<string, number>();
constructor(private ciphersService: CipherService, private auditService: AuditService,
componentFactoryResolver: ComponentFactoryResolver) {
super(componentFactoryResolver);
componentFactoryResolver: ComponentFactoryResolver, messagingService: MessagingService,
userService: UserService) {
super(componentFactoryResolver, userService, messagingService, true);
}
ngOnInit() {
this.checkPremium();
}
async load() {
if (await this.checkPremium()) {
super.load();
}
}
async setCiphers() {