1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

KM - Prefer signal & change detection (#16945)

This commit is contained in:
Oscar Hinton
2025-10-21 15:49:05 +02:00
committed by GitHub
parent 532546ea7d
commit 6abaaa7b13
12 changed files with 32 additions and 6 deletions

View File

@@ -13,6 +13,8 @@ import { UserId } from "@bitwarden/common/types/guid";
import { BitActionDirective, ButtonModule } from "@bitwarden/components";
import { I18nPipe } from "@bitwarden/ui-common";
// 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: "confirm-key-connector-domain",
templateUrl: "confirm-key-connector-domain.component.html",
@@ -24,6 +26,8 @@ export class ConfirmKeyConnectorDomainComponent implements OnInit {
keyConnectorUrl!: string;
userId!: UserId;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() onBeforeNavigation: () => Promise<void> = async () => {};
constructor(

View File

@@ -17,6 +17,8 @@ type KeyRotationTrustDialogData = {
numberOfEmergencyAccessUsers: number;
};
// 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: "key-rotation-trust-info",
templateUrl: "key-rotation-trust-info.component.html",

View File

@@ -86,6 +86,8 @@ type AfterUnlockActions = {
/// Fixes safari autoprompt behavior
const AUTOPROMPT_BIOMETRICS_PROCESS_RELOAD_DELAY = 5000;
// 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: "bit-lock",
templateUrl: "lock.component.html",

View File

@@ -25,6 +25,8 @@ import {
UnlockOptionValue,
} from "../../services/lock-component.service";
// 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: "bit-master-password-lock",
templateUrl: "master-password-lock.component.html",
@@ -45,13 +47,13 @@ export class MasterPasswordLockComponent {
private readonly logService = inject(LogService);
UnlockOption = UnlockOption;
activeUnlockOption = model.required<UnlockOptionValue>();
readonly activeUnlockOption = model.required<UnlockOptionValue>();
unlockOptions = input.required<UnlockOptions>();
biometricUnlockBtnText = input.required<string>();
showPinSwap = computed(() => this.unlockOptions().pin.enabled ?? false);
biometricsAvailable = computed(() => this.unlockOptions().biometrics.enabled ?? false);
showBiometricsSwap = computed(() => {
readonly unlockOptions = input.required<UnlockOptions>();
readonly biometricUnlockBtnText = input.required<string>();
readonly showPinSwap = computed(() => this.unlockOptions().pin.enabled ?? false);
readonly biometricsAvailable = computed(() => this.unlockOptions().biometrics.enabled ?? false);
readonly showBiometricsSwap = computed(() => {
const status = this.unlockOptions().biometrics.biometricsStatus;
return (
status !== BiometricsStatus.PlatformUnsupported &&

View File

@@ -25,6 +25,8 @@ type AccountRecoveryTrustDialogData = {
/** org public key */
publicKey: Uint8Array;
};
// 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: "account-recovery-trust",
templateUrl: "account-recovery-trust.component.html",

View File

@@ -25,6 +25,8 @@ type EmergencyAccessTrustDialogData = {
/** user public key */
publicKey: Uint8Array;
};
// 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: "emergency-access-trust",
templateUrl: "emergency-access-trust.component.html",