From 569718117c110bb2c90b9ca2d08a6db35de7ad1a Mon Sep 17 00:00:00 2001 From: Derek Nance Date: Wed, 14 Jan 2026 15:27:50 -0600 Subject: [PATCH] import OssModule --- apps/desktop/src/app/app.component.ts | 17 +- .../bit-desktop/src/app/app.component.ts | 151 +----------------- .../bit-desktop/src/app/app.module.ts | 18 +-- .../bit-desktop/webpack.config.js | 4 +- 4 files changed, 9 insertions(+), 181 deletions(-) diff --git a/apps/desktop/src/app/app.component.ts b/apps/desktop/src/app/app.component.ts index ac77ef911c0..2a525ec3ce3 100644 --- a/apps/desktop/src/app/app.component.ts +++ b/apps/desktop/src/app/app.component.ts @@ -97,22 +97,7 @@ const SyncInterval = 6 * 60 * 60 * 1000; // 6 hours @Component({ selector: "app-root", styles: [], - template: ` - - - - - - - -
-
- -
- -
- - `, + templateUrl: "app.component.html", standalone: false, }) export class AppComponent implements OnInit, OnDestroy { diff --git a/bitwarden_license/bit-desktop/src/app/app.component.ts b/bitwarden_license/bit-desktop/src/app/app.component.ts index a74d108c73d..a059feccf38 100644 --- a/bitwarden_license/bit-desktop/src/app/app.component.ts +++ b/bitwarden_license/bit-desktop/src/app/app.component.ts @@ -1,158 +1,13 @@ -import { Component, DestroyRef, NgZone } from "@angular/core"; -import { Router } from "@angular/router"; +import { Component } from "@angular/core"; - -import { CollectionService } from "@bitwarden/admin-console/common"; -import { DeviceTrustToastService } from "@bitwarden/angular/auth/services/device-trust-toast.service.abstraction"; -import { DocumentLangSetter } from "@bitwarden/angular/platform/i18n"; -import { ModalService } from "@bitwarden/angular/services/modal.service"; -import { LockService, UserDecryptionOptionsServiceAbstraction } from "@bitwarden/auth/common"; -import { EventUploadService } from "@bitwarden/common/abstractions/event/event-upload.service"; -import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction"; -import { InternalPolicyService } from "@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction"; -import { AccountService } from "@bitwarden/common/auth/abstractions/account.service"; -import { AuthService } from "@bitwarden/common/auth/abstractions/auth.service"; -import { TokenService } from "@bitwarden/common/auth/abstractions/token.service"; -import { UserVerificationService } from "@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction"; -import { ProcessReloadServiceAbstraction } from "@bitwarden/common/key-management/abstractions/process-reload.service"; -import { KeyConnectorService } from "@bitwarden/common/key-management/key-connector/abstractions/key-connector.service"; -import { MasterPasswordServiceAbstraction } from "@bitwarden/common/key-management/master-password/abstractions/master-password.service.abstraction"; -import { PinServiceAbstraction } from "@bitwarden/common/key-management/pin/pin.service.abstraction"; -import { - VaultTimeoutService, - VaultTimeoutSettingsService, -} from "@bitwarden/common/key-management/vault-timeout"; -import { BroadcasterService } from "@bitwarden/common/platform/abstractions/broadcaster.service"; -import { ConfigService } from "@bitwarden/common/platform/abstractions/config/config.service"; -import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; -import { LogService } from "@bitwarden/common/platform/abstractions/log.service"; -import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; -import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; -import { StateService } from "@bitwarden/common/platform/abstractions/state.service"; -import { SystemService } from "@bitwarden/common/platform/abstractions/system.service"; -import { ServerNotificationsService } from "@bitwarden/common/platform/server-notifications"; -import { StateEventRunnerService } from "@bitwarden/common/platform/state"; -import { SyncService } from "@bitwarden/common/platform/sync"; -import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service"; -import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction"; -import { SearchService } from "@bitwarden/common/vault/abstractions/search.service"; -import { RestrictedItemTypesService } from "@bitwarden/common/vault/services/restricted-item-types.service"; -import { DialogService, ToastService } from "@bitwarden/components"; import { AppComponent as BaseAppComponent } from "@bitwarden/desktop/app/app.component"; -import { DesktopAutotypeDefaultSettingPolicy } from "@bitwarden/desktop/autofill/services/desktop-autotype-policy.service"; -import { KeyService, BiometricStateService } from "@bitwarden/key-management"; // 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-root", styles: [], - template: ` - - - - - - - -
-
- -
- -
- - `, + templateUrl: "../../../../apps/desktop/src/app/app.component.html", standalone: false, }) -export class AppComponent extends BaseAppComponent { - constructor( - masterPasswordService: MasterPasswordServiceAbstraction, - broadcasterService: BroadcasterService, - folderService: InternalFolderService, - syncService: SyncService, - cipherService: CipherService, - authService: AuthService, - router: Router, - toastService: ToastService, - i18nService: I18nService, - ngZone: NgZone, - vaultTimeoutService: VaultTimeoutService, - vaultTimeoutSettingsService: VaultTimeoutSettingsService, - keyService: KeyService, - logService: LogService, - messagingService: MessagingService, - collectionService: CollectionService, - searchService: SearchService, - notificationsService: ServerNotificationsService, - platformUtilsService: PlatformUtilsService, - systemService: SystemService, - processReloadService: ProcessReloadServiceAbstraction, - stateService: StateService, - eventUploadService: EventUploadService, - policyService: InternalPolicyService, - modalService: ModalService, - keyConnectorService: KeyConnectorService, - userVerificationService: UserVerificationService, - configService: ConfigService, - dialogService: DialogService, - biometricStateService: BiometricStateService, - stateEventRunnerService: StateEventRunnerService, - accountService: AccountService, - organizationService: OrganizationService, - deviceTrustToastService: DeviceTrustToastService, - userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction, - destroyRef: DestroyRef, - documentLangSetter: DocumentLangSetter, - restrictedItemTypesService: RestrictedItemTypesService, - pinService: PinServiceAbstraction, - tokenService: TokenService, - desktopAutotypeDefaultSettingPolicy: DesktopAutotypeDefaultSettingPolicy, - lockService: LockService, - ) { - super( - masterPasswordService, - broadcasterService, - folderService, - syncService, - cipherService, - authService, - router, - toastService, - i18nService, - ngZone, - vaultTimeoutService, - vaultTimeoutSettingsService, - keyService, - logService, - messagingService, - collectionService, - searchService, - notificationsService, - platformUtilsService, - systemService, - processReloadService, - stateService, - eventUploadService, - policyService, - modalService, - keyConnectorService, - userVerificationService, - configService, - dialogService, - biometricStateService, - stateEventRunnerService, - accountService, - organizationService, - deviceTrustToastService, - userDecryptionOptionsService, - destroyRef, - documentLangSetter, - restrictedItemTypesService, - pinService, - tokenService, - desktopAutotypeDefaultSettingPolicy, - lockService, - ); - } -} +export class AppComponent extends BaseAppComponent {} diff --git a/bitwarden_license/bit-desktop/src/app/app.module.ts b/bitwarden_license/bit-desktop/src/app/app.module.ts index 54cc8005761..e209d25af13 100644 --- a/bitwarden_license/bit-desktop/src/app/app.module.ts +++ b/bitwarden_license/bit-desktop/src/app/app.module.ts @@ -6,20 +6,15 @@ import "@bitwarden/desktop/platform/app/locales"; import { NgModule } from "@angular/core"; import { BrowserAnimationsModule } from "@angular/platform-browser/animations"; -import { ColorPasswordCountPipe } from "@bitwarden/angular/pipes/color-password-count.pipe"; -import { ColorPasswordPipe } from "@bitwarden/angular/pipes/color-password.pipe"; import { CalloutModule, DialogModule } from "@bitwarden/components"; import { AppRoutingModule as OssAppRoutingModule } from "@bitwarden/desktop/app/app-routing.module"; +import { AppModule as OssModule } from "@bitwarden/desktop/app/app.module"; import { UserVerificationComponent } from "@bitwarden/desktop/app/components/user-verification.component"; -import { AccountSwitcherComponent } from "@bitwarden/desktop/app/layout/account-switcher.component"; -import { HeaderComponent } from "@bitwarden/desktop/app/layout/header.component"; import { NavComponent } from "@bitwarden/desktop/app/layout/nav.component"; -import { SearchComponent } from "@bitwarden/desktop/app/layout/search/search.component"; import { SharedModule } from "@bitwarden/desktop/app/shared/shared.module"; import { DeleteAccountComponent } from "@bitwarden/desktop/auth/delete-account.component"; import { LoginModule } from "@bitwarden/desktop/auth/login/login.module"; import { SshAgentService } from "@bitwarden/desktop/autofill/services/ssh-agent.service"; -import { PremiumComponent } from "@bitwarden/desktop/billing/app/accounts/premium.component"; import { VaultFilterModule } from "@bitwarden/desktop/vault/app/vault/vault-filter/vault-filter.module"; import { VaultV2Component } from "@bitwarden/desktop/vault/app/vault/vault-v2.component"; import { AssignCollectionsComponent } from "@bitwarden/vault"; @@ -31,6 +26,7 @@ import { AppComponent } from "./app.component"; imports: [ BrowserAnimationsModule, SharedModule, + OssModule, OssAppRoutingModule, AppRoutingModule, VaultFilterModule, @@ -43,15 +39,7 @@ import { AppComponent } from "./app.component"; AssignCollectionsComponent, VaultV2Component, ], - declarations: [ - AccountSwitcherComponent, - AppComponent, - ColorPasswordPipe, - ColorPasswordCountPipe, - HeaderComponent, - PremiumComponent, - SearchComponent, - ], + declarations: [AppComponent], providers: [SshAgentService], bootstrap: [AppComponent], }) diff --git a/bitwarden_license/bit-desktop/webpack.config.js b/bitwarden_license/bit-desktop/webpack.config.js index 93493108db0..04223f69d29 100644 --- a/bitwarden_license/bit-desktop/webpack.config.js +++ b/bitwarden_license/bit-desktop/webpack.config.js @@ -10,7 +10,7 @@ module.exports = (webpackConfig, context) => { configName: "Commercial", renderer: { entry: path.resolve(__dirname, "src/app/main.ts"), - entryModule: "src/app/app.module#AppModule", + entryModule: "bitwarden_license/bit-desktop/src/app/app.module#AppModule", tsConfig: path.resolve( context.context.root, "bitwarden_license/bit-desktop/tsconfig.renderer.json", @@ -31,7 +31,7 @@ module.exports = (webpackConfig, context) => { configName: "Commercial", renderer: { entry: path.resolve(__dirname, "src/app/main.ts"), - entryModule: "src/app/app.module#AppModule", + entryModule: "bitwarden_license/bit-desktop/src/app/app.module#AppModule", tsConfig: path.resolve(__dirname, "tsconfig.renderer.json"), }, main: {