Browse Source

feat(client): cleanup other pages

pull/4711/head
KenTandrian 3 months ago
parent
commit
32b0efd1f2
  1. 1
      apps/client/src/app/core/paths.ts
  2. 6
      apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts
  3. 8
      apps/client/src/app/pages/faq/saas/saas-page.component.ts
  4. 5
      apps/client/src/app/pages/faq/self-hosting/self-hosting-page.component.ts
  5. 5
      apps/client/src/app/pages/features/features-page.component.ts
  6. 5
      apps/client/src/app/pages/landing/landing-page.component.ts
  7. 5
      apps/client/src/app/pages/pricing/pricing-page.component.ts
  8. 5
      apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts
  9. 5
      apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts
  10. 19
      apps/client/src/app/pages/resources/overview/resources-overview.component.ts
  11. 3
      apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.component.ts
  12. 9
      apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts
  13. 2
      apps/client/src/app/pages/resources/resources-page-routing.module.ts

1
apps/client/src/app/core/paths.ts

@ -19,6 +19,7 @@ export const paths = {
membership: 'membership',
open: 'open',
p: 'p',
personalFinanceTools: 'personal-finance-tools',
portfolio: 'portfolio',
settings: 'settings',
start: 'start',

6
apps/client/src/app/pages/faq/overview/faq-overview-page.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { User } from '@ghostfolio/common/interfaces';
@ -13,9 +14,8 @@ import { Subject, takeUntil } from 'rxjs';
})
export class FaqOverviewPageComponent implements OnDestroy {
public pricingUrl =
`https://ghostfol.io/${document.documentElement.lang}/` +
$localize`:snake-case:pricing`;
public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
`https://ghostfol.io/${document.documentElement.lang}/` + paths.pricing;
public routerLinkFeatures = ['/' + paths.features];
public user: User;
private unsubscribeSubject = new Subject<void>();

8
apps/client/src/app/pages/faq/saas/saas-page.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { User } from '@ghostfolio/common/interfaces';
@ -13,10 +14,9 @@ import { Subject, takeUntil } from 'rxjs';
})
export class SaasPageComponent implements OnDestroy {
public pricingUrl =
`https://ghostfol.io/${document.documentElement.lang}/` +
$localize`:snake-case:pricing`;
public routerLinkMarkets = ['/' + $localize`:snake-case:markets`];
public routerLinkRegister = ['/' + $localize`:snake-case:register`];
`https://ghostfol.io/${document.documentElement.lang}/` + paths.pricing;
public routerLinkMarkets = ['/' + paths.markets];
public routerLinkRegister = ['/' + paths.register];
public user: User;
private unsubscribeSubject = new Subject<void>();

5
apps/client/src/app/pages/faq/self-hosting/self-hosting-page.component.ts

@ -1,3 +1,5 @@
import { paths } from '@ghostfolio/client/core/paths';
import { Component, OnDestroy } from '@angular/core';
import { Subject } from 'rxjs';
@ -10,8 +12,7 @@ import { Subject } from 'rxjs';
})
export class SelfHostingPageComponent implements OnDestroy {
public pricingUrl =
`https://ghostfol.io/${document.documentElement.lang}/` +
$localize`:snake-case:pricing`;
`https://ghostfol.io/${document.documentElement.lang}/` + paths.pricing;
private unsubscribeSubject = new Subject<void>();

5
apps/client/src/app/pages/features/features-page.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { DataService } from '@ghostfolio/client/services/data.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { InfoItem, User } from '@ghostfolio/common/interfaces';
@ -25,8 +26,8 @@ import { Subject, takeUntil } from 'rxjs';
export class GfFeaturesPageComponent implements OnDestroy {
public hasPermissionForSubscription: boolean;
public info: InfoItem;
public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public routerLinkResources = ['/' + $localize`:snake-case:resources`];
public routerLinkRegister = ['/' + paths.register];
public routerLinkResources = ['/' + paths.resources];
public user: User;
private unsubscribeSubject = new Subject<void>();

5
apps/client/src/app/pages/landing/landing-page.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { DataService } from '@ghostfolio/client/services/data.service';
import { Statistics } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
@ -24,8 +25,8 @@ export class LandingPageComponent implements OnDestroy, OnInit {
public hasPermissionForStatistics: boolean;
public hasPermissionForSubscription: boolean;
public hasPermissionToCreateUser: boolean;
public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public routerLinkAbout = ['/' + paths.about];
public routerLinkRegister = ['/' + paths.register];
public statistics: Statistics;
public testimonials = [
{

5
apps/client/src/app/pages/pricing/pricing-page.component.ts

@ -1,4 +1,5 @@
import { NotificationService } from '@ghostfolio/client/core/notification/notification.service';
import { paths } from '@ghostfolio/client/core/paths';
import { DataService } from '@ghostfolio/client/services/data.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { User } from '@ghostfolio/common/interfaces';
@ -40,8 +41,8 @@ export class PricingPageComponent implements OnDestroy, OnInit {
public professionalDataProviderTooltipPremium = translate(
'PROFESSIONAL_DATA_PROVIDER_TOOLTIP_PREMIUM'
);
public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkRegister = ['/' + $localize`:snake-case:register`];
public routerLinkFeatures = ['/' + paths.features];
public routerLinkRegister = ['/' + paths.register];
public user: User;
private unsubscribeSubject = new Subject<void>();

5
apps/client/src/app/pages/register/show-access-token-dialog/show-access-token-dialog.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { DataService } from '@ghostfolio/client/services/data.service';
import {
@ -30,8 +31,8 @@ export class ShowAccessTokenDialog {
public isDisclaimerChecked = false;
public role: string;
public routerLinkAboutTermsOfService = [
'/' + $localize`:snake-case:about`,
$localize`:snake-case:terms-of-service`
'/' + paths.about,
paths.termsOfService
];
private unsubscribeSubject = new Subject<void>();

5
apps/client/src/app/pages/resources/glossary/resources-glossary.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { DataService } from '@ghostfolio/client/services/data.service';
import { InfoItem } from '@ghostfolio/common/interfaces';
import { hasPermission, permissions } from '@ghostfolio/common/permissions';
@ -14,8 +15,8 @@ export class ResourcesGlossaryPageComponent implements OnInit {
public hasPermissionForSubscription: boolean;
public info: InfoItem;
public routerLinkResourcesPersonalFinanceTools = [
'/' + $localize`:snake-case:resources`,
'personal-finance-tools'
'/' + paths.resources,
paths.personalFinanceTools
];
public constructor(private dataService: DataService) {

19
apps/client/src/app/pages/resources/overview/resources-overview.component.ts

@ -1,3 +1,5 @@
import { paths } from '@ghostfolio/client/core/paths';
import { Component } from '@angular/core';
@Component({
@ -12,34 +14,25 @@ export class ResourcesOverviewComponent {
title: 'Frequently Asked Questions (FAQ)',
description:
'Find quick answers to commonly asked questions about Ghostfolio in our Frequently Asked Questions (FAQ) section.',
link: ['/' + $localize`:snake-case:faq`]
link: ['/' + paths.faq]
},
{
title: 'Guides',
description:
'Explore our guides to help you get started with investing and managing your finances.',
link: [
'/' + $localize`:snake-case:resources`,
$localize`:snake-case:guides`
]
link: ['/' + paths.resources, paths.guides]
},
{
title: 'Markets',
description:
'Access various market resources and tools to stay informed about financial markets.',
link: [
'/' + $localize`:snake-case:resources`,
$localize`:snake-case:markets`
]
link: ['/' + paths.resources, paths.markets]
},
{
title: 'Glossary',
description:
'Learn key financial terms and concepts in our comprehensive glossary.',
link: [
'/' + $localize`:snake-case:resources`,
$localize`:snake-case:glossary`
]
link: ['/' + paths.resources, paths.glossary]
}
];
}

3
apps/client/src/app/pages/resources/personal-finance-tools/personal-finance-tools-page.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools';
import { Component, OnDestroy } from '@angular/core';
@ -16,7 +17,7 @@ export class PersonalFinanceToolsPageComponent implements OnDestroy {
public personalFinanceTools = personalFinanceTools.sort((a, b) => {
return a.name.localeCompare(b.name, undefined, { sensitivity: 'base' });
});
public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkAbout = ['/' + paths.about];
private unsubscribeSubject = new Subject<void>();

9
apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts

@ -1,3 +1,4 @@
import { paths } from '@ghostfolio/client/core/paths';
import { DataService } from '@ghostfolio/client/services/data.service';
import { Product } from '@ghostfolio/common/interfaces';
import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools';
@ -19,11 +20,11 @@ export class GfProductPageComponent implements OnInit {
public price: number;
public product1: Product;
public product2: Product;
public routerLinkAbout = ['/' + $localize`:snake-case:about`];
public routerLinkFeatures = ['/' + $localize`:snake-case:features`];
public routerLinkAbout = ['/' + paths.about];
public routerLinkFeatures = ['/' + paths.features];
public routerLinkResourcesPersonalFinanceTools = [
'/' + $localize`:snake-case:resources`,
'personal-finance-tools'
'/' + paths.resources,
paths.personalFinanceTools
];
public tags: string[];

2
apps/client/src/app/pages/resources/resources-page-routing.module.ts

@ -39,7 +39,7 @@ const routes: Routes = [
(m) => m.ResourcesMarketsModule
)
},
...['personal-finance-tools'].map((path) => ({
...[paths.personalFinanceTools].map((path) => ({
path,
loadChildren: () =>
import(

Loading…
Cancel
Save