2020-09-22 05:51:34 +07:00
|
|
|
<div class="container-xl">
|
2020-12-09 01:57:18 +01:00
|
|
|
<h1 class="float-left" i18n="latest-blocks.blocks">Blocks</h1>
|
2020-09-22 05:51:34 +07:00
|
|
|
<br>
|
|
|
|
|
|
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
|
|
2021-04-19 23:48:33 -07:00
|
|
|
<table class="table table-borderless" [alwaysCallback]="true" infiniteScroll [infiniteScrollDistance]="1.5" [infiniteScrollUpDistance]="1.5" [infiniteScrollThrottle]="50" (scrolled)="loadMore()">
|
2020-09-22 05:51:34 +07:00
|
|
|
<thead>
|
2020-12-02 04:19:33 +09:00
|
|
|
<th style="width: 15%;" i18n="latest-blocks.height">Height</th>
|
|
|
|
|
<th class="d-none d-md-block" style="width: 20%;" i18n="latest-blocks.timestamp">Timestamp</th>
|
|
|
|
|
<th style="width: 20%;" i18n="latest-blocks.mined">Mined</th>
|
|
|
|
|
<th class="d-none d-lg-block" style="width: 15%;" i18n="latest-blocks.transactions">Transactions</th>
|
2020-12-04 21:29:31 +07:00
|
|
|
<th style="width: 20%;" i18n="latest-blocks.size">Size</th>
|
2020-09-22 05:51:34 +07:00
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr *ngFor="let block of blocks; let i= index; trackBy: trackByBlock">
|
|
|
|
|
<td><a [routerLink]="['/block' | relativeUrl, block.id]" [state]="{ data: { block: block } }">{{ block.height }}</a></td>
|
|
|
|
|
<td class="d-none d-md-block">{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}</td>
|
2020-12-02 04:19:33 +09:00
|
|
|
<td><app-time-since [time]="block.timestamp" [fastRender]="true"></app-time-since></td>
|
2020-09-22 05:51:34 +07:00
|
|
|
<td class="d-none d-lg-block">{{ block.tx_count | number }}</td>
|
|
|
|
|
<td>
|
2021-01-12 20:45:41 +07:00
|
|
|
<div class="progress">
|
2021-08-08 04:19:54 +03:00
|
|
|
<div class="progress-bar progress-mempool {{ network$ | async }}" role="progressbar" [ngStyle]="{'width': (block.weight / stateService.env.BLOCK_WEIGHT_UNITS)*100 + '%' }"></div>
|
2021-05-18 11:20:17 -03:00
|
|
|
<div class="progress-text" [innerHTML]="block.size | bytes: 2"></div>
|
2020-09-22 05:51:34 +07:00
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<ng-template [ngIf]="isLoading">
|
|
|
|
|
<tr *ngFor="let item of [1,2,3,4,5,6,7,8,9,10]">
|
|
|
|
|
<td><span class="skeleton-loader"></span></td>
|
|
|
|
|
<td class="d-none d-md-block"><span class="skeleton-loader"></span></td>
|
|
|
|
|
<td><span class="skeleton-loader"></span></td>
|
|
|
|
|
<td class="d-none d-lg-block"><span class="skeleton-loader"></span></td>
|
|
|
|
|
<td><span class="skeleton-loader"></span></td>
|
|
|
|
|
</tr>
|
2021-01-08 21:44:36 +07:00
|
|
|
<ng-container *ngIf="(blocksLoadingStatus$ | async) as blocksLoadingStatus">
|
|
|
|
|
<tr>
|
|
|
|
|
<td colspan="5">
|
2021-01-12 20:45:41 +07:00
|
|
|
<div class="progress progress-dark">
|
2021-01-08 21:44:36 +07:00
|
|
|
<div class="progress-bar progress-darklight" role="progressbar" [ngStyle]="{'width': blocksLoadingStatus + '%' }"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</ng-container>
|
|
|
|
|
</ng-template>
|
2020-09-22 05:51:34 +07:00
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
2021-01-10 22:41:52 +07:00
|
|
|
<ng-template [ngIf]="error">
|
|
|
|
|
<div class="text-center">
|
|
|
|
|
<span>Error loading blocks</span>
|
|
|
|
|
<br>
|
|
|
|
|
<i>{{ error.error }}</i>
|
|
|
|
|
</div>
|
|
|
|
|
</ng-template>
|
|
|
|
|
|
2020-09-22 05:51:34 +07:00
|
|
|
</div>
|