1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-22 11:13:46 +00:00

[PM-27739] Fix bug for icons not showing on application tables (#17373)

* Added function to get a cipher icon for application tables. Update all application component to use signal properties

* Fix type

* Handle no ciphers on application
This commit is contained in:
Leslie Tilton
2025-11-18 09:03:05 -06:00
committed by GitHub
parent bd2f6e7566
commit 20d44b5136
7 changed files with 117 additions and 54 deletions

View File

@@ -35,6 +35,7 @@ import { getUserId } from "@bitwarden/common/auth/services/account.service";
import { CipherId, OrganizationId, UserId } from "@bitwarden/common/types/guid";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
import { CipherViewLike } from "@bitwarden/common/vault/utils/cipher-view-like-utils";
import { LogService } from "@bitwarden/logging";
import {
@@ -191,6 +192,23 @@ export class RiskInsightsOrchestratorService {
this._generateReportTriggerSubject.next(true);
}
/**
* Gets the cipher icon for a given cipher ID
*
* @param cipherId The ID of the cipher to get the icon for
* @returns A CipherViewLike if found, otherwise undefined
*/
getCipherIcon(cipherId: string): CipherViewLike | undefined {
const currentCiphers = this._ciphersSubject.value;
if (!currentCiphers) {
return undefined;
}
const foundCipher = currentCiphers.find((c) => c.id === cipherId);
return foundCipher;
}
/**
* Initializes the service context for a specific organization
*

View File

@@ -87,7 +87,9 @@ export class RiskInsightsDataService {
this._destroy$.complete();
}
// ----- UI-triggered methods (delegate to orchestrator) -----
getCipherIcon(cipherId: string) {
return this.orchestrator.getCipherIcon(cipherId);
}
initializeForOrganization(organizationId: OrganizationId) {
this.orchestrator.initializeForOrganization(organizationId);
}