37 lines
991 B
TypeScript
37 lines
991 B
TypeScript
|
import { Component, Input, OnInit, OnChanges, Inject, LOCALE_ID } from '@angular/core';
|
||
|
import { Router } from '@angular/router';
|
||
|
import { RbfInfo } from '../../interfaces/node-api.interface';
|
||
|
import { StateService } from '../../services/state.service';
|
||
|
import { ApiService } from '../../services/api.service';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-rbf-timeline',
|
||
|
templateUrl: './rbf-timeline.component.html',
|
||
|
styleUrls: ['./rbf-timeline.component.scss'],
|
||
|
})
|
||
|
export class RbfTimelineComponent implements OnInit, OnChanges {
|
||
|
@Input() replacements: RbfInfo[];
|
||
|
@Input() txid: string;
|
||
|
|
||
|
dir: 'rtl' | 'ltr' = 'ltr';
|
||
|
|
||
|
constructor(
|
||
|
private router: Router,
|
||
|
private stateService: StateService,
|
||
|
private apiService: ApiService,
|
||
|
@Inject(LOCALE_ID) private locale: string,
|
||
|
) {
|
||
|
if (this.locale.startsWith('ar') || this.locale.startsWith('fa') || this.locale.startsWith('he')) {
|
||
|
this.dir = 'rtl';
|
||
|
}
|
||
|
}
|
||
|
|
||
|
ngOnInit(): void {
|
||
|
|
||
|
}
|
||
|
|
||
|
ngOnChanges(): void {
|
||
|
|
||
|
}
|
||
|
}
|