mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-29 07:59:42 +01:00
hasLoaded spinners
This commit is contained in:
parent
4a0b4de322
commit
dc1ffafdf3
@ -1,8 +1,13 @@
|
||||
<div class="page-header">
|
||||
<h1>{{'reusedPasswordsReport' | i18n}}</h1>
|
||||
<h1>
|
||||
{{'reusedPasswordsReport' | i18n}}
|
||||
<small *ngIf="hasLoaded && loading">
|
||||
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
||||
</small>
|
||||
</h1>
|
||||
</div>
|
||||
<p>{{'reusedPasswordsReportDesc' | i18n}}</p>
|
||||
<div *ngIf="loading">
|
||||
<div *ngIf="!hasLoaded && loading">
|
||||
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
||||
</div>
|
||||
<div class="mt-4" *ngIf="!loading">
|
||||
|
@ -32,7 +32,7 @@ export class ReusedPasswordsReportComponent implements OnInit {
|
||||
constructor(private ciphersService: CipherService, private componentFactoryResolver: ComponentFactoryResolver) { }
|
||||
|
||||
async ngOnInit() {
|
||||
this.load();
|
||||
await this.load();
|
||||
this.hasLoaded = true;
|
||||
}
|
||||
|
||||
@ -52,8 +52,9 @@ export class ReusedPasswordsReportComponent implements OnInit {
|
||||
this.passwordUseMap.set(c.login.password, 1);
|
||||
}
|
||||
});
|
||||
this.ciphers = ciphersWithPasswords.filter((c) =>
|
||||
const reusedPasswordCiphers = ciphersWithPasswords.filter((c) =>
|
||||
this.passwordUseMap.has(c.login.password) && this.passwordUseMap.get(c.login.password) > 1);
|
||||
this.ciphers = reusedPasswordCiphers;
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,13 @@
|
||||
<div class="page-header">
|
||||
<h1>{{'unsecuredWebsitesReport' | i18n}}</h1>
|
||||
<h1>
|
||||
{{'unsecuredWebsitesReport' | i18n}}
|
||||
<small *ngIf="hasLoaded && loading">
|
||||
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
||||
</small>
|
||||
</h1>
|
||||
</div>
|
||||
<p>{{'unsecuredWebsitesReportDesc' | i18n}}</p>
|
||||
<div *ngIf="loading">
|
||||
<div *ngIf="!hasLoaded && loading">
|
||||
<i class="fa fa-spinner fa-spin text-muted" title="{{'loading' | i18n}}"></i>
|
||||
</div>
|
||||
<div class="mt-4" *ngIf="!loading">
|
||||
|
@ -31,19 +31,20 @@ export class UnsecuredWebsitesReportComponent implements OnInit {
|
||||
constructor(private ciphersService: CipherService, private componentFactoryResolver: ComponentFactoryResolver) { }
|
||||
|
||||
async ngOnInit() {
|
||||
this.load();
|
||||
await this.load();
|
||||
this.hasLoaded = true;
|
||||
}
|
||||
|
||||
async load() {
|
||||
this.loading = true;
|
||||
const allCiphers = await this.ciphersService.getAllDecrypted();
|
||||
this.ciphers = allCiphers.filter((c) => {
|
||||
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;
|
||||
this.loading = false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user