diff --git a/apps/browser/src/popup/images/two-factor/rc-w.png b/apps/browser/src/popup/images/two-factor/rc-w.png deleted file mode 100644 index e83b8db132..0000000000 Binary files a/apps/browser/src/popup/images/two-factor/rc-w.png and /dev/null differ diff --git a/apps/browser/src/popup/images/two-factor/rc.png b/apps/browser/src/popup/images/two-factor/rc.png deleted file mode 100644 index 4bebdf936c..0000000000 Binary files a/apps/browser/src/popup/images/two-factor/rc.png and /dev/null differ diff --git a/apps/browser/src/popup/scss/plugins.scss b/apps/browser/src/popup/scss/plugins.scss index b8ac8697b7..591e8a1bd0 100644 --- a/apps/browser/src/popup/scss/plugins.scss +++ b/apps/browser/src/popup/scss/plugins.scss @@ -21,11 +21,3 @@ max-width: 100px; } } - -.recovery-code-img { - @include themify($themes) { - content: url("../images/two-factor/rc" + themed("mfaLogoSuffix")); - max-width: 100px; - max-height: 45px; - } -} diff --git a/apps/desktop/src/images/two-factor/rc-w.png b/apps/desktop/src/images/two-factor/rc-w.png deleted file mode 100644 index e83b8db132..0000000000 Binary files a/apps/desktop/src/images/two-factor/rc-w.png and /dev/null differ diff --git a/apps/desktop/src/images/two-factor/rc.png b/apps/desktop/src/images/two-factor/rc.png deleted file mode 100644 index 4bebdf936c..0000000000 Binary files a/apps/desktop/src/images/two-factor/rc.png and /dev/null differ diff --git a/apps/desktop/src/scss/plugins.scss b/apps/desktop/src/scss/plugins.scss index b8ac8697b7..591e8a1bd0 100644 --- a/apps/desktop/src/scss/plugins.scss +++ b/apps/desktop/src/scss/plugins.scss @@ -21,11 +21,3 @@ max-width: 100px; } } - -.recovery-code-img { - @include themify($themes) { - content: url("../images/two-factor/rc" + themed("mfaLogoSuffix")); - max-width: 100px; - max-height: 45px; - } -} diff --git a/apps/web/src/app/admin-console/organizations/settings/organization-settings.module.ts b/apps/web/src/app/admin-console/organizations/settings/organization-settings.module.ts index 2a2068d581..bfff3b2aa2 100644 --- a/apps/web/src/app/admin-console/organizations/settings/organization-settings.module.ts +++ b/apps/web/src/app/admin-console/organizations/settings/organization-settings.module.ts @@ -1,5 +1,7 @@ import { NgModule } from "@angular/core"; +import { ItemModule } from "@bitwarden/components"; + import { LooseComponentsModule, SharedModule } from "../../../shared"; import { AccountFingerprintComponent } from "../../../shared/components/account-fingerprint/account-fingerprint.component"; import { PoliciesModule } from "../../organizations/policies"; @@ -15,6 +17,7 @@ import { TwoFactorSetupComponent } from "./two-factor-setup.component"; PoliciesModule, OrganizationSettingsRoutingModule, AccountFingerprintComponent, + ItemModule, ], declarations: [AccountComponent, TwoFactorSetupComponent], }) diff --git a/apps/web/src/app/auth/settings/two-factor/two-factor-recovery.component.ts b/apps/web/src/app/auth/settings/two-factor/two-factor-recovery.component.ts index 19e01af4b0..75a9766131 100644 --- a/apps/web/src/app/auth/settings/two-factor/two-factor-recovery.component.ts +++ b/apps/web/src/app/auth/settings/two-factor/two-factor-recovery.component.ts @@ -1,36 +1,50 @@ -// FIXME: Update this file to be type safe and remove this and next line -// @ts-strict-ignore +import { CommonModule } from "@angular/common"; import { Component, Inject } from "@angular/core"; import { TwoFactorProviderType } from "@bitwarden/common/auth/enums/two-factor-provider-type"; import { TwoFactorRecoverResponse } from "@bitwarden/common/auth/models/response/two-factor-recover.response"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { DIALOG_DATA, DialogConfig, DialogService } from "@bitwarden/components"; +import { + ButtonModule, + DIALOG_DATA, + DialogConfig, + DialogModule, + DialogRef, + DialogService, + TypographyModule, +} from "@bitwarden/components"; +import { I18nPipe } from "@bitwarden/ui-common"; @Component({ selector: "app-two-factor-recovery", templateUrl: "two-factor-recovery.component.html", + standalone: true, + imports: [CommonModule, DialogModule, ButtonModule, TypographyModule, I18nPipe], }) export class TwoFactorRecoveryComponent { type = -1; - code: string; - authed: boolean; + code: string = ""; + authed: boolean = false; twoFactorProviderType = TwoFactorProviderType; constructor( - @Inject(DIALOG_DATA) protected data: any, + @Inject(DIALOG_DATA) protected data: { response: { response: TwoFactorRecoverResponse } }, private i18nService: I18nService, ) { this.auth(data.response); } - auth(authResponse: any) { + auth(authResponse: { response: TwoFactorRecoverResponse }) { this.authed = true; this.processResponse(authResponse.response); } print() { const w = window.open(); + if (!w) { + // return early if the window is not open + return; + } w.document.write( '