mirror of
https://github.com/bitwarden/browser
synced 2025-12-19 09:43:23 +00:00
[PM-29565] Delete deprecated callout component (#17895)
* Replace usages of app-callout with bit-callout * Delete callout.component --------- Co-authored-by: Daniel James Smith <djsmith85@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
bcc2bda417
commit
458da1adc0
@@ -2,13 +2,11 @@
|
|||||||
<bit-dialog>
|
<bit-dialog>
|
||||||
<div class="tw-font-medium" bitDialogTitle>{{ "sshkeyApprovalTitle" | i18n }}</div>
|
<div class="tw-font-medium" bitDialogTitle>{{ "sshkeyApprovalTitle" | i18n }}</div>
|
||||||
<div bitDialogContent>
|
<div bitDialogContent>
|
||||||
<app-callout
|
@if (params.isAgentForwarding) {
|
||||||
type="warning"
|
<bit-callout type="warning" title="{{ 'agentForwardingWarningTitle' | i18n }}">
|
||||||
title="{{ 'agentForwardingWarningTitle' | i18n }}"
|
|
||||||
*ngIf="params.isAgentForwarding"
|
|
||||||
>
|
|
||||||
{{ 'agentForwardingWarningText' | i18n }}
|
{{ 'agentForwardingWarningText' | i18n }}
|
||||||
</app-callout>
|
</bit-callout>
|
||||||
|
}
|
||||||
|
|
||||||
<b>{{params.applicationName}}</b> {{ "sshkeyApprovalMessageInfix" | i18n }}
|
<b>{{params.applicationName}}</b> {{ "sshkeyApprovalMessageInfix" | i18n }}
|
||||||
<b>{{params.cipherName}}</b>
|
<b>{{params.cipherName}}</b>
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import {
|
|||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
IconButtonModule,
|
IconButtonModule,
|
||||||
DialogService,
|
DialogService,
|
||||||
|
CalloutModule,
|
||||||
} from "@bitwarden/components";
|
} from "@bitwarden/components";
|
||||||
|
|
||||||
export interface ApproveSshRequestParams {
|
export interface ApproveSshRequestParams {
|
||||||
@@ -35,6 +36,7 @@ export interface ApproveSshRequestParams {
|
|||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
AsyncActionsModule,
|
AsyncActionsModule,
|
||||||
FormFieldModule,
|
FormFieldModule,
|
||||||
|
CalloutModule,
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
export class ApproveSshRequestComponent {
|
export class ApproveSshRequestComponent {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<form [bitSubmit]="submit" [formGroup]="formGroup">
|
<form [bitSubmit]="submit" [formGroup]="formGroup">
|
||||||
<app-callout type="warning">{{ "deleteAccountWarning" | i18n }}</app-callout>
|
<bit-callout type="warning">{{ "deleteAccountWarning" | i18n }}</bit-callout>
|
||||||
<p bitTypography="body1" class="tw-text-center">
|
<p bitTypography="body1" class="tw-text-center">
|
||||||
<strong>{{ email }}</strong>
|
<strong>{{ email }}</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<h2 class="tw-text-center tw-mb-4">{{ "deleteProvider" | i18n }}</h2>
|
<h2 class="tw-text-center tw-mb-4">{{ "deleteProvider" | i18n }}</h2>
|
||||||
<app-callout type="warning">{{ "deleteProviderWarning" | i18n }}</app-callout>
|
<bit-callout type="warning">{{ "deleteProviderWarning" | i18n }}</bit-callout>
|
||||||
<p class="tw-text-center">
|
<p class="tw-text-center">
|
||||||
<strong>{{ name }}</strong>
|
<strong>{{ name }}</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
<bit-callout [icon]="icon" [title]="title" [type]="$any(type)" [useAlertRole]="useAlertRole">
|
|
||||||
<div class="tw-pl-7 tw-m-0" *ngIf="enforcedPolicyOptions">
|
|
||||||
{{ enforcedPolicyMessage }}
|
|
||||||
<ul>
|
|
||||||
<li *ngIf="enforcedPolicyOptions?.minComplexity > 0">
|
|
||||||
{{ "policyInEffectMinComplexity" | i18n: getPasswordScoreAlertDisplay() }}
|
|
||||||
</li>
|
|
||||||
<li *ngIf="enforcedPolicyOptions?.minLength > 0">
|
|
||||||
{{ "policyInEffectMinLength" | i18n: enforcedPolicyOptions?.minLength.toString() }}
|
|
||||||
</li>
|
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireUpper">
|
|
||||||
{{ "policyInEffectUppercase" | i18n }}
|
|
||||||
</li>
|
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireLower">
|
|
||||||
{{ "policyInEffectLowercase" | i18n }}
|
|
||||||
</li>
|
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireNumbers">
|
|
||||||
{{ "policyInEffectNumbers" | i18n }}
|
|
||||||
</li>
|
|
||||||
<li *ngIf="enforcedPolicyOptions?.requireSpecial">
|
|
||||||
{{ "policyInEffectSpecial" | i18n: "!@#$%^&*" }}
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<ng-content></ng-content>
|
|
||||||
</bit-callout>
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
// FIXME: Update this file to be type safe and remove this and next line
|
|
||||||
// @ts-strict-ignore
|
|
||||||
import { Component, Input, OnInit } from "@angular/core";
|
|
||||||
|
|
||||||
import { MasterPasswordPolicyOptions } from "@bitwarden/common/admin-console/models/domain/master-password-policy-options";
|
|
||||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
|
||||||
import { CalloutTypes } from "@bitwarden/components";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated use the CL's `CalloutComponent` instead
|
|
||||||
*/
|
|
||||||
// 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-callout",
|
|
||||||
templateUrl: "callout.component.html",
|
|
||||||
standalone: false,
|
|
||||||
})
|
|
||||||
export class DeprecatedCalloutComponent implements OnInit {
|
|
||||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
|
||||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
||||||
@Input() type: CalloutTypes = "info";
|
|
||||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
|
||||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
||||||
@Input() icon: string;
|
|
||||||
// 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() enforcedPolicyOptions: MasterPasswordPolicyOptions;
|
|
||||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
|
||||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
||||||
@Input() enforcedPolicyMessage: string;
|
|
||||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-903): Migrate to Signals
|
|
||||||
// eslint-disable-next-line @angular-eslint/prefer-signals
|
|
||||||
@Input() useAlertRole = false;
|
|
||||||
|
|
||||||
calloutStyle: string;
|
|
||||||
|
|
||||||
constructor(private i18nService: I18nService) {}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.calloutStyle = this.type;
|
|
||||||
|
|
||||||
if (this.enforcedPolicyMessage === undefined) {
|
|
||||||
this.enforcedPolicyMessage = this.i18nService.t("masterPasswordPolicyInEffect");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
getPasswordScoreAlertDisplay() {
|
|
||||||
if (this.enforcedPolicyOptions == null) {
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
|
|
||||||
let str: string;
|
|
||||||
switch (this.enforcedPolicyOptions.minComplexity) {
|
|
||||||
case 4:
|
|
||||||
str = this.i18nService.t("strong");
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
str = this.i18nService.t("good");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
str = this.i18nService.t("weak");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
return str + " (" + this.enforcedPolicyOptions.minComplexity + ")";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -26,7 +26,6 @@ import {
|
|||||||
|
|
||||||
import { TwoFactorIconComponent } from "./auth/components/two-factor-icon.component";
|
import { TwoFactorIconComponent } from "./auth/components/two-factor-icon.component";
|
||||||
import { NotPremiumDirective } from "./billing/directives/not-premium.directive";
|
import { NotPremiumDirective } from "./billing/directives/not-premium.directive";
|
||||||
import { DeprecatedCalloutComponent } from "./components/callout.component";
|
|
||||||
import { A11yInvalidDirective } from "./directives/a11y-invalid.directive";
|
import { A11yInvalidDirective } from "./directives/a11y-invalid.directive";
|
||||||
import { ApiActionDirective } from "./directives/api-action.directive";
|
import { ApiActionDirective } from "./directives/api-action.directive";
|
||||||
import { BoxRowDirective } from "./directives/box-row.directive";
|
import { BoxRowDirective } from "./directives/box-row.directive";
|
||||||
@@ -86,7 +85,6 @@ import { IconComponent } from "./vault/components/icon.component";
|
|||||||
A11yInvalidDirective,
|
A11yInvalidDirective,
|
||||||
ApiActionDirective,
|
ApiActionDirective,
|
||||||
BoxRowDirective,
|
BoxRowDirective,
|
||||||
DeprecatedCalloutComponent,
|
|
||||||
CopyTextDirective,
|
CopyTextDirective,
|
||||||
CreditCardNumberPipe,
|
CreditCardNumberPipe,
|
||||||
EllipsisPipe,
|
EllipsisPipe,
|
||||||
@@ -115,7 +113,6 @@ import { IconComponent } from "./vault/components/icon.component";
|
|||||||
AutofocusDirective,
|
AutofocusDirective,
|
||||||
ToastModule,
|
ToastModule,
|
||||||
BoxRowDirective,
|
BoxRowDirective,
|
||||||
DeprecatedCalloutComponent,
|
|
||||||
CopyTextDirective,
|
CopyTextDirective,
|
||||||
CreditCardNumberPipe,
|
CreditCardNumberPipe,
|
||||||
EllipsisPipe,
|
EllipsisPipe,
|
||||||
|
|||||||
Reference in New Issue
Block a user