diff --git a/apps/client/src/app/pages/home/home-page.component.ts b/apps/client/src/app/pages/home/home-page.component.ts
index ef2932096..515d1e63b 100644
--- a/apps/client/src/app/pages/home/home-page.component.ts
+++ b/apps/client/src/app/pages/home/home-page.component.ts
@@ -132,6 +132,11 @@ export class HomePageComponent implements OnDestroy, OnInit {
this.update();
}
+ public ngOnDestroy() {
+ this.unsubscribeSubject.next();
+ this.unsubscribeSubject.complete();
+ }
+
private openDialog(): void {
const dialogRef = this.dialog.open(PerformanceChartDialog, {
autoFocus: false,
@@ -195,9 +200,4 @@ export class HomePageComponent implements OnDestroy, OnInit {
this.cd.markForCheck();
}
-
- public ngOnDestroy() {
- this.unsubscribeSubject.next();
- this.unsubscribeSubject.complete();
- }
}
diff --git a/apps/client/src/app/pages/home/home-page.module.ts b/apps/client/src/app/pages/home/home-page.module.ts
index 9f3c495e2..3306228dd 100644
--- a/apps/client/src/app/pages/home/home-page.module.ts
+++ b/apps/client/src/app/pages/home/home-page.module.ts
@@ -1,6 +1,5 @@
import { CommonModule } from '@angular/common';
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
-import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { RouterModule } from '@angular/router';
import { GfLineChartModule } from '@ghostfolio/client/components/line-chart/line-chart.module';
@@ -27,7 +26,6 @@ import { HomePageComponent } from './home-page.component';
GfPositionsModule,
GfToggleModule,
HomePageRoutingModule,
- MatButtonModule,
MatCardModule,
RouterModule
],
diff --git a/apps/client/src/app/pages/zen/zen-page-routing.module.ts b/apps/client/src/app/pages/zen/zen-page-routing.module.ts
new file mode 100644
index 000000000..59d4cb062
--- /dev/null
+++ b/apps/client/src/app/pages/zen/zen-page-routing.module.ts
@@ -0,0 +1,15 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { AuthGuard } from '@ghostfolio/client/core/auth.guard';
+
+import { ZenPageComponent } from './zen-page.component';
+
+const routes: Routes = [
+ { path: '', component: ZenPageComponent, canActivate: [AuthGuard] }
+];
+
+@NgModule({
+ imports: [RouterModule.forChild(routes)],
+ exports: [RouterModule]
+})
+export class ZenPageRoutingModule {}
diff --git a/apps/client/src/app/pages/zen/zen-page.component.ts b/apps/client/src/app/pages/zen/zen-page.component.ts
new file mode 100644
index 000000000..1fc5e65ee
--- /dev/null
+++ b/apps/client/src/app/pages/zen/zen-page.component.ts
@@ -0,0 +1,104 @@
+import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core';
+import { LineChartItem } from '@ghostfolio/client/components/line-chart/interfaces/line-chart.interface';
+import { DataService } from '@ghostfolio/client/services/data.service';
+import { ImpersonationStorageService } from '@ghostfolio/client/services/impersonation-storage.service';
+import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service';
+import { PortfolioPerformance, User } from '@ghostfolio/common/interfaces';
+import { hasPermission, permissions } from '@ghostfolio/common/permissions';
+import { DateRange } from '@ghostfolio/common/types';
+import { DeviceDetectorService } from 'ngx-device-detector';
+import { Subject } from 'rxjs';
+import { takeUntil } from 'rxjs/operators';
+
+@Component({
+ selector: 'gf-zen-page',
+ templateUrl: './zen-page.html',
+ styleUrls: ['./zen-page.scss']
+})
+export class ZenPageComponent implements OnDestroy, OnInit {
+ public dateRange: DateRange = 'max';
+ public deviceType: string;
+ public hasImpersonationId: boolean;
+ public hasPermissionToReadForeignPortfolio: boolean;
+ public historicalDataItems: LineChartItem[];
+ public isLoadingPerformance = true;
+ public performance: PortfolioPerformance;
+ public user: User;
+
+ private unsubscribeSubject = new Subject