Add 'Copy Username' button (#691)

This adds a 'Copy Username' button above the 'Copy Password' button in
the dropdown for individual entries in the safe. This matches the
capabilities of the desktop app, where you can right-click on any entry
and get options for both 'copy password' and 'copy username'.
This commit is contained in:
Matthew 2020-11-11 06:26:38 +11:00 committed by GitHub
parent 407032114e
commit 37cf46d581
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -37,6 +37,11 @@
</button>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenuButton">
<ng-container *ngIf="c.type === cipherType.Login && !c.isDeleted">
<a class="dropdown-item" href="#" appStopClick
(click)="copy(c, c.login.username, 'username', 'username')">
<i class="fa fa-fw fa-clone" aria-hidden="true"></i>
{{'copyUsername' | i18n}}
</a>
<a class="dropdown-item" href="#" appStopClick
(click)="copy(c, c.login.password, 'password', 'password')" *ngIf="c.viewPassword">
<i class="fa fa-fw fa-clone" aria-hidden="true"></i>