1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-06 09:20:43 +01:00

[Key Connector] Hide "Master Pass On Restart" prompt when setting pin (#556)

* Disable Master Pass on Restart for Key Connector

* Fix linting
This commit is contained in:
Thomas Rittson 2021-11-18 21:20:55 +10:00 committed by GitHub
parent 07dde6e321
commit fc0d624621
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
import { Directive } from '@angular/core';
import {
Directive,
OnInit
} from '@angular/core';
import { CryptoService } from 'jslib-common/abstractions/crypto.service';
import { KeyConnectorService } from 'jslib-common/abstractions/keyConnector.service';
import { StorageService } from 'jslib-common/abstractions/storage.service';
import { UserService } from 'jslib-common/abstractions/user.service';
import { VaultTimeoutService } from 'jslib-common/abstractions/vaultTimeout.service';
@ -12,14 +16,20 @@ import { Utils } from 'jslib-common/misc/utils';
import { ModalRef } from './modal/modal.ref';
@Directive()
export class SetPinComponent {
export class SetPinComponent implements OnInit {
pin = '';
showPin = false;
masterPassOnRestart = true;
showMasterPassOnRestart = true;
constructor(private modalRef: ModalRef, private cryptoService: CryptoService, private userService: UserService,
private storageService: StorageService, private vaultTimeoutService: VaultTimeoutService) { }
private storageService: StorageService, private vaultTimeoutService: VaultTimeoutService,
private keyConnectorService: KeyConnectorService) { }
async ngOnInit() {
this.showMasterPassOnRestart = this.masterPassOnRestart = !await this.keyConnectorService.getUsesKeyConnector();
}
toggleVisibility() {
this.showPin = !this.showPin;