mirror of
https://github.com/bitwarden/browser
synced 2026-02-11 05:53:42 +00:00
update PR comments from claude
This commit is contained in:
@@ -2,7 +2,7 @@ import { Component, DestroyRef, inject, OnInit, ChangeDetectionStrategy } from "
|
||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||
import { FormControl } from "@angular/forms";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { combineLatest, debounceTime, of, switchMap } from "rxjs";
|
||||
import { combineLatest, debounceTime, map } from "rxjs";
|
||||
|
||||
import { Security } from "@bitwarden/assets/svg";
|
||||
import {
|
||||
@@ -78,9 +78,9 @@ export class AllApplicationsComponent implements OnInit {
|
||||
async ngOnInit() {
|
||||
combineLatest([this.dataService.enrichedReportData$, this.dataService.ciphers$])
|
||||
.pipe(
|
||||
switchMap(([report, ciphers]) => {
|
||||
map(([report, ciphers]) => {
|
||||
if (!report) {
|
||||
return of(null);
|
||||
return null;
|
||||
}
|
||||
|
||||
// Map ciphers to each application
|
||||
@@ -92,7 +92,7 @@ export class AllApplicationsComponent implements OnInit {
|
||||
.filter((c): c is CipherView => c !== undefined),
|
||||
}));
|
||||
|
||||
return of({ ...report, reportData: reportWithCiphers });
|
||||
return { ...report, reportData: reportWithCiphers };
|
||||
}),
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
)
|
||||
|
||||
@@ -78,10 +78,15 @@ export class CriticalApplicationsComponent implements OnInit {
|
||||
if (!report) {
|
||||
return null;
|
||||
}
|
||||
const reportWithCiphers = (report?.reportData ?? []).map((app) => ({
|
||||
|
||||
const cipherMap = new Map(ciphers?.map((c) => [c.id, c]));
|
||||
const reportWithCiphers = report.reportData.map((app) => ({
|
||||
...app,
|
||||
ciphers: ciphers?.filter((cipher) => app.cipherIds.includes(cipher.id)) ?? [],
|
||||
ciphers: app.cipherIds
|
||||
.map((id) => cipherMap?.get(id))
|
||||
.filter((c): c is CipherView => c !== undefined),
|
||||
}));
|
||||
|
||||
return { ...report, reportData: reportWithCiphers };
|
||||
}),
|
||||
takeUntilDestroyed(this.destroyRef),
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
>
|
||||
@if (row.ciphers?.[0]) {
|
||||
<app-vault-icon [cipher]="row.ciphers[0]"></app-vault-icon>
|
||||
} @else {
|
||||
<i class="bwi bwi-globe tw-text-muted"></i>
|
||||
}
|
||||
</td>
|
||||
<td
|
||||
|
||||
Reference in New Issue
Block a user