1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-09-27 03:53:00 +02:00
bitwarden-desktop/src/app/vault/view-custom-fields.component.html

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
2.5 KiB
HTML
Raw Normal View History

<div class="box">
<div class="box-header">
{{ "customFields" | i18n }}
</div>
<div class="box-content">
<div class="box-content-row box-content-row-flex" *ngFor="let field of cipher.fields">
<div class="row-main">
<span class="row-label">{{ field.name }}</span>
<div *ngIf="field.type === fieldType.Text">
{{ field.value || "&nbsp;" }}
</div>
<div *ngIf="field.type === fieldType.Hidden">
<span *ngIf="field.showValue" class="monospaced show-whitespace">{{ field.value }}</span>
<span *ngIf="!field.showValue" class="monospaced">{{ field.maskedValue }}</span>
</div>
<div *ngIf="field.type === fieldType.Boolean">
<i class="fa fa-check-square-o" *ngIf="field.value === 'true'" aria-hidden="true"></i>
<i class="fa fa-square-o" *ngIf="field.value !== 'true'" aria-hidden="true"></i>
<span class="sr-only">{{ field.value }}</span>
</div>
<div *ngIf="field.type === fieldType.Linked" class="box-content-row-flex">
<div class="icon icon-small">
<i class="fa fa-link" aria-hidden="true" appA11yTitle="{{ 'linkedValue' | i18n }}"></i>
<span class="sr-only">{{ "linkedValue" | i18n }}</span>
2021-12-20 15:47:17 +01:00
</div>
<span>{{ cipher.linkedFieldI18nKey(field.linkedId) | i18n }}</span>
</div>
2021-12-20 15:47:17 +01:00
</div>
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
appStopClick
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
*ngIf="field.type === fieldType.Hidden && cipher.viewPassword"
(click)="toggleFieldValue(field)"
role="button"
2021-12-20 15:47:17 +01:00
>
<i
class="fa fa-lg"
aria-hidden="true"
[ngClass]="{ 'fa-eye': !field.showValue, 'fa-eye-slash': field.showValue }"
2021-12-20 15:47:17 +01:00
></i>
</a>
<a
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
appStopClick
appA11yTitle="{{ 'copyValue' | i18n }}"
2021-12-20 15:47:17 +01:00
*ngIf="
field.value &&
field.type !== fieldType.Boolean &&
field.type !== fieldType.Linked &&
!(field.type === fieldType.Hidden && !cipher.viewPassword)
2021-12-20 15:47:17 +01:00
"
(click)="
copy(field.value, 'value', field.type === fieldType.Hidden ? 'H_Field' : 'Field')
2021-12-20 15:47:17 +01:00
"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="fa fa-lg fa-clone" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
</div>
</div>
2021-12-20 15:47:17 +01:00
</div>
</div>