1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 08:43:33 +00:00

page ciphers list for better performance

This commit is contained in:
Kyle Spearrin
2019-03-19 11:34:56 -04:00
parent 8231b6f09f
commit f02debb03b
8 changed files with 293 additions and 14 deletions

View File

@@ -168,7 +168,7 @@ export class VaultComponent implements OnInit, OnDestroy {
if (params == null) {
this.groupingsComponent.selectedAll = true;
await this.ciphersComponent.load();
await this.ciphersComponent.reload();
} else {
if (params.cipherId) {
const cipherView = new CipherView();
@@ -198,7 +198,7 @@ export class VaultComponent implements OnInit, OnDestroy {
await this.filterCollection(params.collectionId);
} else {
this.groupingsComponent.selectedAll = true;
await this.ciphersComponent.load();
await this.ciphersComponent.reload();
}
}
if (queryParamsSub != null) {
@@ -422,14 +422,14 @@ export class VaultComponent implements OnInit, OnDestroy {
async clearGroupingFilters() {
this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchVault');
await this.ciphersComponent.load();
await this.ciphersComponent.reload();
this.clearFilters();
this.go();
}
async filterFavorites() {
this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchFavorites');
await this.ciphersComponent.load((c) => c.favorite);
await this.ciphersComponent.reload((c) => c.favorite);
this.clearFilters();
this.favorites = true;
this.go();
@@ -437,7 +437,7 @@ export class VaultComponent implements OnInit, OnDestroy {
async filterCipherType(type: CipherType) {
this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchType');
await this.ciphersComponent.load((c) => c.type === type);
await this.ciphersComponent.reload((c) => c.type === type);
this.clearFilters();
this.type = type;
this.go();
@@ -446,7 +446,7 @@ export class VaultComponent implements OnInit, OnDestroy {
async filterFolder(folderId: string) {
folderId = folderId === 'none' ? null : folderId;
this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchFolder');
await this.ciphersComponent.load((c) => c.folderId === folderId);
await this.ciphersComponent.reload((c) => c.folderId === folderId);
this.clearFilters();
this.folderId = folderId == null ? 'none' : folderId;
this.go();
@@ -454,7 +454,8 @@ export class VaultComponent implements OnInit, OnDestroy {
async filterCollection(collectionId: string) {
this.ciphersComponent.searchPlaceholder = this.i18nService.t('searchCollection');
await this.ciphersComponent.load((c) => c.collectionIds != null && c.collectionIds.indexOf(collectionId) > -1);
await this.ciphersComponent.reload((c) => c.collectionIds != null &&
c.collectionIds.indexOf(collectionId) > -1);
this.clearFilters();
this.collectionId = collectionId;
this.updateCollectionProperties();