Display at least one standalone mempool block.

Upgrade some packages to ng 9.
This commit is contained in:
softsimon 2020-06-04 15:08:24 +07:00
parent e917d40909
commit 6662bc4646
No known key found for this signature in database
GPG Key ID: 488D7DCFB5A430D7
3 changed files with 4 additions and 7 deletions

View File

@ -39,12 +39,12 @@
"@angular/platform-browser": "~9.1.0", "@angular/platform-browser": "~9.1.0",
"@angular/platform-browser-dynamic": "~9.1.0", "@angular/platform-browser-dynamic": "~9.1.0",
"@angular/router": "~9.1.0", "@angular/router": "~9.1.0",
"@ng-bootstrap/ng-bootstrap": "^5.3.0", "@ng-bootstrap/ng-bootstrap": "^6.1.0",
"@types/qrcode": "^1.3.4", "@types/qrcode": "^1.3.4",
"bootstrap": "4.5.0", "bootstrap": "4.5.0",
"chartist": "^0.11.4", "chartist": "^0.11.4",
"clipboard": "^2.0.4", "clipboard": "^2.0.4",
"ngx-infinite-scroll": "^8.0.1", "ngx-infinite-scroll": "^9.0.0",
"qrcode": "^1.4.4", "qrcode": "^1.4.4",
"rxjs": "~6.5.3", "rxjs": "~6.5.3",
"tlite": "^0.1.9", "tlite": "^0.1.9",

View File

@ -30,10 +30,7 @@ export class AssetsComponent implements OnInit {
) { } ) { }
ngOnInit() { ngOnInit() {
this.itemsPerPage = Math.round(this.contentSpace / this.fiveItemsPxSize) * 5; this.itemsPerPage = Math.max(Math.round(this.contentSpace / this.fiveItemsPxSize) * 5, 10);
if (this.itemsPerPage === 5) {
this.itemsPerPage = 10;
}
setTimeout(() => this.getAssets()); setTimeout(() => this.getAssets());

View File

@ -109,7 +109,7 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
} }
reduceMempoolBlocksToFitScreen(blocks: MempoolBlock[]): MempoolBlock[] { reduceMempoolBlocksToFitScreen(blocks: MempoolBlock[]): MempoolBlock[] {
const blocksAmount = Math.max(1, Math.floor(window.innerWidth / 2 / (this.blockWidth + this.blockPadding))); const blocksAmount = Math.max(2, Math.floor(window.innerWidth / 2 / (this.blockWidth + this.blockPadding)));
while (blocks.length > blocksAmount) { while (blocks.length > blocksAmount) {
const block = blocks.pop(); const block = blocks.pop();
const lastBlock = blocks[blocks.length - 1]; const lastBlock = blocks[blocks.length - 1];