Fix blocks list pagination on mobile

This commit is contained in:
nymkappa 2022-03-22 15:16:15 +09:00
parent 502ef29e54
commit e1623b9234
No known key found for this signature in database
GPG Key ID: E155910B16E8BD04
2 changed files with 2 additions and 1 deletions

View File

@ -91,7 +91,7 @@
</table>
<ngb-pagination *ngIf="!widget" class="pagination-container float-right mt-2" [class]="isLoading ? 'disabled' : ''"
[collectionSize]="blocksCount" [rotate]="true" [maxSize]="5" [pageSize]="15" [(page)]="page"
[collectionSize]="blocksCount" [rotate]="true" [maxSize]="maxSize" [pageSize]="15" [(page)]="page"
(pageChange)="pageChange(page)" [boundaryLinks]="true" [ellipses]="false">
</ngb-pagination>
</div>

View File

@ -22,6 +22,7 @@ export class BlocksList implements OnInit {
paginationMaxSize: number;
page = 1;
lastPage = 1;
maxSize = window.innerWidth <= 767.98 ? 3 : 5;
blocksCount: number;
fromHeightSubject: BehaviorSubject<number> = new BehaviorSubject(this.fromBlockHeight);
skeletonLines: number[] = [];