bitwarden-desktop/src/app/vault/view.component.html

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

423 lines
15 KiB
HTML
Raw Normal View History

2018-01-24 04:21:14 +01:00
<div class="content">
2018-01-25 05:26:40 +01:00
<div class="inner-content" *ngIf="cipher">
2018-01-24 04:57:24 +01:00
<div class="box">
<div class="box-header">
2018-01-24 22:32:24 +01:00
{{ "itemInformation" | i18n }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="box-content">
2018-01-24 04:57:24 +01:00
<div class="box-content-row">
2018-01-24 22:32:24 +01:00
<span class="row-label">{{ "name" | i18n }}</span>
2018-01-24 06:06:05 +01:00
{{ cipher.name }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 20:25:44 +01:00
<!-- Login -->
2018-01-24 20:59:03 +01:00
<div *ngIf="cipher.login">
2018-01-29 23:11:31 +01:00
<div class="box-content-row box-content-row-flex" *ngIf="cipher.login.username">
2019-10-25 01:55:21 +02:00
<div class="row-main">
2021-12-20 15:47:17 +01:00
<span
2019-10-25 01:55:21 +02:00
class="row-label draggable"
draggable="true"
(dragstart)="setTextDataOnDrag($event, cipher.login.username)"
2018-01-25 20:25:44 +01:00
>{{ "username" | i18n }}</span
2021-12-20 15:47:17 +01:00
>
2018-01-29 23:11:31 +01:00
{{ cipher.login.username }}
2018-01-24 04:57:24 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="action-buttons">
2019-04-02 04:43:42 +02:00
<a
class="row-btn"
href="#"
appStopClick
appA11yTitle="{{ 'copyUsername' | i18n }}"
(click)="copy(cipher.login.username, 'username', 'Username')"
2019-04-03 06:04:42 +02:00
role="button"
2018-01-25 20:25:44 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2018-01-25 20:25:44 +01:00
</a>
2018-01-24 04:57:24 +01:00
</div>
2018-01-25 05:26:40 +01:00
</div>
2018-03-02 05:45:12 +01:00
<div class="box-content-row box-content-row-flex" *ngIf="cipher.login.password">
<div class="row-main">
<span
class="row-label draggable"
2019-10-25 01:55:21 +02:00
draggable="true"
2018-03-02 05:45:12 +01:00
(dragstart)="setTextDataOnDrag($event, cipher.login.password)"
>{{ "password" | i18n }}</span
2021-12-20 15:47:17 +01:00
>
2018-03-02 05:45:12 +01:00
<div *ngIf="!showPassword" class="monospaced">
{{ cipher.login.maskedPassword }}
</div>
2021-12-20 15:47:17 +01:00
<div
2018-03-02 05:45:12 +01:00
*ngIf="showPassword"
2019-04-02 04:43:42 +02:00
class="monospaced password-wrapper"
appSelectCopy
[innerHTML]="cipher.login.password | colorPassword"
2018-03-02 05:45:12 +01:00
></div>
</div>
2018-01-25 05:26:40 +01:00
<div class="action-buttons" *ngIf="cipher.viewPassword">
2021-12-20 15:47:17 +01:00
<button
2018-01-25 05:26:40 +01:00
type="button"
#checkPasswordBtn
class="row-btn btn"
appBlurClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'checkPassword' | i18n }}"
(click)="checkPassword()"
2019-02-21 22:53:32 +01:00
[appApiAction]="checkPasswordPromise"
[disabled]="checkPasswordBtn.loading"
2021-12-20 15:47:17 +01:00
>
<i
class="bwi bwi-lg bwi-check-circle"
2018-01-25 05:26:40 +01:00
[hidden]="checkPasswordBtn.loading"
aria-hidden="true"
2021-12-20 15:47:17 +01:00
></i>
<i
class="bwi bwi-lg bwi-spinner bwi-spin"
2019-04-02 04:56:28 +02:00
[hidden]="!checkPasswordBtn.loading"
aria-hidden="true"
2021-12-20 15:47:17 +01:00
></i>
</button>
2021-12-20 15:47:17 +01:00
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
appStopClick
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="togglePassword()"
2018-01-25 05:26:40 +01:00
role="button"
2021-12-20 15:47:17 +01:00
>
<i
class="bwi bwi-lg"
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }"
2021-12-20 15:47:17 +01:00
></i>
</a>
<a
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
appStopClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'copyPassword' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="copy(cipher.login.password, 'password', 'Password')"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
2018-01-25 05:26:40 +01:00
</div>
2019-03-28 17:09:08 +01:00
</div>
<div
class="box-content-row box-content-row-flex totp"
2018-01-29 23:11:31 +01:00
[ngClass]="{ low: totpLow }"
2019-03-28 17:09:08 +01:00
*ngIf="cipher.login.totp && totpCode"
2021-12-20 15:47:17 +01:00
>
2018-01-29 23:11:31 +01:00
<div class="row-main">
2021-12-20 15:47:17 +01:00
<span
2019-03-28 17:09:08 +01:00
class="row-label draggable"
2019-10-25 01:55:21 +02:00
draggable="true"
(dragstart)="setTextDataOnDrag($event, totpCode)"
>{{ "verificationCodeTotp" | i18n }}</span
2021-12-20 15:47:17 +01:00
>
2019-03-28 17:09:08 +01:00
<span class="totp-code">{{ totpCodeFormatted }}</span>
2018-01-25 05:26:40 +01:00
</div>
<span class="totp-countdown">
<span class="totp-sec">{{ totpSec }}</span>
2021-12-20 15:47:17 +01:00
<svg>
<g>
<circle
2018-01-25 05:26:40 +01:00
class="totp-circle inner"
2021-12-20 15:47:17 +01:00
r="12.6"
cy="16"
cx="16"
2019-02-21 22:53:32 +01:00
[ngStyle]="{ 'stroke-dashoffset.px': totpDash }"
2018-01-25 05:26:40 +01:00
></circle>
<circle class="totp-circle outer" r="14" cy="16" cx="16"></circle>
2021-12-20 15:47:17 +01:00
</g>
</svg>
</span>
2018-01-25 20:25:44 +01:00
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-02 04:43:42 +02:00
appStopClick
appA11yTitle="{{ 'copyValue' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="copy(totpCode, 'verificationCodeTotp', 'TOTP')"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
</div>
</div>
2018-01-25 05:26:40 +01:00
</div>
2018-01-25 20:25:44 +01:00
<!-- Card -->
<div *ngIf="cipher.card">
<div class="box-content-row" *ngIf="cipher.card.cardholderName">
<span class="row-label">{{ "cardholderName" | i18n }}</span>
{{ cipher.card.cardholderName }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="box-content-row box-content-row-flex" *ngIf="cipher.card.number">
2018-01-29 23:11:31 +01:00
<div class="row-main">
2018-01-25 20:25:44 +01:00
<span class="row-label">{{ "number" | i18n }}</span>
2021-09-10 15:32:08 +02:00
<span *ngIf="!showCardNumber" class="monospaced">{{ cipher.card.maskedNumber }}</span>
<span *ngIf="showCardNumber" class="monospaced">{{ cipher.card.number }}</span>
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-02 04:43:42 +02:00
appStopClick
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
(click)="toggleCardNumber()"
2019-04-03 06:04:42 +02:00
role="button"
2021-12-20 15:47:17 +01:00
>
<i
class="bwi bwi-lg"
2018-01-25 05:26:40 +01:00
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showCardNumber, 'bwi-eye-slash': showCardNumber }"
2021-12-20 15:47:17 +01:00
></i>
</a>
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-02 04:43:42 +02:00
appStopClick
2018-01-25 05:26:40 +01:00
appA11yTitle="{{ 'copyNumber' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="copy(cipher.card.number, 'number', 'Card Number')"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
2018-01-25 05:26:40 +01:00
</div>
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="box-content-row" *ngIf="cipher.card.brand">
2018-01-25 20:25:44 +01:00
<span class="row-label">{{ "brand" | i18n }}</span>
{{ cipher.card.brand }}
2021-12-20 15:47:17 +01:00
</div>
2018-02-04 21:52:32 +01:00
<div class="box-content-row" *ngIf="cipher.card.expiration">
2018-01-25 20:25:44 +01:00
<span class="row-label">{{ "expiration" | i18n }}</span>
{{ cipher.card.expiration }}
2021-12-20 15:47:17 +01:00
</div>
2018-02-04 21:52:32 +01:00
<div class="box-content-row box-content-row-flex" *ngIf="cipher.card.code">
2018-01-30 05:19:55 +01:00
<div class="row-main">
<span class="row-label">{{ "securityCode" | i18n }}</span>
2019-04-02 05:08:54 +02:00
<span *ngIf="!showCardCode" class="monospaced">{{ cipher.card.maskedCode }}</span>
<span *ngIf="showCardCode" class="monospaced">{{ cipher.card.code }}</span>
2018-01-24 04:57:24 +01:00
</div>
2018-03-02 05:45:12 +01:00
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-02-21 22:53:32 +01:00
appStopClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'toggleVisibility' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="toggleCardCode()"
role="button"
2021-12-20 15:47:17 +01:00
>
<i
class="bwi bwi-lg"
2019-04-02 04:56:28 +02:00
aria-hidden="true"
[ngClass]="{ 'bwi-eye': !showCardCode, 'bwi-eye-slash': showCardCode }"
2021-12-20 15:47:17 +01:00
></i>
</a>
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-02-21 22:53:32 +01:00
appStopClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'copySecurityCode' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="copy(cipher.card.code, 'securityCode', 'Security Code')"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-clone" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
</div>
</div>
2018-01-24 04:57:24 +01:00
</div>
2018-01-25 20:25:44 +01:00
<!-- Identity -->
<div *ngIf="cipher.identity">
<div class="box-content-row" *ngIf="cipher.identity.fullName">
<span class="row-label">{{ "identityName" | i18n }}</span>
{{ cipher.identity.fullName }}
2021-12-20 15:47:17 +01:00
</div>
<div class="box-content-row" *ngIf="cipher.identity.username">
<span class="row-label">{{ "username" | i18n }}</span>
2018-01-25 20:25:44 +01:00
{{ cipher.identity.username }}
2021-12-20 15:47:17 +01:00
</div>
<div class="box-content-row" *ngIf="cipher.identity.company">
2018-01-25 20:25:44 +01:00
<span class="row-label">{{ "company" | i18n }}</span>
{{ cipher.identity.company }}
</div>
2018-01-25 20:25:44 +01:00
<div class="box-content-row" *ngIf="cipher.identity.ssn">
<span class="row-label">{{ "ssn" | i18n }}</span>
{{ cipher.identity.ssn }}
</div>
<div class="box-content-row" *ngIf="cipher.identity.passportNumber">
<span class="row-label">{{ "passportNumber" | i18n }}</span>
{{ cipher.identity.passportNumber }}
</div>
<div class="box-content-row" *ngIf="cipher.identity.licenseNumber">
<span class="row-label">{{ "licenseNumber" | i18n }}</span>
2018-01-25 20:25:44 +01:00
{{ cipher.identity.licenseNumber }}
</div>
<div class="box-content-row" *ngIf="cipher.identity.email">
2019-02-21 22:53:32 +01:00
<span class="row-label">{{ "email" | i18n }}</span>
{{ cipher.identity.email }}
2021-12-20 15:47:17 +01:00
</div>
2019-04-03 06:04:42 +02:00
<div class="box-content-row" *ngIf="cipher.identity.phone">
2019-04-02 04:43:42 +02:00
<span class="row-label">{{ "phone" | i18n }}</span>
{{ cipher.identity.phone }}
2021-12-20 15:47:17 +01:00
</div>
<div
2019-04-02 04:43:42 +02:00
class="box-content-row"
*ngIf="cipher.identity.address1 || cipher.identity.city || cipher.identity.country"
2021-12-20 15:47:17 +01:00
>
2019-04-02 04:56:28 +02:00
<span class="row-label">{{ "address" | i18n }}</span>
<div *ngIf="cipher.identity.address1">{{ cipher.identity.address1 }}</div>
<div *ngIf="cipher.identity.address2">{{ cipher.identity.address2 }}</div>
<div *ngIf="cipher.identity.address3">{{ cipher.identity.address3 }}</div>
2019-04-29 16:13:35 +02:00
<div *ngIf="cipher.identity.fullAddressPart2">
{{ cipher.identity.fullAddressPart2 }}
</div>
2018-01-25 20:25:44 +01:00
<div *ngIf="cipher.identity.country">{{ cipher.identity.country }}</div>
2021-12-20 15:47:17 +01:00
</div>
</div>
</div>
</div>
2018-03-02 05:45:12 +01:00
<div class="box" *ngIf="cipher.login && cipher.login.hasUris">
2018-01-25 05:26:40 +01:00
<div class="box-content">
2021-12-20 15:47:17 +01:00
<div
2018-01-29 23:11:31 +01:00
class="box-content-row box-content-row-flex"
2018-03-02 05:45:12 +01:00
*ngFor="let u of cipher.login.uris; let i = index"
2021-12-20 15:47:17 +01:00
>
2018-01-29 23:11:31 +01:00
<div class="row-main">
<span class="row-label" *ngIf="!u.isWebsite">{{ "uri" | i18n }}</span>
2018-03-02 05:45:12 +01:00
<span class="row-label" *ngIf="u.isWebsite">{{ "website" | i18n }}</span>
<span title="{{ u.uri }}">{{ u.hostOrUri }}</span>
2021-12-20 15:47:17 +01:00
</div>
2018-03-02 05:45:12 +01:00
<div class="action-buttons">
2021-12-20 15:47:17 +01:00
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-03 06:04:42 +02:00
appStopClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'launch' | i18n }}"
*ngIf="u.canLaunch"
2019-04-03 06:04:42 +02:00
(click)="launch(u)"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-share-square" aria-hidden="true"></i>
2021-12-20 15:47:17 +01:00
</a>
<a
2019-04-02 04:43:42 +02:00
class="row-btn"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-03 06:04:42 +02:00
appStopClick
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'copyUri' | i18n }}"
2019-04-03 06:04:42 +02:00
(click)="copy(u.uri, u.isWebsite ? 'website' : 'uri', 'URI')"
role="button"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-lg bwi-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>
2018-01-29 23:11:31 +01:00
<div class="box" *ngIf="cipher.notes">
2018-01-25 20:25:44 +01:00
<div class="box-header">
2018-01-25 05:26:40 +01:00
{{ "notes" | i18n }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="box-content">
2018-01-29 23:11:31 +01:00
<div class="box-content-row pre-wrap">{{ cipher.notes }}</div>
2021-12-20 15:47:17 +01:00
</div>
2018-01-24 04:57:24 +01:00
</div>
<app-vault-view-custom-fields
2018-03-02 05:45:12 +01:00
*ngIf="cipher.hasFields"
[cipher]="cipher"
[promptPassword]="promptPassword.bind(this)"
[copy]="copy.bind(this)"
2021-12-20 15:47:17 +01:00
>
</app-vault-view-custom-fields>
<div class="box" *ngIf="cipher.hasAttachments && (canAccessPremium || cipher.organizationId)">
2018-01-25 20:25:44 +01:00
<div class="box-header">
2019-10-25 01:55:21 +02:00
{{ "attachments" | i18n }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-25 05:26:40 +01:00
<div class="box-content">
2021-12-20 15:47:17 +01:00
<a
2018-01-29 23:11:31 +01:00
class="box-content-row box-content-row-flex text-default"
2019-02-21 22:53:32 +01:00
*ngFor="let attachment of cipher.attachments"
2021-12-20 15:47:17 +01:00
href="#"
2019-04-03 06:04:42 +02:00
appStopClick
appBlurCLick
2019-02-21 22:53:32 +01:00
(click)="downloadAttachment(attachment)"
2021-12-20 15:47:17 +01:00
>
2018-01-25 20:25:44 +01:00
<span class="row-main">{{ attachment.fileName }}</span>
<small class="row-sub-label">{{ attachment.sizeName }}</small>
2021-12-20 15:47:17 +01:00
<i
class="bwi bwi-download bwi-fw row-sub-icon"
2019-04-02 05:08:54 +02:00
*ngIf="!attachment.downloading"
aria-hidden="true"
2021-12-20 15:47:17 +01:00
></i>
<i
class="bwi bwi-spinner bwi-fw bwi-spin row-sub-icon"
2019-04-02 05:08:54 +02:00
*ngIf="attachment.downloading"
aria-hidden="true"
2021-12-20 15:47:17 +01:00
></i>
</a>
</div>
</div>
2018-03-02 05:45:12 +01:00
<div class="box">
2018-01-29 23:11:31 +01:00
<div class="box-footer">
2021-12-20 15:47:17 +01:00
<div>
<b class="font-weight-semibold">{{ "dateUpdated" | i18n }}:</b>
{{ cipher.revisionDate | date: "medium" }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-29 23:11:31 +01:00
<div *ngIf="cipher.passwordRevisionDisplayDate">
<b class="font-weight-semibold">{{ "datePasswordUpdated" | i18n }}:</b>
2019-10-25 01:55:21 +02:00
{{ cipher.passwordRevisionDisplayDate | date: "medium" }}
2021-12-20 15:47:17 +01:00
</div>
2018-01-29 23:11:31 +01:00
<div *ngIf="cipher.hasPasswordHistory">
2019-02-21 22:53:32 +01:00
<b class="font-weight-semibold">{{ "passwordHistory" | i18n }}:</b>
2021-12-20 15:47:17 +01:00
<a
href="#"
2019-04-03 06:04:42 +02:00
(click)="viewHistory()"
appStopClick
role="button"
2019-04-02 04:43:42 +02:00
appA11yTitle="{{ 'passwordHistory' | i18n }}, {{ cipher.passwordHistory.length }}"
2021-12-20 15:47:17 +01:00
>
2021-09-10 15:32:08 +02:00
<span aria-hidden="true">{{ cipher.passwordHistory.length }}</span>
2021-12-20 15:47:17 +01:00
</a>
</div>
</div>
</div>
</div>
2018-01-24 04:21:14 +01:00
</div>
<div class="footer" *ngIf="cipher">
<button
appBlurClick
class="primary"
(click)="edit()"
appA11yTitle="{{ 'edit' | i18n }}"
*ngIf="!cipher.isDeleted"
>
<i class="bwi bwi-pencil bwi-fw bwi-lg" aria-hidden="true"></i>
2018-01-31 18:52:12 +01:00
</button>
<button
appBlurClick
class="primary"
(click)="restore()"
appA11yTitle="{{ 'restore' | i18n }}"
*ngIf="cipher.isDeleted"
>
<i class="bwi bwi-undo bwi-fw bwi-lg" aria-hidden="true"></i>
</button>
2021-12-20 15:47:17 +01:00
<button
appBlurClick
class="primary"
*ngIf="!cipher?.organizationId && !cipher.isDeleted"
(click)="clone()"
appA11yTitle="{{ 'clone' | i18n }}"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-files bwi-fw bwi-lg" aria-hidden="true"></i>
</button>
<div class="right">
2021-12-20 15:47:17 +01:00
<button
appBlurClick
type="button"
(click)="delete()"
class="danger"
appA11yTitle="{{ (cipher.isDeleted ? 'permanentlyDelete' : 'delete') | i18n }}"
2021-12-20 15:47:17 +01:00
>
<i class="bwi bwi-trash bwi-lg bwi-fw" aria-hidden="true"></i>
</button>
</div>
2018-01-24 04:21:14 +01:00
</div>