1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-02 00:23:35 +00:00

Vault - Prefer signal & change detection (#16947)

This commit is contained in:
Oscar Hinton
2025-10-27 16:13:11 +01:00
committed by GitHub
parent fd45689745
commit af6e19335d
134 changed files with 918 additions and 13 deletions

View File

@@ -39,6 +39,8 @@ import { LoginCredentialsViewComponent } from "./login-credentials/login-credent
import { SshKeyViewComponent } from "./sshkey-sections/sshkey-view.component";
import { ViewIdentitySectionsComponent } from "./view-identity-sections/view-identity-sections.component";
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
@Component({
selector: "app-cipher-view",
templateUrl: "cipher-view.component.html",
@@ -61,9 +63,13 @@ import { ViewIdentitySectionsComponent } from "./view-identity-sections/view-ide
],
})
export class CipherViewComponent implements OnChanges, OnDestroy {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input({ required: true }) cipher: CipherView | null = null;
// Required for fetching attachment data when viewed from cipher via emergency access
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() emergencyAccessId?: EmergencyAccessId;
activeUserId$ = getUserId(this.accountService.activeAccount$);
@@ -72,9 +78,13 @@ export class CipherViewComponent implements OnChanges, OnDestroy {
* Optional list of collections the cipher is assigned to. If none are provided, they will be fetched using the
* `CipherService` and the `collectionIds` property of the cipher.
*/
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() collections?: CollectionView[];
/** Should be set to true when the component is used within the Admin Console */
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() isAdminConsole?: boolean = false;
organization$: Observable<Organization | undefined> | undefined;