mirror of
https://github.com/bitwarden/browser
synced 2025-12-21 18:53:29 +00:00
infinite scrolling on cipher listing
This commit is contained in:
@@ -17,8 +17,8 @@
|
||||
</div>
|
||||
</header>
|
||||
<content>
|
||||
<ng-container *ngIf="(ciphers | searchCiphers: searchText) as searchedCiphers">
|
||||
<div class="no-items" *ngIf="!searchedCiphers.length">
|
||||
<ng-container *ngIf="(isSearching() ? (ciphers | searchCiphers: searchText) : pagedCiphers) as filteredCiphers">
|
||||
<div class="no-items" *ngIf="!filteredCiphers.length">
|
||||
<i class="fa fa-spinner fa-spin fa-3x" *ngIf="!loaded"></i>
|
||||
<ng-container *ngIf="loaded">
|
||||
<p>{{'noItemsInList' | i18n}}</p>
|
||||
@@ -27,13 +27,15 @@
|
||||
</button>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div class="box list only-list" *ngIf="searchedCiphers.length > 0">
|
||||
<div class="box list only-list" *ngIf="filteredCiphers.length > 0"
|
||||
infiniteScroll [infiniteScrollDistance]="1" [infiniteScrollContainer]="'content'" [fromRoot]="true"
|
||||
[infiniteScrollDisabled]="isSearching()" (scrolled)="loadMore()">
|
||||
<div class="box-header">
|
||||
{{groupingTitle}}
|
||||
<span class="flex-right">{{searchedCiphers.length}}</span>
|
||||
<span class="flex-right">{{isSearching() ? filteredCiphers.length : ciphers.length}}</span>
|
||||
</div>
|
||||
<div class="box-content">
|
||||
<app-ciphers-list [ciphers]="searchedCiphers" title="{{'viewItem' | i18n}}"
|
||||
<app-ciphers-list [ciphers]="filteredCiphers" title="{{'viewItem' | i18n}}"
|
||||
(onSelected)="selectCipher($event)"
|
||||
(onDoubleSelected)="launchCipher($event)"></app-ciphers-list>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user