1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

delay load while syncing

This commit is contained in:
Kyle Spearrin
2018-02-09 11:18:37 -05:00
parent 092bdb5e07
commit f80ae40b1a
5 changed files with 93 additions and 64 deletions

View File

@@ -4,7 +4,6 @@ import {
Component,
EventEmitter,
Input,
OnInit,
Output,
} from '@angular/core';
@@ -20,7 +19,7 @@ import { FolderService } from 'jslib/abstractions/folder.service';
selector: 'app-vault-groupings',
template: template,
})
export class GroupingsComponent implements OnInit {
export class GroupingsComponent {
@Output() onAllClicked = new EventEmitter();
@Output() onFavoritesClicked = new EventEmitter();
@Output() onCipherTypeClicked = new EventEmitter<CipherType>();
@@ -31,6 +30,7 @@ export class GroupingsComponent implements OnInit {
folders: any[];
collections: any[];
loaded: boolean = false;
cipherType = CipherType;
selectedAll: boolean = false;
selectedFavorites: boolean = false;
@@ -39,12 +39,15 @@ export class GroupingsComponent implements OnInit {
selectedFolderId: string = null;
selectedCollectionId: string = null;
constructor(private collectionService: CollectionService, private folderService: FolderService) {
// ctor
constructor(private collectionService: CollectionService, private folderService: FolderService) { }
async load() {
await this.loadFolders();
await this.loadCollections();
this.loaded = true;
}
async ngOnInit() {
await this.loadFolders();
async loadCollections() {
this.collections = await this.collectionService.getAllDecrypted();
}