mirror of
https://github.com/bitwarden/browser
synced 2024-12-26 18:04:07 +01:00
refactored folders component template to use a single subscription (#7879)
This commit is contained in:
parent
83fabbc93e
commit
3ee27fc61f
@ -15,20 +15,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<main tabindex="-1">
|
<main tabindex="-1">
|
||||||
<div class="box list full-list" *ngIf="(folders$ | async)?.length">
|
<ng-container *ngIf="folders$ | async as folders">
|
||||||
<div class="box-content">
|
<div class="box list full-list" *ngIf="folders.length; else noFoldersTemplate">
|
||||||
<button
|
<div class="box-content">
|
||||||
type="button"
|
<button
|
||||||
appStopClick
|
type="button"
|
||||||
(click)="folderSelected(f)"
|
appStopClick
|
||||||
class="box-content-row padded"
|
(click)="folderSelected(f)"
|
||||||
*ngFor="let f of folders$ | async"
|
class="box-content-row padded"
|
||||||
>
|
*ngFor="let f of folders"
|
||||||
{{ f.name }}
|
>
|
||||||
</button>
|
{{ f.name }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</ng-container>
|
||||||
<div class="no-items" *ngIf="!(folders$ | async)?.length">
|
<ng-template #noFoldersTemplate>
|
||||||
<p>{{ "noFolders" | i18n }}</p>
|
<div class="no-items">
|
||||||
</div>
|
<p>{{ "noFolders" | i18n }}</p>
|
||||||
|
</div>
|
||||||
|
</ng-template>
|
||||||
</main>
|
</main>
|
||||||
|
Loading…
Reference in New Issue
Block a user