From fcf07a0fd11871de0c5f76ee53730dede93aaf90 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Sun, 28 Nov 2021 13:26:26 +0100 Subject: [PATCH] Clean up (#496) --- .../components/admin-overview/admin-overview.module.ts | 2 +- .../src/app/components/admin-users/admin-users.module.ts | 2 +- .../src/app/components/header/header.component.html | 2 +- .../components/home-overview/home-overview.component.ts | 5 +++++ .../src/app/components/home-overview/home-overview.html | 2 ++ apps/client/src/app/pages/admin/admin-page.module.ts | 8 ++++---- apps/client/src/app/pages/home/home-page.component.ts | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/apps/client/src/app/components/admin-overview/admin-overview.module.ts b/apps/client/src/app/components/admin-overview/admin-overview.module.ts index 88109ea8c..d87e0c5ad 100644 --- a/apps/client/src/app/components/admin-overview/admin-overview.module.ts +++ b/apps/client/src/app/components/admin-overview/admin-overview.module.ts @@ -14,4 +14,4 @@ import { AdminOverviewComponent } from './admin-overview.component'; providers: [CacheService], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) -export class AdminOverviewModule {} +export class GfAdminOverviewModule {} diff --git a/apps/client/src/app/components/admin-users/admin-users.module.ts b/apps/client/src/app/components/admin-users/admin-users.module.ts index fbc8b4870..c59c632e4 100644 --- a/apps/client/src/app/components/admin-users/admin-users.module.ts +++ b/apps/client/src/app/components/admin-users/admin-users.module.ts @@ -11,4 +11,4 @@ import { AdminUsersComponent } from './admin-users.component'; imports: [CommonModule, MatButtonModule, MatMenuModule], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) -export class AdminUsersModule {} +export class GfAdminUsersModule {} diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index b735a6e8b..593ac23f3 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -2,7 +2,7 @@ diff --git a/apps/client/src/app/components/home-overview/home-overview.component.ts b/apps/client/src/app/components/home-overview/home-overview.component.ts index daf034c2b..afc77f766 100644 --- a/apps/client/src/app/components/home-overview/home-overview.component.ts +++ b/apps/client/src/app/components/home-overview/home-overview.component.ts @@ -10,6 +10,7 @@ import { UserService } from '@ghostfolio/client/services/user/user.service'; import { PortfolioPerformance, User } from '@ghostfolio/common/interfaces'; import { DateRange } from '@ghostfolio/common/types'; import { LineChartItem } from '@ghostfolio/ui/line-chart/interfaces/line-chart.interface'; +import { DeviceDetectorService } from 'ngx-device-detector'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -27,6 +28,7 @@ export class HomeOverviewComponent implements OnDestroy, OnInit { { label: '5Y', value: '5y' }, { label: 'Max', value: 'max' } ]; + public deviceType: string; public hasImpersonationId: boolean; public historicalDataItems: LineChartItem[]; public isAllTimeHigh: boolean; @@ -43,6 +45,7 @@ export class HomeOverviewComponent implements OnDestroy, OnInit { public constructor( private changeDetectorRef: ChangeDetectorRef, private dataService: DataService, + private deviceService: DeviceDetectorService, private impersonationStorageService: ImpersonationStorageService, private settingsStorageService: SettingsStorageService, private userService: UserService @@ -62,6 +65,8 @@ export class HomeOverviewComponent implements OnDestroy, OnInit { * Initializes the controller */ public ngOnInit() { + this.deviceType = this.deviceService.getDeviceInfo().deviceType; + this.impersonationStorageService .onChangeHasImpersonation() .pipe(takeUntil(this.unsubscribeSubject)) diff --git a/apps/client/src/app/components/home-overview/home-overview.html b/apps/client/src/app/components/home-overview/home-overview.html index 85e6a017c..efe001161 100644 --- a/apps/client/src/app/components/home-overview/home-overview.html +++ b/apps/client/src/app/components/home-overview/home-overview.html @@ -7,6 +7,7 @@ h-100 justify-content-center overview + p-0 position-relative " > @@ -15,6 +16,7 @@