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";
|
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({
|
@Component({
|
||||||
selector: "app-remove-password",
|
selector: "app-remove-password",
|
||||||
templateUrl: "remove-password.component.html",
|
templateUrl: "remove-password.component.html",
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import { Component } from "@angular/core";
|
|||||||
|
|
||||||
import { RemovePasswordComponent as BaseRemovePasswordComponent } from "@bitwarden/key-management-ui";
|
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({
|
@Component({
|
||||||
selector: "app-remove-password",
|
selector: "app-remove-password",
|
||||||
templateUrl: "remove-password.component.html",
|
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 { DIALOG_DATA, ToastService } from "@bitwarden/components";
|
||||||
import { KdfConfig, KdfType } from "@bitwarden/key-management";
|
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({
|
@Component({
|
||||||
selector: "app-change-kdf-confirmation",
|
selector: "app-change-kdf-confirmation",
|
||||||
templateUrl: "change-kdf-confirmation.component.html",
|
templateUrl: "change-kdf-confirmation.component.html",
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ import {
|
|||||||
|
|
||||||
import { ChangeKdfConfirmationComponent } from "./change-kdf-confirmation.component";
|
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({
|
@Component({
|
||||||
selector: "app-change-kdf",
|
selector: "app-change-kdf",
|
||||||
templateUrl: "change-kdf.component.html",
|
templateUrl: "change-kdf.component.html",
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ import { Component } from "@angular/core";
|
|||||||
import { ConfirmKeyConnectorDomainComponent as BaseConfirmKeyConnectorDomainComponent } from "@bitwarden/key-management-ui";
|
import { ConfirmKeyConnectorDomainComponent as BaseConfirmKeyConnectorDomainComponent } from "@bitwarden/key-management-ui";
|
||||||
import { RouterService } from "@bitwarden/web-vault/app/core";
|
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({
|
@Component({
|
||||||
selector: "app-confirm-key-connector-domain",
|
selector: "app-confirm-key-connector-domain",
|
||||||
template: ` <confirm-key-connector-domain [onBeforeNavigation]="onBeforeNavigation" /> `,
|
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";
|
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({
|
@Component({
|
||||||
selector: "app-remove-password",
|
selector: "app-remove-password",
|
||||||
templateUrl: "remove-password.component.html",
|
templateUrl: "remove-password.component.html",
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import { UserId } from "@bitwarden/common/types/guid";
|
|||||||
import { BitActionDirective, ButtonModule } from "@bitwarden/components";
|
import { BitActionDirective, ButtonModule } from "@bitwarden/components";
|
||||||
import { I18nPipe } from "@bitwarden/ui-common";
|
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({
|
@Component({
|
||||||
selector: "confirm-key-connector-domain",
|
selector: "confirm-key-connector-domain",
|
||||||
templateUrl: "confirm-key-connector-domain.component.html",
|
templateUrl: "confirm-key-connector-domain.component.html",
|
||||||
@@ -24,6 +26,8 @@ export class ConfirmKeyConnectorDomainComponent implements OnInit {
|
|||||||
keyConnectorUrl!: string;
|
keyConnectorUrl!: string;
|
||||||
userId!: UserId;
|
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 () => {};
|
@Input() onBeforeNavigation: () => Promise<void> = async () => {};
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ type KeyRotationTrustDialogData = {
|
|||||||
numberOfEmergencyAccessUsers: number;
|
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({
|
@Component({
|
||||||
selector: "key-rotation-trust-info",
|
selector: "key-rotation-trust-info",
|
||||||
templateUrl: "key-rotation-trust-info.component.html",
|
templateUrl: "key-rotation-trust-info.component.html",
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ type AfterUnlockActions = {
|
|||||||
/// Fixes safari autoprompt behavior
|
/// Fixes safari autoprompt behavior
|
||||||
const AUTOPROMPT_BIOMETRICS_PROCESS_RELOAD_DELAY = 5000;
|
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({
|
@Component({
|
||||||
selector: "bit-lock",
|
selector: "bit-lock",
|
||||||
templateUrl: "lock.component.html",
|
templateUrl: "lock.component.html",
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ import {
|
|||||||
UnlockOptionValue,
|
UnlockOptionValue,
|
||||||
} from "../../services/lock-component.service";
|
} 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({
|
@Component({
|
||||||
selector: "bit-master-password-lock",
|
selector: "bit-master-password-lock",
|
||||||
templateUrl: "master-password-lock.component.html",
|
templateUrl: "master-password-lock.component.html",
|
||||||
@@ -45,13 +47,13 @@ export class MasterPasswordLockComponent {
|
|||||||
private readonly logService = inject(LogService);
|
private readonly logService = inject(LogService);
|
||||||
UnlockOption = UnlockOption;
|
UnlockOption = UnlockOption;
|
||||||
|
|
||||||
activeUnlockOption = model.required<UnlockOptionValue>();
|
readonly activeUnlockOption = model.required<UnlockOptionValue>();
|
||||||
|
|
||||||
unlockOptions = input.required<UnlockOptions>();
|
readonly unlockOptions = input.required<UnlockOptions>();
|
||||||
biometricUnlockBtnText = input.required<string>();
|
readonly biometricUnlockBtnText = input.required<string>();
|
||||||
showPinSwap = computed(() => this.unlockOptions().pin.enabled ?? false);
|
readonly showPinSwap = computed(() => this.unlockOptions().pin.enabled ?? false);
|
||||||
biometricsAvailable = computed(() => this.unlockOptions().biometrics.enabled ?? false);
|
readonly biometricsAvailable = computed(() => this.unlockOptions().biometrics.enabled ?? false);
|
||||||
showBiometricsSwap = computed(() => {
|
readonly showBiometricsSwap = computed(() => {
|
||||||
const status = this.unlockOptions().biometrics.biometricsStatus;
|
const status = this.unlockOptions().biometrics.biometricsStatus;
|
||||||
return (
|
return (
|
||||||
status !== BiometricsStatus.PlatformUnsupported &&
|
status !== BiometricsStatus.PlatformUnsupported &&
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ type AccountRecoveryTrustDialogData = {
|
|||||||
/** org public key */
|
/** org public key */
|
||||||
publicKey: Uint8Array;
|
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({
|
@Component({
|
||||||
selector: "account-recovery-trust",
|
selector: "account-recovery-trust",
|
||||||
templateUrl: "account-recovery-trust.component.html",
|
templateUrl: "account-recovery-trust.component.html",
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ type EmergencyAccessTrustDialogData = {
|
|||||||
/** user public key */
|
/** user public key */
|
||||||
publicKey: Uint8Array;
|
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({
|
@Component({
|
||||||
selector: "emergency-access-trust",
|
selector: "emergency-access-trust",
|
||||||
templateUrl: "emergency-access-trust.component.html",
|
templateUrl: "emergency-access-trust.component.html",
|
||||||
|
|||||||
Reference in New Issue
Block a user