1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +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 = '';
@ -40,7 +42,11 @@ export class LockComponent implements OnInit {
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() {