Browse Source

Task/migrate fear and greed index component to standalone (#5485)

* Migrate fear and greed index component to standalone

* Update changelog
pull/5501/head
Thomas Kaul 2 weeks ago
committed by GitHub
parent
commit
1845e016c8
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 10
      apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.ts
  3. 12
      apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.module.ts
  4. 4
      apps/client/src/app/components/home-market/home-market.component.ts
  5. 4
      apps/client/src/app/components/markets/markets.component.ts

1
CHANGELOG.md

@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Extended the variations of the interstitials for the subscription
- Renamed the job identifier column in the jobs queue view of the admin control panel
- Refactored the markets page to standalone
- Refactored the fear and greed index component to standalone
- Refactored the header component to standalone
- Refactored the rule component to standalone
- Refactored the rules component to standalone

10
apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.component.ts

@ -1,21 +1,23 @@
import { resolveFearAndGreedIndex } from '@ghostfolio/common/helper';
import { translate } from '@ghostfolio/ui/i18n';
import { CommonModule } from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
Input,
OnChanges
} from '@angular/core';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
@Component({
selector: 'gf-fear-and-greed-index',
changeDetection: ChangeDetectionStrategy.OnPush,
templateUrl: './fear-and-greed-index.component.html',
imports: [CommonModule, NgxSkeletonLoaderModule],
selector: 'gf-fear-and-greed-index',
styleUrls: ['./fear-and-greed-index.component.scss'],
standalone: false
templateUrl: './fear-and-greed-index.component.html'
})
export class FearAndGreedIndexComponent implements OnChanges {
export class GfFearAndGreedIndexComponent implements OnChanges {
@Input() fearAndGreedIndex: number;
public fearAndGreedIndexEmoji: string;

12
apps/client/src/app/components/fear-and-greed-index/fear-and-greed-index.module.ts

@ -1,12 +0,0 @@
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { FearAndGreedIndexComponent } from './fear-and-greed-index.component';
@NgModule({
declarations: [FearAndGreedIndexComponent],
exports: [FearAndGreedIndexComponent],
imports: [CommonModule, NgxSkeletonLoaderModule]
})
export class GfFearAndGreedIndexModule {}

4
apps/client/src/app/components/home-market/home-market.component.ts

@ -1,4 +1,4 @@
import { GfFearAndGreedIndexModule } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.module';
import { GfFearAndGreedIndexComponent } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.component';
import { DataService } from '@ghostfolio/client/services/data.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { ghostfolioFearAndGreedIndexSymbol } from '@ghostfolio/common/config';
@ -27,7 +27,7 @@ import { takeUntil } from 'rxjs/operators';
@Component({
imports: [
GfBenchmarkComponent,
GfFearAndGreedIndexModule,
GfFearAndGreedIndexComponent,
GfLineChartComponent
],
schemas: [CUSTOM_ELEMENTS_SCHEMA],

4
apps/client/src/app/components/markets/markets.component.ts

@ -1,4 +1,4 @@
import { GfFearAndGreedIndexModule } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.module';
import { GfFearAndGreedIndexComponent } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.component';
import { DataService } from '@ghostfolio/client/services/data.service';
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { resetHours } from '@ghostfolio/common/helper';
@ -30,7 +30,7 @@ import { takeUntil } from 'rxjs/operators';
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
GfBenchmarkComponent,
GfFearAndGreedIndexModule,
GfFearAndGreedIndexComponent,
GfLineChartComponent,
GfToggleComponent
],

Loading…
Cancel
Save