mirror of
https://github.com/bitwarden/browser.git
synced 2025-02-17 01:31:25 +01:00
webVaultHostname
This commit is contained in:
parent
ac84a36206
commit
802d38f52e
@ -15,6 +15,8 @@ import { ConstantsService } from '../../services/constants.service';
|
|||||||
import { CipherString } from '../../models/domain/cipherString';
|
import { CipherString } from '../../models/domain/cipherString';
|
||||||
import { SymmetricCryptoKey } from '../../models/domain/symmetricCryptoKey';
|
import { SymmetricCryptoKey } from '../../models/domain/symmetricCryptoKey';
|
||||||
|
|
||||||
|
import { Utils } from '../../misc/utils';
|
||||||
|
|
||||||
export class LockComponent implements OnInit {
|
export class LockComponent implements OnInit {
|
||||||
masterPassword: string = '';
|
masterPassword: string = '';
|
||||||
pin: string = '';
|
pin: string = '';
|
||||||
@ -33,14 +35,18 @@ export class LockComponent implements OnInit {
|
|||||||
protected platformUtilsService: PlatformUtilsService, protected messagingService: MessagingService,
|
protected platformUtilsService: PlatformUtilsService, protected messagingService: MessagingService,
|
||||||
protected userService: UserService, protected cryptoService: CryptoService,
|
protected userService: UserService, protected cryptoService: CryptoService,
|
||||||
protected storageService: StorageService, protected lockService: LockService,
|
protected storageService: StorageService, protected lockService: LockService,
|
||||||
protected environmentService: EnvironmentService) { }
|
protected environmentService: EnvironmentService) { }
|
||||||
|
|
||||||
async ngOnInit() {
|
async ngOnInit() {
|
||||||
this.pinSet = await this.lockService.isPinLockSet();
|
this.pinSet = await this.lockService.isPinLockSet();
|
||||||
const hasKey = await this.cryptoService.hasKey();
|
const hasKey = await this.cryptoService.hasKey();
|
||||||
this.pinLock = (this.pinSet[0] && hasKey) || this.pinSet[1];
|
this.pinLock = (this.pinSet[0] && hasKey) || this.pinSet[1];
|
||||||
this.email = await this.userService.getEmail();
|
this.email = await this.userService.getEmail();
|
||||||
this.webVaultHostname = await new URL(this.environmentService.getWebVaultUrl()).hostname;
|
let vaultUrl = this.environmentService.getWebVaultUrl();
|
||||||
|
if (vaultUrl == null) {
|
||||||
|
vaultUrl = 'https://bitwarden.com';
|
||||||
|
}
|
||||||
|
this.webVaultHostname = Utils.getHostname(vaultUrl);
|
||||||
}
|
}
|
||||||
|
|
||||||
async submit() {
|
async submit() {
|
||||||
|
Loading…
Reference in New Issue
Block a user