Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
webVaultHostname
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Jun 3, 2019
1 parent ac84a36 commit 802d38f
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/angular/components/lock.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '';
Expand All @@ -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() {
Expand Down

0 comments on commit 802d38f

Please sign in to comment.