mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-06 09:20:43 +01:00
nested collections
This commit is contained in:
parent
1390d7eb1d
commit
8252512784
2
jslib
2
jslib
@ -1 +1 @@
|
||||
Subproject commit 6aba4550a4b1e643528392d6305df00977046232
|
||||
Subproject commit b0eea9d7cefdc5453750f49985689fefa1fa53a5
|
@ -50,5 +50,9 @@ export class GroupingsComponent extends BaseGroupingsComponent {
|
||||
unassignedCollection.organizationId = this.organization.id;
|
||||
unassignedCollection.readOnly = true;
|
||||
this.collections.push(unassignedCollection);
|
||||
|
||||
if (this.loadNestedCollections) {
|
||||
this.nestedCollections = await this.collectionService.getAllNested(this.collections);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -52,7 +52,7 @@
|
||||
</a>
|
||||
</h3>
|
||||
<ul class="fa-ul card-ul carets">
|
||||
<ng-template #recursiveList let-folders>
|
||||
<ng-template #recursiveFolders let-folders>
|
||||
<li *ngFor="let f of folders" [ngClass]="{active: selectedFolder && f.node.id === selectedFolderId}">
|
||||
<div class="d-flex">
|
||||
<a href="#" appStopClick (click)="selectFolder(f.node)">
|
||||
@ -63,20 +63,26 @@
|
||||
</a>
|
||||
</div>
|
||||
<ul class="fa-ul card-ul carets" *ngIf="f.children.length">
|
||||
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: f.children }"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="recursiveFolders; context:{ $implicit: f.children }"></ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
</ng-template>
|
||||
<ng-container *ngTemplateOutlet="recursiveList; context:{ $implicit: nestedFolders }"></ng-container>
|
||||
<ng-container *ngTemplateOutlet="recursiveFolders; context:{ $implicit: nestedFolders }"></ng-container>
|
||||
</ul>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="showCollections && collections && collections.length">
|
||||
<h3>{{'collections' | i18n}}</h3>
|
||||
<ul class="fa-ul card-ul carets">
|
||||
<li *ngFor="let c of collections" [ngClass]="{active: c.id === selectedCollectionId}">
|
||||
<a href="#" appStopClick (click)="selectCollection(c)">
|
||||
<i class="fa-li fa fa-caret-right"></i> {{c.name}}</a>
|
||||
<ng-template #recursiveCollections let-collections>
|
||||
<li *ngFor="let c of collections" [ngClass]="{active: c.node.id === selectedCollectionId}">
|
||||
<a href="#" appStopClick (click)="selectCollection(c.node)">
|
||||
<i class="fa-li fa fa-caret-right"></i> {{c.node.name}}</a>
|
||||
<ul class="fa-ul card-ul carets" *ngIf="c.children.length">
|
||||
<ng-container *ngTemplateOutlet="recursiveCollections; context:{ $implicit: c.children }"></ng-container>
|
||||
</ul>
|
||||
</li>
|
||||
</ng-template>
|
||||
<ng-container *ngTemplateOutlet="recursiveCollections; context:{ $implicit: nestedCollections }"></ng-container>
|
||||
</ul>
|
||||
</ng-container>
|
||||
</ng-container>
|
||||
|
@ -21,7 +21,8 @@ export class GroupingsComponent extends BaseGroupingsComponent {
|
||||
|
||||
constructor(collectionService: CollectionService, folderService: FolderService) {
|
||||
super(collectionService, folderService);
|
||||
this.loadNestedFolder = true;
|
||||
this.loadNestedFolders = true;
|
||||
this.loadNestedCollections = true;
|
||||
}
|
||||
|
||||
searchTextChanged() {
|
||||
|
Loading…
Reference in New Issue
Block a user