mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
[PM-24951] - update "My Items" icon to bwi-user (#16674)
* update "My Items" icon to bwi-user * fix tests * revert changse to reports. fix assign collections. * revert remaining changes to reports
This commit is contained in:
@@ -7,7 +7,7 @@ import { toSignal } from "@angular/core/rxjs-interop";
|
||||
import { fromEvent, map, startWith } from "rxjs";
|
||||
|
||||
// eslint-disable-next-line no-restricted-imports
|
||||
import { CollectionView } from "@bitwarden/admin-console/common";
|
||||
import { CollectionTypes, CollectionView } from "@bitwarden/admin-console/common";
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
@@ -102,7 +102,9 @@ export class ItemDetailsV2Component {
|
||||
|
||||
getIconClass(item: Organization | CollectionView | FolderView): string {
|
||||
if (item instanceof CollectionView) {
|
||||
return "bwi-collection-shared";
|
||||
return item.type === CollectionTypes.DefaultUserCollection
|
||||
? "bwi-user"
|
||||
: "bwi-collection-shared";
|
||||
} else if (item instanceof FolderView) {
|
||||
return "bwi-folder";
|
||||
}
|
||||
|
||||
@@ -330,7 +330,8 @@ export class AssignCollectionsComponent implements OnInit, OnDestroy, AfterViewI
|
||||
);
|
||||
})
|
||||
.map((c) => ({
|
||||
icon: "bwi-collection-shared",
|
||||
icon:
|
||||
c.type === CollectionTypes.DefaultUserCollection ? "bwi-user" : "bwi-collection-shared",
|
||||
id: c.id,
|
||||
labelName: c.name,
|
||||
listName: c.name,
|
||||
@@ -371,7 +372,7 @@ export class AssignCollectionsComponent implements OnInit, OnDestroy, AfterViewI
|
||||
collection.id !== this.params.activeCollection?.id,
|
||||
)
|
||||
.map((collection) => ({
|
||||
icon: "bwi-collection-shared",
|
||||
icon: collection.icon,
|
||||
id: collection.id,
|
||||
labelName: collection.labelName,
|
||||
listName: collection.listName,
|
||||
@@ -435,7 +436,8 @@ export class AssignCollectionsComponent implements OnInit, OnDestroy, AfterViewI
|
||||
)
|
||||
.subscribe((collections) => {
|
||||
this.availableCollections = collections.map((c) => ({
|
||||
icon: "bwi-collection-shared",
|
||||
icon:
|
||||
c.type === CollectionTypes.DefaultUserCollection ? "bwi-user" : "bwi-collection-shared",
|
||||
id: c.id,
|
||||
labelName: c.name,
|
||||
listName: c.name,
|
||||
|
||||
Reference in New Issue
Block a user