mirror of
https://github.com/mempool/mempool.git
synced 2024-12-29 09:44:26 +01:00
parent
cb51b71128
commit
1b9900ccf8
@ -112,6 +112,15 @@
|
||||
|
||||
<div [ngbNavOutlet]="nav" class="mt-2"></div>
|
||||
|
||||
<br> <br>
|
||||
<br>
|
||||
|
||||
<div class="text-small text-center">
|
||||
Git commit:
|
||||
<ng-container *ngIf="(mempoolStats$ | async) as mempoolStats">
|
||||
{{ mempoolStats.gitCommit }}
|
||||
</ng-container>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
</div>
|
||||
|
@ -1,17 +1,20 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
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';
|
||||
import { MemPoolState } from 'src/app/interfaces/websocket.interface';
|
||||
|
||||
@Component({
|
||||
selector: 'app-about',
|
||||
templateUrl: './about.component.html',
|
||||
styleUrls: ['./about.component.scss']
|
||||
styleUrls: ['./about.component.scss'],
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class AboutComponent implements OnInit {
|
||||
active = 1;
|
||||
hostname = document.location.hostname;
|
||||
|
||||
mempoolStats$: Observable<MemPoolState>;
|
||||
|
||||
constructor(
|
||||
private websocketService: WebsocketService,
|
||||
@ -20,6 +23,7 @@ export class AboutComponent implements OnInit {
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
this.mempoolStats$ = this.stateService.mempoolStats$;
|
||||
this.seoService.setTitle('Contributors');
|
||||
this.websocketService.want(['blocks']);
|
||||
if (this.stateService.network === 'bisq') {
|
||||
|
@ -31,6 +31,7 @@ export interface MempoolBlock {
|
||||
export interface MemPoolState {
|
||||
memPoolInfo: MempoolInfo;
|
||||
vBytesPerSecond: number;
|
||||
gitCommit: string;
|
||||
}
|
||||
|
||||
export interface MempoolInfo {
|
||||
|
@ -137,6 +137,7 @@ export class WebsocketService {
|
||||
this.stateService.mempoolStats$.next({
|
||||
memPoolInfo: response.mempoolInfo,
|
||||
vBytesPerSecond: response.vBytesPerSecond,
|
||||
gitCommit: response['git-commit']
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user