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

add/edit folders

This commit is contained in:
Kyle Spearrin
2018-01-30 15:40:06 -05:00
parent 7c181ee5f3
commit 442042f59d
9 changed files with 194 additions and 5 deletions

View File

@@ -25,6 +25,8 @@ export class GroupingsComponent implements OnInit {
@Output() onFavoritesClicked = new EventEmitter();
@Output() onCipherTypeClicked = new EventEmitter<CipherType>();
@Output() onFolderClicked = new EventEmitter<FolderView>();
@Output() onAddFolder = new EventEmitter();
@Output() onEditFolder = new EventEmitter<FolderView>();
@Output() onCollectionClicked = new EventEmitter<CollectionView>();
folders: any[];
@@ -42,10 +44,14 @@ export class GroupingsComponent implements OnInit {
}
async ngOnInit() {
this.folders = await this.folderService.getAllDecrypted();
await this.loadFolders();
this.collections = await this.collectionService.getAllDecrypted();
}
async loadFolders() {
this.folders = await this.folderService.getAllDecrypted();
}
all() {
this.clearSelections();
this.selectedAll = true;
@@ -71,6 +77,14 @@ export class GroupingsComponent implements OnInit {
this.onFolderClicked.emit(folder);
}
addFolder() {
this.onAddFolder.emit();
}
editFolder(folder: FolderView) {
this.onEditFolder.emit(folder);
}
collection(collection: CollectionView) {
this.clearSelections();
this.selectedCollectionId = collection.id;