1
0
mirror of https://github.com/bitwarden/browser.git synced 2025-01-09 19:28:06 +01:00

[PM-2014] chore: move fido2-login-settings to auth module

This commit is contained in:
Andreas Coroiu 2023-05-08 09:47:32 +02:00
parent cfe8d9265a
commit 30f0c408b3
No known key found for this signature in database
GPG Key ID: E70B5FFC81DFEC1A
10 changed files with 13 additions and 9 deletions

View File

@ -1,11 +1,14 @@
import { NgModule } from "@angular/core";
import { CoreAuthModule } from "./core/core.module";
import { Fido2LoginSettingsModule } from "./settings/fido2-login-settings";
@NgModule({
imports: [CoreAuthModule],
imports: [CoreAuthModule, Fido2LoginSettingsModule],
declarations: [],
providers: [],
exports: [],
exports: [
Fido2LoginSettingsModule, // TODO: Remove when `app/settings/change-password.component.ts` has been moved to `app/auth/settings/.`
],
})
export class AuthModule {}

View File

@ -2,7 +2,7 @@ import { DialogConfig, DialogRef } from "@angular/cdk/dialog";
import { Component } from "@angular/core";
import { FormBuilder, Validators } from "@angular/forms";
import { DialogService } from "@bitwarden/components";
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
import { CreatePasskeyFailedIcon } from "./create-passkey-failed.icon";
import { CreatePasskeyIcon } from "./create-passkey.icon";
@ -82,7 +82,7 @@ export class CreateCredentialDialogComponent {
* @param config Configuration for the dialog
*/
export const openCreateCredentialDialog = (
dialogService: DialogService,
dialogService: DialogServiceAbstraction,
config: DialogConfig<unknown>
) => {
return dialogService.open<CreateCredentialDialogResult, unknown>(

View File

@ -1,7 +1,7 @@
import { Component } from "@angular/core";
import { firstValueFrom } from "rxjs";
import { DialogService } from "@bitwarden/components";
import { DialogServiceAbstraction } from "@bitwarden/angular/services/dialog";
import {
CreateCredentialDialogResult,
@ -13,7 +13,7 @@ import {
templateUrl: "fido2-login-settings.component.html",
})
export class Fido2LoginSettingsComponent {
constructor(private dialogService: DialogService) {}
constructor(private dialogService: DialogServiceAbstraction) {}
protected async createCredential() {
const dialogRef = openCreateCredentialDialog(this.dialogService, {});

View File

@ -1,7 +1,7 @@
import { NgModule } from "@angular/core";
import { FormsModule, ReactiveFormsModule } from "@angular/forms";
import { SharedModule } from "../../shared/shared.module";
import { SharedModule } from "../../../shared/shared.module";
import { CreateCredentialDialogComponent } from "./create-credential-dialog/create-credential-dialog.component";
import { Fido2LoginSettingsComponent } from "./fido2-login-settings.component";

View File

@ -0,0 +1 @@
export * from "./fido2-login-settings.module";

View File

@ -35,6 +35,7 @@ import { EmergencyAccessTakeoverComponent } from "../auth/settings/emergency-acc
import { EmergencyAccessViewComponent } from "../auth/settings/emergency-access/emergency-access-view.component";
import { EmergencyAccessComponent } from "../auth/settings/emergency-access/emergency-access.component";
import { EmergencyAddEditComponent } from "../auth/settings/emergency-access/emergency-add-edit.component";
import { Fido2LoginSettingsModule } from "../auth/settings/fido2-login-settings";
import { TwoFactorAuthenticatorComponent } from "../auth/settings/two-factor-authenticator.component";
import { TwoFactorDuoComponent } from "../auth/settings/two-factor-duo.component";
import { TwoFactorEmailComponent } from "../auth/settings/two-factor-email.component";
@ -80,7 +81,6 @@ import { ChangeKdfModule } from "../settings/change-kdf/change-kdf.module";
import { ChangePasswordComponent } from "../settings/change-password.component";
import { DeleteAccountComponent } from "../settings/delete-account.component";
import { DomainRulesComponent } from "../settings/domain-rules.component";
import { Fido2LoginSettingsModule } from "../settings/fido2-login-settings/fido2-login-settings.module";
import { LowKdfComponent } from "../settings/low-kdf.component";
import { PreferencesComponent } from "../settings/preferences.component";
import { PremiumComponent } from "../settings/premium.component";
@ -123,7 +123,7 @@ import { SharedModule } from "./shared.module";
ProductSwitcherModule,
ChangeKdfModule,
DynamicAvatarComponent,
Fido2LoginSettingsModule, // TODO: Move to AuthModule when it is created
Fido2LoginSettingsModule, // TODO: Remove when `app/settings/change-password.component.ts` has been moved to `app/auth/settings/.`
],
declarations: [
PremiumBadgeComponent,