mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
load nested collections
This commit is contained in:
parent
59f0549072
commit
b0eea9d7ce
@ -16,8 +16,9 @@ import { FolderService } from '../../abstractions/folder.service';
|
||||
|
||||
export class GroupingsComponent {
|
||||
@Input() showFolders = true;
|
||||
@Input() loadNestedFolder = false;
|
||||
@Input() loadNestedFolders = false;
|
||||
@Input() showCollections = true;
|
||||
@Input() loadNestedCollections = false;
|
||||
@Input() showFavorites = true;
|
||||
|
||||
@Output() onAllClicked = new EventEmitter();
|
||||
@ -31,6 +32,7 @@ export class GroupingsComponent {
|
||||
folders: FolderView[];
|
||||
nestedFolders: Array<TreeNode<FolderView>>;
|
||||
collections: CollectionView[];
|
||||
nestedCollections: Array<TreeNode<CollectionView>>;
|
||||
loaded: boolean = false;
|
||||
cipherType = CipherType;
|
||||
selectedAll: boolean = false;
|
||||
@ -61,6 +63,9 @@ export class GroupingsComponent {
|
||||
} else {
|
||||
this.collections = collections;
|
||||
}
|
||||
if (this.loadNestedCollections) {
|
||||
this.nestedCollections = await this.collectionService.getAllNested(this.collections);
|
||||
}
|
||||
}
|
||||
|
||||
async loadFolders() {
|
||||
@ -68,7 +73,7 @@ export class GroupingsComponent {
|
||||
return;
|
||||
}
|
||||
this.folders = await this.folderService.getAllDecrypted();
|
||||
if (this.loadNestedFolder) {
|
||||
if (this.loadNestedFolders) {
|
||||
this.nestedFolders = await this.folderService.getAllNested();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user