1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-21 02:33:46 +00:00

paging ciphers for better performance

This commit is contained in:
Kyle Spearrin
2019-03-19 12:44:22 -04:00
parent e4093209cc
commit cc706a48da
9 changed files with 29 additions and 25 deletions

View File

@@ -1,7 +1,8 @@
<ng-container *ngIf="ciphers">
<table class="table table-hover table-list table-ciphers" *ngIf="ciphers.length > 0">
<ng-container *ngIf="(isPaging() ? pagedCiphers : ciphers) as filteredCiphers">
<table class="table table-hover table-list table-ciphers" *ngIf="filteredCiphers.length" infiniteScroll
[infiniteScrollDistance]="1" [infiniteScrollDisabled]="!isPaging()" (scrolled)="loadMore()">
<tbody>
<tr *ngFor="let c of ciphers">
<tr *ngFor="let c of filteredCiphers">
<td (click)="checkCipher(c)" class="table-list-checkbox" *ngIf="!organization">
<input type="checkbox" [(ngModel)]="c.checked" appStopProp>
</td>
@@ -62,7 +63,7 @@
</tr>
</tbody>
</table>
<div class="no-items" *ngIf="ciphers.length === 0">
<div class="no-items" *ngIf="!filteredCiphers.length">
<i class="fa fa-spinner fa-spin text-muted" *ngIf="!loaded" title="{{'loading' | i18n}}"></i>
<ng-container *ngIf="loaded">
<p>{{'noItemsInList' | i18n}}</p>