From e181afaff4d4314ed5824476fe751db3ce942042 Mon Sep 17 00:00:00 2001 From: KenTandrian Date: Mon, 12 May 2025 15:12:34 +0700 Subject: [PATCH] feat(client): set paths for faq pages --- apps/client/src/app/core/paths.ts | 2 ++ apps/client/src/app/pages/faq/faq-page-routing.module.ts | 5 +++-- apps/client/src/app/pages/faq/faq-page.component.ts | 7 ++++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/apps/client/src/app/core/paths.ts b/apps/client/src/app/core/paths.ts index 696941a4e..d0788b95a 100644 --- a/apps/client/src/app/core/paths.ts +++ b/apps/client/src/app/core/paths.ts @@ -22,6 +22,8 @@ export const paths = { privacyPolicy: $localize`:snake-case:privacy-policy`, register: $localize`:snake-case:register`, resources: $localize`:snake-case:resources`, + saas: $localize`:snake-case:saas`, + selfHosting: $localize`:snake-case:self-hosting`, settings: 'settings', summary: 'summary', termsOfService: $localize`:snake-case:terms-of-service`, diff --git a/apps/client/src/app/pages/faq/faq-page-routing.module.ts b/apps/client/src/app/pages/faq/faq-page-routing.module.ts index 17c087834..353ea6e9d 100644 --- a/apps/client/src/app/pages/faq/faq-page-routing.module.ts +++ b/apps/client/src/app/pages/faq/faq-page-routing.module.ts @@ -1,4 +1,5 @@ import { AuthGuard } from '@ghostfolio/client/core/auth.guard'; +import { paths } from '@ghostfolio/client/core/paths'; import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; @@ -17,12 +18,12 @@ const routes: Routes = [ ) }, { - path: 'saas', + path: paths.saas, loadChildren: () => import('./saas/saas-page.module').then((m) => m.SaasPageModule) }, { - path: 'self-hosting', + path: paths.selfHosting, loadChildren: () => import('./self-hosting/self-hosting-page.module').then( (m) => m.SelfHostingPageModule diff --git a/apps/client/src/app/pages/faq/faq-page.component.ts b/apps/client/src/app/pages/faq/faq-page.component.ts index caed1dd69..421ad9327 100644 --- a/apps/client/src/app/pages/faq/faq-page.component.ts +++ b/apps/client/src/app/pages/faq/faq-page.component.ts @@ -1,3 +1,4 @@ +import { paths } from '@ghostfolio/client/core/paths'; import { DataService } from '@ghostfolio/client/services/data.service'; import { TabConfiguration } from '@ghostfolio/common/interfaces'; import { hasPermission, permissions } from '@ghostfolio/common/permissions'; @@ -35,18 +36,18 @@ export class FaqPageComponent implements OnDestroy, OnInit { { iconName: 'reader-outline', label: $localize`General`, - path: ['/' + $localize`faq`] + path: ['/' + paths.faq] }, { iconName: 'cloudy-outline', label: $localize`Cloud` + ' (SaaS)', - path: ['/' + $localize`faq`, 'saas'], + path: ['/' + paths.faq, paths.saas], showCondition: this.hasPermissionForSubscription }, { iconName: 'server-outline', label: $localize`Self-Hosting`, - path: ['/' + $localize`faq`, $localize`self-hosting`] + path: ['/' + paths.faq, paths.selfHosting] } ]; }