|
|
@ -1,4 +1,3 @@ |
|
|
import { GfFearAndGreedIndexComponent } from '@ghostfolio/client/components/fear-and-greed-index/fear-and-greed-index.component'; |
|
|
|
|
|
import { UserService } from '@ghostfolio/client/services/user/user.service'; |
|
|
import { UserService } from '@ghostfolio/client/services/user/user.service'; |
|
|
import { resetHours } from '@ghostfolio/common/helper'; |
|
|
import { resetHours } from '@ghostfolio/common/helper'; |
|
|
import { |
|
|
import { |
|
|
@ -12,6 +11,7 @@ import { |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { hasPermission, permissions } from '@ghostfolio/common/permissions'; |
|
|
import { FearAndGreedIndexMode } from '@ghostfolio/common/types'; |
|
|
import { FearAndGreedIndexMode } from '@ghostfolio/common/types'; |
|
|
import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark'; |
|
|
import { GfBenchmarkComponent } from '@ghostfolio/ui/benchmark'; |
|
|
|
|
|
import { GfFearAndGreedIndexComponent } from '@ghostfolio/ui/fear-and-greed-index'; |
|
|
import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; |
|
|
import { GfLineChartComponent } from '@ghostfolio/ui/line-chart'; |
|
|
import { DataService } from '@ghostfolio/ui/services'; |
|
|
import { DataService } from '@ghostfolio/ui/services'; |
|
|
import { GfToggleComponent } from '@ghostfolio/ui/toggle'; |
|
|
import { GfToggleComponent } from '@ghostfolio/ui/toggle'; |
|
|
@ -64,6 +64,7 @@ export class GfMarketsComponent implements OnInit { |
|
|
protected hasPermissionToAccessFearAndGreedIndex: boolean; |
|
|
protected hasPermissionToAccessFearAndGreedIndex: boolean; |
|
|
protected hasPermissionToReadMarketDataOfMarkets: boolean; |
|
|
protected hasPermissionToReadMarketDataOfMarkets: boolean; |
|
|
protected historicalDataItems: HistoricalDataItem[]; |
|
|
protected historicalDataItems: HistoricalDataItem[]; |
|
|
|
|
|
protected isLoadingFearAndGreedIndex = true; |
|
|
protected user: User; |
|
|
protected user: User; |
|
|
|
|
|
|
|
|
private fearAndGreedIndexData: MarketDataOfMarketsResponse['fearAndGreedIndex']; |
|
|
private fearAndGreedIndexData: MarketDataOfMarketsResponse['fearAndGreedIndex']; |
|
|
@ -104,6 +105,8 @@ export class GfMarketsComponent implements OnInit { |
|
|
!this.fearAndGreedIndexData |
|
|
!this.fearAndGreedIndexData |
|
|
) { |
|
|
) { |
|
|
this.fetchMarketDataOfMarkets(); |
|
|
this.fetchMarketDataOfMarkets(); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.isLoadingFearAndGreedIndex = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
@ -137,6 +140,8 @@ export class GfMarketsComponent implements OnInit { |
|
|
|
|
|
|
|
|
this.initializeFearAndGreedIndex(); |
|
|
this.initializeFearAndGreedIndex(); |
|
|
|
|
|
|
|
|
|
|
|
this.isLoadingFearAndGreedIndex = false; |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
|