mirror of
https://github.com/bitwarden/browser
synced 2025-12-13 06:43:35 +00:00
[PM-9638] Browser V2 Item Details Defects (#10124)
* Item Details Refactored. Created OrgIcon directive, Added screen reader logic, removed excess styling.
This commit is contained in:
@@ -3850,5 +3850,8 @@
|
||||
"example": "3"
|
||||
}
|
||||
}
|
||||
},
|
||||
"itemLocation": {
|
||||
"message": "Item Location"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,9 +27,10 @@
|
||||
<app-vault-icon slot="start" [cipher]="cipher"></app-vault-icon>
|
||||
<span data-testid="item-name">{{ cipher.name }}</span>
|
||||
<i
|
||||
class="bwi bwi-sm"
|
||||
*ngIf="cipher.organizationId"
|
||||
[ngClass]="cipher.orgIcon"
|
||||
appOrgIcon
|
||||
[tierType]="cipher.organization.productTierType"
|
||||
[size]="'small'"
|
||||
[appA11yTitle]="orgIconTooltip(cipher)"
|
||||
></i>
|
||||
<span slot="secondary">{{ cipher.subTitle }}</span>
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
SectionHeaderComponent,
|
||||
TypographyModule,
|
||||
} from "@bitwarden/components";
|
||||
import { OrgIconDirective } from "@bitwarden/vault";
|
||||
|
||||
import { VaultPopupAutofillService } from "../../../services/vault-popup-autofill.service";
|
||||
import { PopupCipherView } from "../../../views/popup-cipher.view";
|
||||
@@ -33,6 +34,7 @@ import { ItemMoreOptionsComponent } from "../item-more-options/item-more-options
|
||||
RouterLink,
|
||||
ItemCopyActionsComponent,
|
||||
ItemMoreOptionsComponent,
|
||||
OrgIconDirective,
|
||||
],
|
||||
selector: "app-vault-list-items-container",
|
||||
templateUrl: "vault-list-items-container.component.html",
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Organization } from "@bitwarden/common/admin-console/models/domain/organization";
|
||||
import { ProductTierType } from "@bitwarden/common/billing/enums";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import { CollectionView } from "@bitwarden/common/vault/models/view/collection.view";
|
||||
|
||||
@@ -21,21 +20,4 @@ export class PopupCipherView extends CipherView {
|
||||
this.collections = collections;
|
||||
this.organization = organization;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the bwi icon for the cipher according to the organization type.
|
||||
*/
|
||||
get orgIcon(): "bwi-family" | "bwi-business" | null {
|
||||
switch (this.organization?.productTierType) {
|
||||
case ProductTierType.Free:
|
||||
case ProductTierType.Families:
|
||||
return "bwi-family";
|
||||
case ProductTierType.Teams:
|
||||
case ProductTierType.Enterprise:
|
||||
case ProductTierType.TeamsStarter:
|
||||
return "bwi-business";
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user