mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 16:53:34 +00:00
add/edit folders
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user