Remove shared module from desktop (#19414)

This commit is contained in:
Oscar Hinton 2026-03-10 19:09:20 +01:00 committed by GitHub
parent 11a5c662de
commit 77e837fe80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 16 additions and 74 deletions

View File

@ -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,

View File

@ -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 {}

View File

@ -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 {}