1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

on-premise support for "bitwarden Web Vault" tool (#388)

* on-premise support for "bitwarden Web Vault" tool

* don't import EnvironmentService yet, change variable scope
This commit is contained in:
Billy Hughes 2017-11-22 12:45:38 -05:00 committed by Kyle Spearrin
parent 842e594ba2
commit 04cfd8040c

View File

@ -7,14 +7,21 @@ export class ToolsController {
i18n: any;
constructor(private SweetAlert: any, private i18nService: any,
private $analytics: any, private utilsService: UtilsService) {
private $analytics: any, private utilsService: UtilsService,
private webVaultBaseUrl: string = 'https://vault.bitwarden.com',
private environmentService: any) {
this.i18n = i18nService;
this.showExport = !utilsService.isEdge();
if (environmentService.baseUrl) {
this.webVaultBaseUrl = environmentService.baseUrl;
} else if (environmentService.webVaultUrl) {
this.webVaultBaseUrl = environmentService.webVaultUrl;
}
}
launchWebVault(createOrg: any) {
this.$analytics.eventTrack('Launch Web Vault' + (createOrg ? ' For Share' : ''));
chrome.tabs.create({ url: 'https://vault.bitwarden.com/#/' + (createOrg ? '?org=free' : '') });
chrome.tabs.create({ url: this.webVaultBaseUrl + '/#/' + (createOrg ? '?org=free' : '') });
}
launchAndroid() {