use send.bitwarden.com (#304)
This commit is contained in:
parent
5d32ba68ec
commit
c8cab2a9e7
|
@ -74,7 +74,7 @@ export class AddEditComponent implements OnInit {
|
||||||
safariDeletionTimeOptions: TimeOption[];
|
safariDeletionTimeOptions: TimeOption[];
|
||||||
safariExpirationTimeOptions: TimeOption[];
|
safariExpirationTimeOptions: TimeOption[];
|
||||||
|
|
||||||
private webVaultUrl: string;
|
private sendLinkBaseUrl: string;
|
||||||
|
|
||||||
constructor(protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService,
|
constructor(protected i18nService: I18nService, protected platformUtilsService: PlatformUtilsService,
|
||||||
protected environmentService: EnvironmentService, protected datePipe: DatePipe,
|
protected environmentService: EnvironmentService, protected datePipe: DatePipe,
|
||||||
|
@ -97,15 +97,17 @@ export class AddEditComponent implements OnInit {
|
||||||
{ name: i18nService.t('never'), value: null },
|
{ name: i18nService.t('never'), value: null },
|
||||||
].concat([...this.deletionDateOptions]);
|
].concat([...this.deletionDateOptions]);
|
||||||
|
|
||||||
this.webVaultUrl = this.environmentService.getWebVaultUrl();
|
const webVaultUrl = this.environmentService.getWebVaultUrl();
|
||||||
if (this.webVaultUrl == null) {
|
if (webVaultUrl == null) {
|
||||||
this.webVaultUrl = 'https://vault.bitwarden.com';
|
this.sendLinkBaseUrl = 'https://send.bitwarden.com/#';
|
||||||
|
} else {
|
||||||
|
this.sendLinkBaseUrl = webVaultUrl + '/#/send/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get link(): string {
|
get link(): string {
|
||||||
if (this.send.id != null && this.send.accessId != null) {
|
if (this.send.id != null && this.send.accessId != null) {
|
||||||
return this.webVaultUrl + '/#/send/' + this.send.accessId + '/' + this.send.urlB64Key;
|
return this.sendLinkBaseUrl + this.send.accessId + '/' + this.send.urlB64Key;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue