1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +00:00
Files
browser/apps/web/src/app/vault/components/vault-items/vault-collection-row.component.html
Jordan Aasen d76a60cd1d [PM-26017] - Admin Console: Truncate long collection names in collection row (#16508)
* truncate long collection names in collection row

* remove unnecessary css class
2025-09-23 12:50:23 -07:00

110 lines
3.5 KiB
HTML

<td bitCell [ngClass]="RowHeightClass" class="tw-min-w-fit">
@if (this.canEditCollection || this.canDeleteCollection) {
<input
type="checkbox"
bitCheckbox
appStopProp
[disabled]="disabled"
[checked]="checked"
(change)="$event ? this.checkedToggled.next() : null"
[attr.aria-label]="'collectionItemSelect' | i18n"
/>
}
</td>
<td bitCell [ngClass]="RowHeightClass" class="tw-min-w-fit">
<div aria-hidden="true">
<i class="bwi bwi-fw bwi-lg bwi-collection-shared"></i>
</div>
</td>
<td bitCell [ngClass]="RowHeightClass">
<div class="tw-flex">
<button
bitLink
[disabled]="disabled"
type="button"
class="tw-flex tw-text-start tw-leading-snug tw-truncate"
linkType="secondary"
title="{{ 'viewCollectionWithName' | i18n: collection.name }}"
[routerLink]="[]"
[queryParams]="{ collectionId: collection.id }"
queryParamsHandling="merge"
appStopProp
>
<span class="tw-truncate tw-mr-1">{{ collection.name }}</span>
</button>
@if (showAddAccess) {
<button
bitBadge
type="button"
(click)="addAccess(CollectionPermission.Manage)"
variant="warning"
>
{{ "addAccess" | i18n }}
</button>
}
</div>
</td>
<td bitCell [ngClass]="RowHeightClass" *ngIf="showOwner" class="tw-hidden lg:tw-table-cell">
<app-org-badge
[disabled]="disabled"
[organizationId]="collection.organizationId"
[organizationName]="collection.organizationId | orgNameFromId: organizations"
appStopProp
>
</app-org-badge>
</td>
<td bitCell [ngClass]="RowHeightClass" *ngIf="showCollections"></td>
<td bitCell [ngClass]="RowHeightClass" *ngIf="showGroups">
<app-group-badge
*ngIf="collectionGroups"
[selectedGroups]="collectionGroups"
[allGroups]="groups"
></app-group-badge>
</td>
<td bitCell [ngClass]="RowHeightClass" *ngIf="showPermissionsColumn">
<p class="tw-mb-0 tw-text-muted" [title]="permissionTooltip">
{{ permissionText }}
</p>
</td>
<td bitCell [ngClass]="RowHeightClass" class="tw-text-right">
@if (canEditCollection || canDeleteCollection || canViewCollectionInfo) {
<button
[disabled]="disabled"
[bitMenuTriggerFor]="collectionOptions"
size="small"
bitIconButton="bwi-ellipsis-v"
type="button"
label="{{ 'options' | i18n }}"
appStopProp
></button>
}
<bit-menu #collectionOptions>
<ng-container *ngIf="canEditCollection">
<button type="button" bitMenuItem (click)="edit(false)">
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
{{ "editInfo" | i18n }}
</button>
<button type="button" bitMenuItem (click)="access(false)">
<i class="bwi bwi-fw bwi-users" aria-hidden="true"></i>
{{ "editAccess" | i18n }}
</button>
</ng-container>
<ng-container *ngIf="!canEditCollection && canViewCollectionInfo">
<button type="button" bitMenuItem (click)="edit(true)">
<i class="bwi bwi-fw bwi-pencil-square" aria-hidden="true"></i>
{{ "viewInfo" | i18n }}
</button>
<button type="button" bitMenuItem (click)="access(true)">
<i class="bwi bwi-fw bwi-users" aria-hidden="true"></i>
{{ "viewAccess" | i18n }}
</button>
</ng-container>
<button *ngIf="canDeleteCollection" type="button" bitMenuItem (click)="deleteCollection()">
<span class="tw-text-danger">
<i class="bwi bwi-fw bwi-trash" aria-hidden="true"></i>
{{ "delete" | i18n }}
</span>
</button>
</bit-menu>
</td>