Merge pull request #1722 from bitwarden/fix-view-autofill-buttons

Hide autofill buttons for certain cipher types
This commit is contained in:
Thomas Rittson 2021-03-22 07:55:07 +10:00 committed by GitHub
commit a0f2f5b000
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View File

@ -269,7 +269,7 @@
<div class="box list">
<div class="box-content single-line">
<a class="box-content-row" href="#" appStopClick appBlurClick (click)="fillCipher()"
*ngIf="!cipher.isDeleted && !inPopout">
*ngIf="cipher.type !== cipherType.SecureNote && !cipher.isDeleted && !inPopout">
<div class="row-main text-primary">
<div class="icon text-primary" aria-hidden="true">
<i class="fa fa-pencil-square-o fa-lg fa-fw"></i>
@ -278,7 +278,7 @@
</div>
</a>
<a class="box-content-row" href="#" appStopClick appBlurClick (click)="fillCipherAndSave()"
*ngIf="!cipher.isDeleted && !inPopout">
*ngIf="cipher.type === cipherType.Login && !cipher.isDeleted && !inPopout">
<div class="row-main text-primary">
<div class="icon text-primary" aria-hidden="true">
<i class="fa fa-bookmark fa-lg fa-fw"></i>

View File

@ -29,6 +29,8 @@ import { BrowserApi } from '../../browser/browserApi';
import { AutofillService } from '../../services/abstractions/autofill.service';
import { PopupUtilsService } from '../services/popup-utils.service';
import { CipherType } from 'jslib/enums';
const BroadcasterSubscriptionId = 'ChildViewComponent';
@Component({
@ -41,6 +43,7 @@ export class ViewComponent extends BaseViewComponent {
tab: any;
loadPageDetailsTimeout: number;
inPopout = false;
cipherType = CipherType;
constructor(cipherService: CipherService, totpService: TotpService,
tokenService: TokenService, i18nService: I18nService,