Add show hide password to send (#821)

* Add password toggle to add-edit

* Fix remove password accessible from disabled send

* Update jslib
This commit is contained in:
Matt Gibson 2021-02-05 13:23:40 -06:00 committed by GitHub
parent af7e2edbf0
commit 84d03158b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

2
jslib

@ -1 +1 @@
Subproject commit deabffb7b0aaf9873b212f9962158fc312c4f271 Subproject commit 22f576ea60fdd19cd0eb3c11d3073a45240b9f98

View File

@ -116,8 +116,17 @@
<div class="col-6 form-group"> <div class="col-6 form-group">
<label for="password" *ngIf="!hasPassword">{{'password' | i18n}}</label> <label for="password" *ngIf="!hasPassword">{{'password' | i18n}}</label>
<label for="password" *ngIf="hasPassword">{{'newPassword' | i18n}}</label> <label for="password" *ngIf="hasPassword">{{'newPassword' | i18n}}</label>
<input id="password" class="form-control" type="password" name="Password" <div class="input-group">
[(ngModel)]="password" [readOnly]="disableSend"> <input id="password" class="form-control text-monospace" type="{{showPassword ? 'text' : 'password'}}"
name="Password" [(ngModel)]="password" [readOnly]="disableSend">
<div class="input-group-append">
<button type="button" class="btn btn-outline-secondary" appA11yTitle="{{'toggleVisibility' | i18n}}"
(click)="togglePasswordVisible()">
<i class="fa fa-lg" aria-hidden="true"
[ngClass]="{'fa-eye': !showPassword, 'fa-eye-slash': showPassword}"></i>
</button>
</div>
</div>
<div class="form-text text-muted small">{{'sendPasswordDesc' | i18n}}</div> <div class="form-text text-muted small">{{'sendPasswordDesc' | i18n}}</div>
</div> </div>
</div> </div>

View File

@ -107,7 +107,7 @@
{{'copySendLink' | i18n}} {{'copySendLink' | i18n}}
</a> </a>
<a class="dropdown-item" href="#" appStopClick (click)="removePassword(s)" <a class="dropdown-item" href="#" appStopClick (click)="removePassword(s)"
*ngIf="s.password"> *ngIf="s.password && !disableSend">
<i class="fa fa-fw fa-undo" aria-hidden="true"></i> <i class="fa fa-fw fa-undo" aria-hidden="true"></i>
{{'removePassword' | i18n}} {{'removePassword' | i18n}}
</a> </a>