1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00

DIRT - Prefer signal & change detection (#16939)

This commit is contained in:
Oscar Hinton
2025-10-24 18:17:58 +02:00
committed by GitHub
parent 1da4fd2261
commit fc26a21b85
32 changed files with 144 additions and 0 deletions

View File

@@ -21,6 +21,8 @@ import {
import { PhishingDetectionService } from "../services/phishing-detection.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: "dirt-phishing-warning",
standalone: true,

View File

@@ -6,6 +6,8 @@ import { Component } from "@angular/core";
import { JslibModule } from "@bitwarden/angular/jslib.module";
import { ButtonModule, LinkModule } from "@bitwarden/components";
// 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: "dirt-phishing-protected-by",
standalone: true,

View File

@@ -8,6 +8,8 @@ import { AuditService } from "@bitwarden/common/abstractions/audit.service";
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
import { BreachAccountResponse } from "@bitwarden/common/dirt/models/response/breach-account.response";
// 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-breach-report",
templateUrl: "breach-report.component.html",

View File

@@ -18,6 +18,8 @@ import { CipherReportComponent } from "./cipher-report.component";
type ReportResult = CipherView & { exposedXTimes: 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: "app-exposed-passwords-report",
templateUrl: "exposed-passwords-report.component.html",

View File

@@ -19,6 +19,8 @@ import { AdminConsoleCipherFormConfigService } from "../../../vault/org-vault/se
import { CipherReportComponent } from "./cipher-report.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-inactive-two-factor-report",
templateUrl: "inactive-two-factor-report.component.html",

View File

@@ -24,6 +24,8 @@ import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vau
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
import { ExposedPasswordsReportComponent as BaseExposedPasswordsReportComponent } from "../exposed-passwords-report.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-org-exposed-passwords-report",
templateUrl: "../exposed-passwords-report.component.html",

View File

@@ -23,6 +23,8 @@ import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vau
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
import { InactiveTwoFactorReportComponent as BaseInactiveTwoFactorReportComponent } from "../inactive-two-factor-report.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-inactive-two-factor-report",
templateUrl: "../inactive-two-factor-report.component.html",

View File

@@ -23,6 +23,8 @@ import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vau
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
import { ReusedPasswordsReportComponent as BaseReusedPasswordsReportComponent } from "../reused-passwords-report.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-reused-passwords-report",
templateUrl: "../reused-passwords-report.component.html",

View File

@@ -23,6 +23,8 @@ import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vau
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
import { UnsecuredWebsitesReportComponent as BaseUnsecuredWebsitesReportComponent } from "../unsecured-websites-report.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-unsecured-websites-report",
templateUrl: "../unsecured-websites-report.component.html",

View File

@@ -24,6 +24,8 @@ import { RoutedVaultFilterService } from "../../../../vault/individual-vault/vau
import { AdminConsoleCipherFormConfigService } from "../../../../vault/org-vault/services/admin-console-cipher-form-config.service";
import { WeakPasswordsReportComponent as BaseWeakPasswordsReportComponent } from "../weak-passwords-report.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-weak-passwords-report",
templateUrl: "../weak-passwords-report.component.html",

View File

@@ -9,6 +9,8 @@ import { BillingAccountProfileStateService } from "@bitwarden/common/billing/abs
import { reports, ReportType } from "../reports";
import { ReportEntry, ReportVariant } from "../shared";
// 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-reports-home",
templateUrl: "reports-home.component.html",

View File

@@ -17,6 +17,8 @@ import { AdminConsoleCipherFormConfigService } from "../../../vault/org-vault/se
import { CipherReportComponent } from "./cipher-report.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-reused-passwords-report",
templateUrl: "reused-passwords-report.component.html",

View File

@@ -16,6 +16,8 @@ import { AdminConsoleCipherFormConfigService } from "../../../vault/org-vault/se
import { CipherReportComponent } from "./cipher-report.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-unsecured-websites-report",
templateUrl: "unsecured-websites-report.component.html",

View File

@@ -22,6 +22,8 @@ import { CipherReportComponent } from "./cipher-report.component";
type ReportScore = { label: string; badgeVariant: BadgeVariant; sortOrder: number };
type ReportResult = CipherView & { score: number; reportValue: ReportScore; scoreKey: 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: "app-weak-passwords-report",
templateUrl: "weak-passwords-report.component.html",

View File

@@ -3,6 +3,8 @@ import { NavigationEnd, Router } from "@angular/router";
import { Subscription } from "rxjs";
import { filter } from "rxjs/operators";
// 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-reports-layout",
templateUrl: "reports-layout.component.html",

View File

@@ -6,16 +6,28 @@ import { Icon } from "@bitwarden/assets/svg";
import { ReportVariant } from "../models/report-variant";
// 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-report-card",
templateUrl: "report-card.component.html",
standalone: false,
})
export class ReportCardComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() title: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() description: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() route: string;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() icon: Icon;
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() variant: ReportVariant;
protected get disabled() {

View File

@@ -4,11 +4,15 @@ import { Component, Input } from "@angular/core";
import { ReportEntry } from "../models/report-entry";
// 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-report-list",
templateUrl: "report-list.component.html",
standalone: false,
})
export class ReportListComponent {
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
// eslint-disable-next-line @angular-eslint/prefer-signals
@Input() reports: ReportEntry[];
}