mirror of https://github.com/ghostfolio/ghostfolio
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
752 B
30 lines
752 B
import {
|
|
ChangeDetectionStrategy,
|
|
Component,
|
|
Input,
|
|
OnChanges
|
|
} from '@angular/core';
|
|
import { locale } from '@ghostfolio/common/config';
|
|
import { resolveMarketCondition } from '@ghostfolio/common/helper';
|
|
import { Benchmark } from '@ghostfolio/common/interfaces';
|
|
|
|
@Component({
|
|
selector: 'gf-benchmark',
|
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
templateUrl: './benchmark.component.html',
|
|
styleUrls: ['./benchmark.component.scss']
|
|
})
|
|
export class BenchmarkComponent implements OnChanges {
|
|
@Input() benchmarks: Benchmark[];
|
|
@Input() locale: string;
|
|
|
|
public resolveMarketCondition = resolveMarketCondition;
|
|
|
|
public constructor() {}
|
|
|
|
public ngOnChanges() {
|
|
if (!this.locale) {
|
|
this.locale = locale;
|
|
}
|
|
}
|
|
}
|
|
|