Block view.

This commit is contained in:
Simon Lindh
2019-11-12 16:39:59 +08:00
parent bd2bd478ef
commit 309e851ead
24 changed files with 455 additions and 126 deletions

View File

@@ -1,5 +1,8 @@
<div class="modal-header">
<h4 class="modal-title">Fee distribution for block <a href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a></h4>
<h4 class="modal-title">Fee distribution for block
<a *ngIf="!isEsploraEnabled" href="https://www.blockstream.info/block-height/{{ block.height }}" target="_blank">#{{ block.height }}</a>
<a *ngIf="isEsploraEnabled" (click)="activeModal.dismiss()" [routerLink]="['/explorer/block/', block.hash]">#{{ block.height }}</a>
</h4>
<button type="button" class="close" aria-label="Close" (click)="activeModal.dismiss('Cross click')">
<span aria-hidden="true">&times;</span>
</button>

View File

@@ -2,6 +2,7 @@ import { Component, OnInit, Input } from '@angular/core';
import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import { IBlock } from '../../blockchain/interfaces';
import { MemPoolService } from '../../services/mem-pool.service';
import { environment } from '../../../environments/environment';
@Component({
selector: 'app-block-modal',
@@ -11,7 +12,7 @@ import { MemPoolService } from '../../services/mem-pool.service';
export class BlockModalComponent implements OnInit {
@Input() block: IBlock;
blockSubsidy = 50;
isEsploraEnabled = !!environment.esplora;
conversions: any;
constructor(