mempool/frontend/src/app/components/about/about.component.ts
softsimon 2d02ec7092
Return HTTP 503 from Fee Api when mempool is still syncing.
Fix for displaying git commit on About page.
2020-08-12 13:33:58 +07:00

36 lines
1.1 KiB
TypeScript

import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { WebsocketService } from '../../services/websocket.service';
import { SeoService } from 'src/app/services/seo.service';
import { StateService } from 'src/app/services/state.service';
import { Observable } from 'rxjs';
@Component({
selector: 'app-about',
templateUrl: './about.component.html',
styleUrls: ['./about.component.scss'],
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class AboutComponent implements OnInit {
active = 1;
hostname = document.location.hostname;
gitCommit$: Observable<string>;
constructor(
private websocketService: WebsocketService,
private seoService: SeoService,
private stateService: StateService,
) { }
ngOnInit() {
this.gitCommit$ = this.stateService.gitCommit$;
this.seoService.setTitle('Contributors');
this.websocketService.want(['blocks']);
if (this.stateService.network === 'bisq') {
this.active = 2;
}
if (document.location.port !== '') {
this.hostname = this.hostname + ':' + document.location.port;
}
}
}