diff --git a/apps/client/src/app/app-routing.module.ts b/apps/client/src/app/app-routing.module.ts index 1d62f5f13..b3be70bb2 100644 --- a/apps/client/src/app/app-routing.module.ts +++ b/apps/client/src/app/app-routing.module.ts @@ -28,7 +28,7 @@ const routes: Routes = [ ) }, { - path: paths.admin, + path: paths.adminControl, loadChildren: () => import('./pages/admin/admin-page.module').then((m) => m.AdminPageModule) }, @@ -95,7 +95,7 @@ const routes: Routes = [ ) }, { - path: paths.open, + path: paths.openStartup, loadChildren: () => import('./pages/open/open-page.module').then((m) => m.OpenPageModule) }, diff --git a/apps/client/src/app/app.component.html b/apps/client/src/app/app.component.html index d5e56b517..a04e457ba 100644 --- a/apps/client/src/app/app.component.html +++ b/apps/client/src/app/app.component.html @@ -70,7 +70,7 @@
  • About
  • @if (hasPermissionForSubscription) {
  • - Blog + Blog
  • }
  • @@ -91,7 +91,7 @@ } @if (hasPermissionForStatistics) {
  • - Open Startup + Open Startup
  • } @if (hasPermissionForSubscription) { diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 02db9fea0..5d198580e 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -74,9 +74,11 @@ export class AppComponent implements OnDestroy, OnInit { '/' + paths.about, paths.termsOfService ]; + public routerLinkBlog = ['/' + paths.blog]; public routerLinkFaq = ['/' + paths.faq]; public routerLinkFeatures = ['/' + paths.features]; public routerLinkMarkets = ['/' + paths.markets]; + public routerLinkOpenStartup = ['/' + paths.openStartup]; public routerLinkPricing = ['/' + paths.pricing]; public routerLinkRegister = ['/' + paths.register]; public routerLinkResources = ['/' + paths.resources]; diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html index eab89f53d..21d68984a 100644 --- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html +++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.html @@ -29,7 +29,7 @@ }} } @if (hasPermissionToAccessAdminControl) { - +
    Manage Benchmarks diff --git a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts index afcb561f6..c98f01fb7 100644 --- a/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts +++ b/apps/client/src/app/components/benchmark-comparator/benchmark-comparator.component.ts @@ -12,6 +12,7 @@ import { parseDate } from '@ghostfolio/common/helper'; import { LineChartItem, User } from '@ghostfolio/common/interfaces'; +import { paths } from '@ghostfolio/common/paths'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { ColorScheme } from '@ghostfolio/common/types'; @@ -63,6 +64,10 @@ export class BenchmarkComparatorComponent implements OnChanges, OnDestroy { public chart: Chart<'line'>; public hasPermissionToAccessAdminControl: boolean; + public routerLinkAdminControlMarketData = [ + '/' + paths.adminControl, + paths.marketData + ]; public constructor() { Chart.register( diff --git a/apps/client/src/app/components/header/header.component.html b/apps/client/src/app/components/header/header.component.html index b14d142f4..74737ca05 100644 --- a/apps/client/src/app/components/header/header.component.html +++ b/apps/client/src/app/components/header/header.component.html @@ -20,9 +20,9 @@ mat-flat-button [ngClass]="{ 'font-weight-bold': - currentRoute === 'home' || currentRoute === 'zen', + currentRoute === paths.home || currentRoute === paths.zen, 'text-decoration-underline': - currentRoute === 'home' || currentRoute === 'zen' + currentRoute === paths.home || currentRoute === paths.zen }" [routerLink]="['/']" >OverviewPortfolio @@ -47,10 +47,10 @@ i18n mat-flat-button [ngClass]="{ - 'font-weight-bold': currentRoute === 'accounts', - 'text-decoration-underline': currentRoute === 'accounts' + 'font-weight-bold': currentRoute === paths.accounts, + 'text-decoration-underline': currentRoute === paths.accounts }" - [routerLink]="['/accounts']" + [routerLink]="routerLinkAccounts" >Accounts @@ -61,10 +61,10 @@ i18n mat-flat-button [ngClass]="{ - 'font-weight-bold': currentRoute === 'admin', - 'text-decoration-underline': currentRoute === 'admin' + 'font-weight-bold': currentRoute === paths.adminControl, + 'text-decoration-underline': currentRoute === paths.adminControl }" - [routerLink]="['/admin']" + [routerLink]="routerLinkAdminControl" >Admin Control @@ -235,7 +235,7 @@ mat-menu-item [ngClass]="{ 'font-weight-bold': - currentRoute === 'home' || currentRoute === 'zen' + currentRoute === paths.home || currentRoute === paths.zen }" [routerLink]="['/']" >OverviewPortfolio Accounts My Ghostfolio @if (hasPermissionToAccessAdminControl) { @@ -270,8 +270,10 @@ class="d-flex d-sm-none" i18n mat-menu-item - [ngClass]="{ 'font-weight-bold': currentRoute === 'admin' }" - [routerLink]="['/admin']" + [ngClass]="{ + 'font-weight-bold': currentRoute === paths.adminControl + }" + [routerLink]="routerLinkAdminControl" >Admin Control } diff --git a/apps/client/src/app/components/header/header.component.ts b/apps/client/src/app/components/header/header.component.ts index a0fbe8c84..52418bcb7 100644 --- a/apps/client/src/app/components/header/header.component.ts +++ b/apps/client/src/app/components/header/header.component.ts @@ -80,14 +80,19 @@ export class HeaderComponent implements OnChanges { public hasPermissionToCreateUser: boolean; public impersonationId: string; public isMenuOpen: boolean; + public paths = paths; public routeAbout = paths.about; public routeFeatures = paths.features; public routeMarkets = paths.markets; public routePricing = paths.pricing; public routeResources = paths.resources; public routerLinkAbout = ['/' + paths.about]; + public routerLinkAccount = ['/' + paths.account]; + public routerLinkAccounts = ['/' + paths.accounts]; + public routerLinkAdminControl = ['/' + paths.adminControl]; public routerLinkFeatures = ['/' + paths.features]; public routerLinkMarkets = ['/' + paths.markets]; + public routerLinkPortfolio = ['/' + paths.portfolio]; public routerLinkPricing = ['/' + paths.pricing]; public routerLinkRegister = ['/' + paths.register]; public routerLinkResources = ['/' + paths.resources]; diff --git a/apps/client/src/app/components/home-holdings/home-holdings.component.ts b/apps/client/src/app/components/home-holdings/home-holdings.component.ts index dd411f6cc..9f772a3e4 100644 --- a/apps/client/src/app/components/home-holdings/home-holdings.component.ts +++ b/apps/client/src/app/components/home-holdings/home-holdings.component.ts @@ -7,6 +7,7 @@ import { ToggleOption, User } from '@ghostfolio/common/interfaces'; +import { paths } from '@ghostfolio/common/paths'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { HoldingType, HoldingsViewMode } from '@ghostfolio/common/types'; @@ -36,6 +37,10 @@ export class HomeHoldingsComponent implements OnDestroy, OnInit { { label: $localize`Active`, value: 'ACTIVE' }, { label: $localize`Closed`, value: 'CLOSED' } ]; + public routerLinkPortfolioActivities = [ + '/' + paths.portfolio, + paths.activities + ]; public user: User; public viewModeFormControl = new FormControl( HomeHoldingsComponent.DEFAULT_HOLDINGS_VIEW_MODE diff --git a/apps/client/src/app/components/home-holdings/home-holdings.html b/apps/client/src/app/components/home-holdings/home-holdings.html index f981e50a1..6040ffe2a 100644 --- a/apps/client/src/app/components/home-holdings/home-holdings.html +++ b/apps/client/src/app/components/home-holdings/home-holdings.html @@ -58,7 +58,7 @@ class="mt-3" i18n mat-stroked-button - [routerLink]="['/portfolio', 'activities']" + [routerLink]="routerLinkPortfolioActivities" >Manage Activities
    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 b0e7be320..783b7d1b9 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 { PortfolioPerformance, User } from '@ghostfolio/common/interfaces'; +import { paths } from '@ghostfolio/common/paths'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; import { ChangeDetectorRef, Component, OnDestroy, OnInit } from '@angular/core'; @@ -36,6 +37,12 @@ export class HomeOverviewComponent implements OnDestroy, OnInit { public isLoadingPerformance = true; public performance: PortfolioPerformance; public precision = 2; + public routerLinkAccounts = ['/' + paths.accounts]; + public routerLinkPortfolio = ['/' + paths.portfolio]; + public routerLinkPortfolioActivities = [ + '/' + paths.portfolio, + paths.activities + ]; public showDetails = false; public unit: string; public user: User; 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 c13c8f043..04b47277f 100644 --- a/apps/client/src/app/components/home-overview/home-overview.html +++ b/apps/client/src/app/components/home-overview/home-overview.html @@ -11,7 +11,7 @@ class="mb-2" [ngClass]="{ 'text-muted': user?.accounts?.length > 1 }" > - Setup your accounts
    Get a comprehensive financial overview by adding your bank and @@ -20,7 +20,7 @@ >
  • - + Capture your activities
    Record your investment activities to keep your portfolio up to @@ -29,7 +29,7 @@ >
  • - + Monitor and analyze your portfolio
    Track your progress in real-time with comprehensive analysis @@ -40,14 +40,18 @@
    @if (user?.accounts?.length === 1) { - + Setup accounts } @else if (user?.accounts?.length > 1) { Add activity diff --git a/apps/client/src/app/core/auth.guard.ts b/apps/client/src/app/core/auth.guard.ts index 16851b4e0..87ef23d60 100644 --- a/apps/client/src/app/core/auth.guard.ts +++ b/apps/client/src/app/core/auth.guard.ts @@ -21,7 +21,7 @@ export class AuthGuard { `/${paths.faq}`, `/${paths.features}`, `/${paths.markets}`, - `/${paths.open}`, + `/${paths.openStartup}`, `/${paths.pricing}`, `/${paths.public}`, `/${paths.register}`, diff --git a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts index 5ec30a32e..ec135e4d3 100644 --- a/apps/client/src/app/pages/about/overview/about-overview-page.component.ts +++ b/apps/client/src/app/pages/about/overview/about-overview-page.component.ts @@ -18,8 +18,10 @@ export class AboutOverviewPageComponent implements OnDestroy, OnInit { public hasPermissionForStatistics: boolean; public hasPermissionForSubscription: boolean; public isLoggedIn: boolean; + public routerLinkBlog = ['/' + paths.blog]; public routerLinkFaq = ['/' + paths.faq]; public routerLinkFeatures = ['/' + paths.features]; + public routerLinkOpenStartup = ['/' + paths.openStartup]; public user: User; private unsubscribeSubject = new Subject(); diff --git a/apps/client/src/app/pages/about/overview/about-overview-page.html b/apps/client/src/app/pages/about/overview/about-overview-page.html index 3891f929d..9a7dd142e 100644 --- a/apps/client/src/app/pages/about/overview/about-overview-page.html +++ b/apps/client/src/app/pages/about/overview/about-overview-page.html @@ -23,7 +23,9 @@ > @if (hasPermissionForStatistics) { and we share aggregated - key metrics + key metrics of the platform’s performance } . The project has been initiated by @@ -160,7 +162,7 @@ class="py-4 w-100" color="primary" mat-flat-button - [routerLink]="['/blog']" + [routerLink]="routerLinkBlog" >Blog
    diff --git a/apps/client/src/app/pages/admin/admin-page.component.ts b/apps/client/src/app/pages/admin/admin-page.component.ts index 8328b7aba..e787cb0fc 100644 --- a/apps/client/src/app/pages/admin/admin-page.component.ts +++ b/apps/client/src/app/pages/admin/admin-page.component.ts @@ -27,27 +27,27 @@ export class AdminPageComponent implements OnDestroy, OnInit { { iconName: 'reader-outline', label: $localize`Overview`, - path: ['/' + paths.admin] + path: ['/' + paths.adminControl] }, { iconName: 'settings-outline', label: $localize`Settings`, - path: ['/' + paths.admin, paths.settings] + path: ['/' + paths.adminControl, paths.settings] }, { iconName: 'server-outline', label: $localize`Market Data`, - path: ['/' + paths.admin, paths.marketData] + path: ['/' + paths.adminControl, paths.marketData] }, { iconName: 'flash-outline', label: $localize`Job Queue`, - path: ['/' + paths.admin, paths.jobs] + path: ['/' + paths.adminControl, paths.jobs] }, { iconName: 'people-outline', label: $localize`Users`, - path: ['/' + paths.admin, paths.users] + path: ['/' + paths.adminControl, paths.users] } ]; } diff --git a/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.component.ts b/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.component.ts index 5dcb6e359..222a79648 100644 --- a/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.component.ts +++ b/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.component.ts @@ -11,6 +11,7 @@ import { RouterModule } from '@angular/router'; templateUrl: './hallo-ghostfolio-page.html' }) export class HalloGhostfolioPageComponent { + public routerLinkBlog = ['/' + paths.blog]; public routerLinkPricing = ['/' + paths.pricing]; public routerLinkResources = ['/' + paths.resources]; } diff --git a/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.html b/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.html index e0364f747..28e30d16b 100644 --- a/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.html +++ b/apps/client/src/app/pages/blog/2021/07/hallo-ghostfolio/hallo-ghostfolio-page.html @@ -201,7 +201,7 @@