diff --git a/apps/desktop/src/app/app.module.ts b/apps/desktop/src/app/app.module.ts index 6bbea38fd54..41ee28d27c6 100644 --- a/apps/desktop/src/app/app.module.ts +++ b/apps/desktop/src/app/app.module.ts @@ -3,42 +3,45 @@ import "zone.js"; // Register the locales for the application import "../platform/app/locales"; +import { OverlayModule } from "@angular/cdk/overlay"; import { NgModule } from "@angular/core"; +import { ReactiveFormsModule } from "@angular/forms"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { PremiumUpgradePromptService } from "@bitwarden/common/vault/abstractions/premium-upgrade-prompt.service"; -import { CalloutModule, DialogModule } from "@bitwarden/components"; -import { AssignCollectionsComponent } from "@bitwarden/vault"; +import { IconModule } from "@bitwarden/components"; -import { DeleteAccountComponent } from "../auth/delete-account.component"; -import { LoginModule } from "../auth/login/login.module"; import { SshAgentService } from "../autofill/services/ssh-agent.service"; import { PremiumComponent } from "../billing/app/accounts/premium.component"; import { DesktopPremiumUpgradePromptService } from "../services/desktop-premium-upgrade-prompt.service"; import { AppRoutingModule } from "./app-routing.module"; import { AppComponent } from "./app.component"; -import { UserVerificationComponent } from "./components/user-verification.component"; +import { AvatarComponent } from "./components/avatar.component"; import { AccountSwitcherComponent } from "./layout/account-switcher.component"; import { HeaderComponent } from "./layout/header.component"; import { SearchComponent } from "./layout/search/search.component"; -import { SharedModule } from "./shared/shared.module"; +import { ServicesModule } from "./services/services.module"; +/** + * This is the `AppModule` for the Bitwarden desktop application. + * + * This file contains **ONLY** components that are used in `AppComponent`. You most likely + * **DO NOT** want to modify this file. Routable components are handled by the `AppRoutingModule`. + */ @NgModule({ imports: [ BrowserAnimationsModule, - SharedModule, AppRoutingModule, - LoginModule, - DialogModule, - CalloutModule, - DeleteAccountComponent, - UserVerificationComponent, - AssignCollectionsComponent, JslibModule, + IconModule, + ReactiveFormsModule, + OverlayModule, + ServicesModule, ], declarations: [ + AvatarComponent, AccountSwitcherComponent, AppComponent, HeaderComponent, diff --git a/apps/desktop/src/app/shared/shared.module.ts b/apps/desktop/src/app/shared/shared.module.ts deleted file mode 100644 index 9f5a1f7a303..00000000000 --- a/apps/desktop/src/app/shared/shared.module.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { A11yModule } from "@angular/cdk/a11y"; -import { DragDropModule } from "@angular/cdk/drag-drop"; -import { OverlayModule } from "@angular/cdk/overlay"; -import { ScrollingModule } from "@angular/cdk/scrolling"; -import { CommonModule, DatePipe } from "@angular/common"; -import { NgModule } from "@angular/core"; -import { FormsModule, ReactiveFormsModule } from "@angular/forms"; - -import { IconModule } from "@bitwarden/components"; -import { I18nPipe } from "@bitwarden/ui-common"; - -import { AvatarComponent } from "../components/avatar.component"; -import { ServicesModule } from "../services/services.module"; - -/** - * @deprecated Please directly import the relevant directive/pipe/component. - * - * This module is overly large and adds many unrelated modules to your dependency tree. - * https://angular.dev/guide/ngmodules/overview recommends not using `NgModule`s for new code. - */ -@NgModule({ - imports: [ - CommonModule, - A11yModule, - DragDropModule, - FormsModule, - IconModule, - I18nPipe, - OverlayModule, - ReactiveFormsModule, - ScrollingModule, - ServicesModule, - ], - declarations: [AvatarComponent], - exports: [ - CommonModule, - A11yModule, - DatePipe, - DragDropModule, - FormsModule, - IconModule, - I18nPipe, - OverlayModule, - ReactiveFormsModule, - ScrollingModule, - ServicesModule, - AvatarComponent, - ], - providers: [DatePipe], -}) -export class SharedModule {} diff --git a/apps/desktop/src/auth/login/login.module.ts b/apps/desktop/src/auth/login/login.module.ts deleted file mode 100644 index 904d1b34373..00000000000 --- a/apps/desktop/src/auth/login/login.module.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { NgModule } from "@angular/core"; -import { RouterModule } from "@angular/router"; - -import { SharedModule } from "../../app/shared/shared.module"; - -@NgModule({ - imports: [SharedModule, RouterModule], - exports: [], -}) -export class LoginModule {}