mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import {
|
|
Component,
|
|
ComponentFactoryResolver,
|
|
OnInit,
|
|
} from '@angular/core';
|
|
|
|
import { CipherService } from 'jslib/abstractions/cipher.service';
|
|
|
|
import { CipherType } from 'jslib/enums/cipherType';
|
|
|
|
import { CipherReportComponent } from './cipher-report.component';
|
|
|
|
@Component({
|
|
selector: 'app-unsecured-websites-report',
|
|
templateUrl: 'unsecured-websites-report.component.html',
|
|
})
|
|
export class UnsecuredWebsitesReportComponent extends CipherReportComponent implements OnInit {
|
|
constructor(private ciphersService: CipherService, componentFactoryResolver: ComponentFactoryResolver) {
|
|
super(componentFactoryResolver);
|
|
}
|
|
|
|
ngOnInit() {
|
|
this.load();
|
|
}
|
|
|
|
async setCiphers() {
|
|
const allCiphers = await this.ciphersService.getAllDecrypted();
|
|
const unsecuredCiphers = allCiphers.filter((c) => {
|
|
if (c.type !== CipherType.Login || !c.login.hasUris) {
|
|
return false;
|
|
}
|
|
return c.login.uris.find((u) => u.uri.indexOf('http://') === 0) != null;
|
|
});
|
|
this.ciphers = unsecuredCiphers;
|
|
}
|
|
}
|