Enabled drag of username, password and totp in browser extension (#1044)

* enabled drag of username, password and totp in browser extension

* Start drag only on row label
This commit is contained in:
Veit-Hendrik Schlenker 2019-10-25 02:05:20 +02:00 committed by Kyle Spearrin
parent 3e546fd1fd
commit ee19100af4
2 changed files with 10 additions and 3 deletions

View File

@ -218,3 +218,7 @@ app-vault-icon {
[hidden] { [hidden] {
display: none !important; display: none !important;
} }
.draggable {
cursor: move;
}

View File

@ -23,7 +23,8 @@
<div *ngIf="cipher.login"> <div *ngIf="cipher.login">
<div class="box-content-row box-content-row-flex" *ngIf="cipher.login.username"> <div class="box-content-row box-content-row-flex" *ngIf="cipher.login.username">
<div class="row-main"> <div class="row-main">
<span class="row-label">{{'username' | i18n}}</span> <span class="row-label draggable" draggable="true"
(dragstart)="setTextDataOnDrag($event, cipher.login.username)">{{'username' | i18n}}</span>
{{cipher.login.username}} {{cipher.login.username}}
</div> </div>
<div class="action-buttons"> <div class="action-buttons">
@ -35,7 +36,8 @@
</div> </div>
<div class="box-content-row box-content-row-flex" *ngIf="cipher.login.password"> <div class="box-content-row box-content-row-flex" *ngIf="cipher.login.password">
<div class="row-main"> <div class="row-main">
<span class="row-label">{{'password' | i18n}}</span> <span class="row-label draggable" draggable="true"
(dragstart)="setTextDataOnDrag($event, cipher.login.password)">{{'password' | i18n}}</span>
<div [hidden]="showPassword" class="monospaced"> <div [hidden]="showPassword" class="monospaced">
{{cipher.login.maskedPassword}}</div> {{cipher.login.maskedPassword}}</div>
<div [hidden]="!showPassword" class="monospaced password-wrapper" appSelectCopy <div [hidden]="!showPassword" class="monospaced password-wrapper" appSelectCopy
@ -64,7 +66,8 @@
<div class="box-content-row box-content-row-flex totp" [ngClass]="{'low': totpLow}" <div class="box-content-row box-content-row-flex totp" [ngClass]="{'low': totpLow}"
*ngIf="cipher.login.totp && totpCode"> *ngIf="cipher.login.totp && totpCode">
<div class="row-main"> <div class="row-main">
<span class="row-label">{{'verificationCodeTotp' | i18n}}</span> <span class="row-label draggable" draggable="true"
(dragstart)="setTextDataOnDrag($event, totpCode)">{{'verificationCodeTotp' | i18n}}</span>
<span class="totp-code">{{totpCodeFormatted}}</span> <span class="totp-code">{{totpCodeFormatted}}</span>
</div> </div>
<span class="totp-countdown"> <span class="totp-countdown">