Browse Source

feat(client): set paths for faq pages

pull/4711/head
KenTandrian 3 months ago
parent
commit
e181afaff4
  1. 2
      apps/client/src/app/core/paths.ts
  2. 5
      apps/client/src/app/pages/faq/faq-page-routing.module.ts
  3. 7
      apps/client/src/app/pages/faq/faq-page.component.ts

2
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`,

5
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

7
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]
}
];
}

Loading…
Cancel
Save