Merge branch 'master' into simon/configurable-main-module

# Conflicts:
#	frontend/src/app/components/blockchain/blockchain.component.ts
This commit is contained in:
softsimon
2021-08-02 00:24:09 +03:00
48 changed files with 494 additions and 386 deletions

View File

@@ -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;