mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-04 05:08:06 +02: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:
parent
842e594ba2
commit
04cfd8040c
@ -7,14 +7,21 @@ export class ToolsController {
|
|||||||
i18n: any;
|
i18n: any;
|
||||||
|
|
||||||
constructor(private SweetAlert: any, private i18nService: 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.i18n = i18nService;
|
||||||
this.showExport = !utilsService.isEdge();
|
this.showExport = !utilsService.isEdge();
|
||||||
|
if (environmentService.baseUrl) {
|
||||||
|
this.webVaultBaseUrl = environmentService.baseUrl;
|
||||||
|
} else if (environmentService.webVaultUrl) {
|
||||||
|
this.webVaultBaseUrl = environmentService.webVaultUrl;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
launchWebVault(createOrg: any) {
|
launchWebVault(createOrg: any) {
|
||||||
this.$analytics.eventTrack('Launch Web Vault' + (createOrg ? ' For Share' : ''));
|
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() {
|
launchAndroid() {
|
||||||
|
Loading…
Reference in New Issue
Block a user