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:
@@ -4,6 +4,8 @@ import { Component } from "@angular/core";
|
||||
|
||||
import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui";
|
||||
|
||||
// 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-remove-password",
|
||||
templateUrl: "remove-password.component.html",
|
||||
|
||||
@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
|
||||
|
||||
import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui";
|
||||
|
||||
// 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-remove-password",
|
||||
templateUrl: "remove-password.component.html",
|
||||
|
||||
@@ -12,6 +12,8 @@ import { MessagingService } from "@bitwarden/common/platform/abstractions/messag
|
||||
import { DIALOG_DATA, ToastService } from "@bitwarden/components";
|
||||
import { KdfConfig, KdfType } from "@bitwarden/key-management";
|
||||
|
||||
// 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-change-kdf-confirmation",
|
||||
templateUrl: "change-kdf-confirmation.component.html",
|
||||
|
||||
@@ -18,6 +18,8 @@ import {
|
||||
|
||||
import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.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-change-kdf",
|
||||
templateUrl: "change-kdf.component.html",
|
||||
|
||||
@@ -3,6 +3,8 @@ import { Component } from "@angular/core";
|
||||
import { ConfirmKeyConnectorDomainComponent as BaseConfirmKeyConnectorDomainComponent } from "@bitwarden/key-management-ui";
|
||||
import { RouterService } from "@bitwarden/web-vault/app/core";
|
||||
|
||||
// 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-confirm-key-connector-domain",
|
||||
template: ` <confirm-key-connector-domain [onBeforeNavigation]="onBeforeNavigation" /> `,
|
||||
|
||||
@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
|
||||
|
||||
import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui";
|
||||
|
||||
// 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-remove-password",
|
||||
templateUrl: "remove-password.component.html",
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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 &&
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user