Merge branch 'master' into simon/configurable-main-module
# Conflicts: # frontend/src/app/components/blockchain/blockchain.component.ts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<div class="blocks-container" *ngIf="(isLoading$ | async) === false">
|
||||
<div class="blocks-container" *ngIf="loadingBlocks">
|
||||
<div *ngFor="let block of blocks; let i = index; trackBy: trackByBlocksFn" >
|
||||
<div class="text-center bitcoin-block mined-block" id="bitcoin-block-{{ block.height }}" [ngStyle]="blockStyles[i]">
|
||||
<a [routerLink]="['/block/' | relativeUrl, block.id]" [state]="{ data: { block: block } }" class="blockLink"> </a>
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="fees">
|
||||
~{{ block.medianFee | number:'1.0-0' }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
||||
</div>
|
||||
<div class="fee-span" *ngIf="block.feeRange !== undefined">
|
||||
<div class="fee-span">
|
||||
{{ block.feeRange[1] | number:'1.0-0' }} - {{ block.feeRange[block.feeRange.length - 1] | number:'1.0-0' }} <ng-container i18n="shared.sat-vbyte|sat/vB">sat/vB</ng-container>
|
||||
</div>
|
||||
<div class="block-size" [innerHTML]="block.size | bytes: 2">‎</div>
|
||||
@@ -25,7 +25,7 @@
|
||||
<div [hidden]="!arrowVisible" id="arrow-up" [style.transition]="transition" [ngStyle]="{'left': arrowLeftPx + 'px' }"></div>
|
||||
</div>
|
||||
|
||||
<div class="blocks-container" *ngIf="(isLoading$ | async) === true">
|
||||
<div class="blocks-container" *ngIf="!loadingBlocks">
|
||||
<div class="flashing">
|
||||
<div *ngFor="let block of blocks; let i = index; trackBy: trackByBlocksFn" >
|
||||
<div class="text-center bitcoin-block mined-block" id="bitcoin-block-{{ block.height }}" [ngStyle]="blockStyles[i]"></div>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Component, OnInit, OnDestroy, ChangeDetectionStrategy, ChangeDetectorRef, Input } from '@angular/core';
|
||||
import { Subscription, Observable } from 'rxjs';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { Block } from 'src/app/interfaces/electrs.interface';
|
||||
import { StateService } from 'src/app/services/state.service';
|
||||
import { Router } from '@angular/router';
|
||||
@@ -11,8 +11,7 @@ import { Router } from '@angular/router';
|
||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||
})
|
||||
export class BlockchainBlocksComponent implements OnInit, OnDestroy {
|
||||
@Input() isLoading$: Observable<boolean>;
|
||||
|
||||
|
||||
network = '';
|
||||
blocks: Block[] = this.mountEmptyBlocks();
|
||||
markHeight: number;
|
||||
@@ -23,6 +22,7 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
|
||||
blockStyles = [];
|
||||
interval: any;
|
||||
tabHidden = false;
|
||||
loadingBlocks = false;
|
||||
|
||||
arrowVisible = false;
|
||||
arrowLeftPx = 30;
|
||||
@@ -54,6 +54,8 @@ export class BlockchainBlocksComponent implements OnInit, OnDestroy {
|
||||
return;
|
||||
}
|
||||
|
||||
this.loadingBlocks = true;
|
||||
|
||||
if (this.blocks.length && block.height !== this.blocks[0].height + 1) {
|
||||
this.blocks = [];
|
||||
this.blocksFilled = false;
|
||||
|
||||
Reference in New Issue
Block a user