1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-24 12:06:15 +01:00

webVaultHostname

This commit is contained in:
Kyle Spearrin 2019-06-03 09:53:18 -04:00
parent ac84a36206
commit 802d38f52e

View File

@ -15,6 +15,8 @@ import { ConstantsService } from '../../services/constants.service';
import { CipherString } from '../../models/domain/cipherString';
import { SymmetricCryptoKey } from '../../models/domain/symmetricCryptoKey';
import { Utils } from '../../misc/utils';
export class LockComponent implements OnInit {
masterPassword: string = '';
pin: string = '';
@ -33,14 +35,18 @@ export class LockComponent implements OnInit {
protected platformUtilsService: PlatformUtilsService, protected messagingService: MessagingService,
protected userService: UserService, protected cryptoService: CryptoService,
protected storageService: StorageService, protected lockService: LockService,
protected environmentService: EnvironmentService) { }
protected environmentService: EnvironmentService) { }
async ngOnInit() {
this.pinSet = await this.lockService.isPinLockSet();
const hasKey = await this.cryptoService.hasKey();
this.pinLock = (this.pinSet[0] && hasKey) || this.pinSet[1];
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() {