1
0
mirror of https://github.com/bitwarden/browser synced 2024-12-26 09:54:35 +01:00

refactored folders component template to use a single subscription (#7879)

This commit is contained in:
SmithThe4th 2024-02-08 16:44:35 -05:00 committed by GitHub
parent 83fabbc93e
commit 3ee27fc61f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15,20 +15,24 @@
</div>
</header>
<main tabindex="-1">
<div class="box list full-list" *ngIf="(folders$ | async)?.length">
<div class="box-content">
<button
type="button"
appStopClick
(click)="folderSelected(f)"
class="box-content-row padded"
*ngFor="let f of folders$ | async"
>
{{ f.name }}
</button>
<ng-container *ngIf="folders$ | async as folders">
<div class="box list full-list" *ngIf="folders.length; else noFoldersTemplate">
<div class="box-content">
<button
type="button"
appStopClick
(click)="folderSelected(f)"
class="box-content-row padded"
*ngFor="let f of folders"
>
{{ f.name }}
</button>
</div>
</div>
</div>
<div class="no-items" *ngIf="!(folders$ | async)?.length">
<p>{{ "noFolders" | i18n }}</p>
</div>
</ng-container>
<ng-template #noFoldersTemplate>
<div class="no-items">
<p>{{ "noFolders" | i18n }}</p>
</div>
</ng-template>
</main>