1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-28 22:23:28 +00:00
Files
browser/apps/web/src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts
Robyn MacCallum c594f23121 [SG-998] Move vault folder into app folder for web (#4824)
* Move vault folder into app folder for web

* Remove extra line is oss module
2023-02-22 11:21:32 -05:00

25 lines
638 B
TypeScript

import { Component, Input } from "@angular/core";
import { CollectionView } from "@bitwarden/common/models/view/collection.view";
@Component({
selector: "app-collection-badge",
templateUrl: "collection-name-badge.component.html",
})
export class CollectionNameBadgeComponent {
@Input() collectionIds: string[];
@Input() collections: CollectionView[];
get shownCollections(): string[] {
return this.showXMore ? this.collectionIds.slice(0, 2) : this.collectionIds;
}
get showXMore(): boolean {
return this.collectionIds.length > 3;
}
get xMoreCount(): number {
return this.collectionIds.length - 2;
}
}