1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00
Files
browser/libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html
Nick Krantz d6f57149d9 [PM-10375] Remove Identity Margin (#10349)
* remove margin from the last form field across identity sections

* remove bottom margin from the item name when it is the only field

* replace JS margin solution with CSS
2024-08-01 10:48:09 -05:00

59 lines
1.9 KiB
HTML

<bit-section>
<bit-section-header>
<h2 bitTypography="h6">{{ "customFields" | i18n }}</h2>
</bit-section-header>
<bit-card>
<div
class="tw-border-secondary-300 [&_bit-form-field:last-of-type]:tw-mb-0"
*ngFor="let field of fields; let last = last"
[ngClass]="{ 'tw-mb-4': !last }"
>
<bit-form-field *ngIf="field.type === fieldType.Text">
<bit-label>{{ field.name }}</bit-label>
<input readonly bitInput type="text" [value]="field.value" aria-readonly="true" />
<button
bitIconButton="bwi-clone"
bitSuffix
type="button"
[appCopyClick]="field.value"
showToast
[appA11yTitle]="'copyValue' | i18n"
></button>
</bit-form-field>
<bit-form-field *ngIf="field.type === fieldType.Hidden">
<bit-label>{{ field.name }}</bit-label>
<input readonly bitInput type="password" [value]="field.value" aria-readonly="true" />
<button bitSuffix type="button" bitIconButton bitPasswordInputToggle></button>
<button
bitIconButton="bwi-clone"
bitSuffix
type="button"
[appCopyClick]="field.value"
showToast
[appA11yTitle]="'copyValue' | i18n"
></button>
</bit-form-field>
<bit-form-control *ngIf="field.type === fieldType.Boolean">
<input
bitCheckbox
type="checkbox"
[checked]="field.value === 'true'"
aria-readonly="true"
disabled
/>
<bit-label> {{ field.name }} </bit-label>
</bit-form-control>
<bit-form-field *ngIf="field.type === fieldType.Linked">
<bit-label> {{ "linked" | i18n }}: {{ field.name }} </bit-label>
<input
readonly
bitInput
type="text"
[value]="getLinkedType(field.linkedId)"
aria-readonly="true"
/>
</bit-form-field>
</div>
</bit-card>
</bit-section>