Browse Source
Feature/refactor public routes: markets (#4934)
* Refactor public routes: markets
pull/4937/head
Thomas Kaul
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with
17 additions and
11 deletions
-
apps/client/src/app/app-routing.module.ts
-
apps/client/src/app/app.component.ts
-
apps/client/src/app/components/header/header.component.ts
-
apps/client/src/app/core/auth.guard.ts
-
apps/client/src/app/pages/blog/2022/08/500-stars-on-github/500-stars-on-github-page.component.ts
-
apps/client/src/app/pages/blog/2023/09/ghostfolio-2/ghostfolio-2-page.component.ts
-
apps/client/src/app/pages/faq/saas/saas-page.component.ts
-
apps/client/src/app/pages/markets/markets-page-routing.module.ts
-
libs/common/src/lib/routes/routes.ts
|
|
@ -92,7 +92,7 @@ const routes: Routes = [ |
|
|
|
title: $localize`Internationalization` |
|
|
|
}, |
|
|
|
{ |
|
|
|
path: ghostfolioRoutes.markets, |
|
|
|
path: publicRoutes.markets.path, |
|
|
|
loadChildren: () => |
|
|
|
import('./pages/markets/markets-page.module').then( |
|
|
|
(m) => m.MarketsPageModule |
|
|
|
|
|
@ -81,7 +81,7 @@ export class AppComponent implements OnDestroy, OnInit { |
|
|
|
public routerLinkBlog = publicRoutes.blog.routerLink; |
|
|
|
public routerLinkFaq = publicRoutes.faq.routerLink; |
|
|
|
public routerLinkFeatures = publicRoutes.features.routerLink; |
|
|
|
public routerLinkMarkets = ['/' + routes.markets]; |
|
|
|
public routerLinkMarkets = publicRoutes.markets.routerLink; |
|
|
|
public routerLinkOpenStartup = publicRoutes.openStartup.routerLink; |
|
|
|
public routerLinkPricing = publicRoutes.pricing.routerLink; |
|
|
|
public routerLinkRegister = publicRoutes.register.routerLink; |
|
|
@ -213,7 +213,7 @@ export class AppComponent implements OnDestroy, OnInit { |
|
|
|
this.showFooter = |
|
|
|
(this.currentRoute === publicRoutes.blog.path || |
|
|
|
this.currentRoute === publicRoutes.features.path || |
|
|
|
this.currentRoute === routes.markets || |
|
|
|
this.currentRoute === publicRoutes.markets.path || |
|
|
|
this.currentRoute === publicRoutes.openStartup.path || |
|
|
|
this.currentRoute === routes.public || |
|
|
|
this.currentRoute === publicRoutes.pricing.path || |
|
|
|
|
|
@ -87,7 +87,7 @@ export class HeaderComponent implements OnChanges { |
|
|
|
public isMenuOpen: boolean; |
|
|
|
public routeAbout = routes.about; |
|
|
|
public routeFeatures = publicRoutes.features.path; |
|
|
|
public routeMarkets = routes.markets; |
|
|
|
public routeMarkets = publicRoutes.markets.path; |
|
|
|
public routePricing = publicRoutes.pricing.path; |
|
|
|
public routeResources = routes.resources; |
|
|
|
public routerLinkAbout = ['/' + routes.about]; |
|
|
@ -95,7 +95,7 @@ export class HeaderComponent implements OnChanges { |
|
|
|
public routerLinkAccounts = internalRoutes.accounts.routerLink; |
|
|
|
public routerLinkAdminControl = ['/' + routes.adminControl]; |
|
|
|
public routerLinkFeatures = publicRoutes.features.routerLink; |
|
|
|
public routerLinkMarkets = ['/' + routes.markets]; |
|
|
|
public routerLinkMarkets = publicRoutes.markets.routerLink; |
|
|
|
public routerLinkPortfolio = internalRoutes.portfolio.routerLink; |
|
|
|
public routerLinkPricing = publicRoutes.pricing.routerLink; |
|
|
|
public routerLinkRegister = publicRoutes.register.routerLink; |
|
|
|
|
|
@ -24,7 +24,7 @@ export class AuthGuard { |
|
|
|
`/${routes.demo}`, |
|
|
|
`/${publicRoutes.faq.path}`, |
|
|
|
`/${publicRoutes.features.path}`, |
|
|
|
`/${routes.markets}`, |
|
|
|
`/${publicRoutes.markets.path}`, |
|
|
|
`/${publicRoutes.openStartup.path}`, |
|
|
|
`/${publicRoutes.pricing.path}`, |
|
|
|
`/${routes.public}`, |
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
import { publicRoutes, routes } from '@ghostfolio/common/routes/routes'; |
|
|
|
import { publicRoutes } from '@ghostfolio/common/routes/routes'; |
|
|
|
|
|
|
|
import { Component } from '@angular/core'; |
|
|
|
import { MatButtonModule } from '@angular/material/button'; |
|
|
@ -12,6 +12,6 @@ import { RouterModule } from '@angular/router'; |
|
|
|
}) |
|
|
|
export class FiveHundredStarsOnGitHubPageComponent { |
|
|
|
public routerLinkBlog = publicRoutes.blog.routerLink; |
|
|
|
public routerLinkMarkets = ['/' + routes.markets]; |
|
|
|
public routerLinkMarkets = publicRoutes.markets.routerLink; |
|
|
|
public routerLinkPricing = publicRoutes.pricing.routerLink; |
|
|
|
} |
|
|
|
|
|
@ -15,5 +15,5 @@ export class Ghostfolio2PageComponent { |
|
|
|
public routerLinkAboutChangelog = ['/' + routes.about, routes.changelog]; |
|
|
|
public routerLinkBlog = publicRoutes.blog.routerLink; |
|
|
|
public routerLinkFeatures = publicRoutes.features.routerLink; |
|
|
|
public routerLinkMarkets = ['/' + routes.markets]; |
|
|
|
public routerLinkMarkets = publicRoutes.markets.routerLink; |
|
|
|
} |
|
|
|
|
|
@ -23,7 +23,7 @@ export class SaasPageComponent implements OnDestroy { |
|
|
|
'/' + internalRoutes.account.path, |
|
|
|
routes.membership |
|
|
|
]; |
|
|
|
public routerLinkMarkets = ['/' + routes.markets]; |
|
|
|
public routerLinkMarkets = publicRoutes.markets.routerLink; |
|
|
|
public routerLinkRegister = publicRoutes.register.routerLink; |
|
|
|
public user: User; |
|
|
|
|
|
|
|
|
|
@ -1,4 +1,5 @@ |
|
|
|
import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; |
|
|
|
import { publicRoutes } from '@ghostfolio/common/routes/routes'; |
|
|
|
|
|
|
|
import { NgModule } from '@angular/core'; |
|
|
|
import { RouterModule, Routes } from '@angular/router'; |
|
|
@ -10,7 +11,7 @@ const routes: Routes = [ |
|
|
|
canActivate: [AuthGuard], |
|
|
|
component: MarketsPageComponent, |
|
|
|
path: '', |
|
|
|
title: $localize`Markets` |
|
|
|
title: publicRoutes.markets.title |
|
|
|
} |
|
|
|
]; |
|
|
|
|
|
|
|
|
|
@ -156,6 +156,11 @@ export const publicRoutes = { |
|
|
|
routerLink: ['/' + $localize`:kebab-case:features`], |
|
|
|
title: $localize`Features` |
|
|
|
}, |
|
|
|
markets: { |
|
|
|
path: $localize`:kebab-case:markets`, |
|
|
|
routerLink: ['/' + $localize`:kebab-case:markets`], |
|
|
|
title: $localize`Markets` |
|
|
|
}, |
|
|
|
openStartup: { |
|
|
|
path: 'open', |
|
|
|
routerLink: ['/open'], |
|
|
|