Display empty mempool instead of no mempool blocks at all.

This commit is contained in:
softsimon 2020-07-23 10:53:42 +07:00
parent 86c0a5ec7b
commit b6b9001406
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
2 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,6 @@
<div class="mempool-blocks-container">
<div class="flashing">
<div *ngFor="let projectedBlock of mempoolBlocks; let i = index; trackBy: trackByFn">
<ng-template ngFor let-projectedBlock [ngForOf]="mempoolBlocks" let-i="index" [ngForTrackBy]="trackByFn">
<div class="bitcoin-block text-center mempool-block" id="mempool-block-{{ i }}" [ngStyle]="mempoolBlockStyles[i]">
<a [routerLink]="['/mempool-block/' | relativeUrl, i]" class="blockLink">&nbsp;</a>
<div class="block-body" *ngIf="mempoolBlocks?.length">
@ -26,7 +26,8 @@
</div>
<span class="animated-border"></span>
</div>
</div>
</ng-template>
<div *ngIf="mempoolBlocks?.length === 0" class="bitcoin-block mempool-block empty-block">Mempool is empty</div>
</div>
<div *ngIf="arrowVisible" id="arrow-up" [ngStyle]="{'right': rightPosition + 75 + 'px', transition: transition }"></div>
</div>

View File

@ -116,3 +116,13 @@
left: 0;
z-index: 10;
}
.empty-block {
width: 125px;
height: 125px;
right: 40px;
text-align: center;
display: flex;
align-items: center;
}