Liquid and Testnet now accessable from the main site

fixes #35
This commit is contained in:
softsimon
2020-05-09 20:37:50 +07:00
parent 20c7ee98e7
commit 1feb985bec
45 changed files with 452 additions and 162 deletions

View File

@@ -1,11 +1,13 @@
<div class="text-center" class="blockchain-wrapper">
<div class="position-container">
<app-mempool-blocks></app-mempool-blocks>
<app-blockchain-blocks></app-blockchain-blocks>
<div id="divider" *ngIf="!isLoading; else loadingTmpl"></div>
<span [hidden]="isLoading">
<app-mempool-blocks></app-mempool-blocks>
<app-blockchain-blocks></app-blockchain-blocks>
<div id="divider"></div>
</span>
<ng-template #loadingTmpl>
<ng-template [ngIf]="isLoading">
<div class="loading-block">
<h3>Waiting for blocks...</h3>
<br>

View File

@@ -1,6 +1,4 @@
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Subscription } from 'rxjs';
import { take } from 'rxjs/operators';
import { Component, OnInit } from '@angular/core';
import { StateService } from 'src/app/services/state.service';
@Component({
@@ -8,9 +6,7 @@ import { StateService } from 'src/app/services/state.service';
templateUrl: './blockchain.component.html',
styleUrls: ['./blockchain.component.scss']
})
export class BlockchainComponent implements OnInit, OnDestroy {
blocksSubscription: Subscription;
export class BlockchainComponent implements OnInit {
txTrackingLoading = false;
txShowTxNotFound = false;
isLoading = true;
@@ -20,14 +16,7 @@ export class BlockchainComponent implements OnInit, OnDestroy {
) {}
ngOnInit() {
this.blocksSubscription = this.stateService.blocks$
.pipe(
take(1)
)
.subscribe(() => this.isLoading = false);
}
ngOnDestroy() {
this.blocksSubscription.unsubscribe();
this.stateService.blocks$.subscribe(() => this.isLoading = false);
this.stateService.networkChanged$.subscribe(() => this.isLoading = true);
}
}