mirror of
https://github.com/bitwarden/browser
synced 2026-01-02 00:23:35 +00:00
download license component
This commit is contained in:
@@ -30,12 +30,12 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
||||
adjustStorageAdd = true;
|
||||
showAdjustStorage = false;
|
||||
showUpdateLicense = false;
|
||||
showDownloadLicense = false;
|
||||
sub: OrganizationSubscriptionResponse;
|
||||
selfHosted = false;
|
||||
|
||||
cancelPromise: Promise<any>;
|
||||
reinstatePromise: Promise<any>;
|
||||
licensePromise: Promise<any>;
|
||||
|
||||
constructor(private tokenService: TokenService, private apiService: ApiService,
|
||||
private platformUtilsService: PlatformUtilsService, private i18nService: I18nService,
|
||||
@@ -109,22 +109,12 @@ export class OrganizationSubscriptionComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
async downloadLicense() {
|
||||
if (this.loading) {
|
||||
return;
|
||||
}
|
||||
downloadLicense() {
|
||||
this.showDownloadLicense = !this.showDownloadLicense;
|
||||
}
|
||||
|
||||
const installationId = window.prompt(this.i18nService.t('enterInstallationId'));
|
||||
if (installationId == null || installationId === '') {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this.licensePromise = this.apiService.getOrganizationLicense(this.organizationId, installationId);
|
||||
const license = await this.licensePromise;
|
||||
const licenseString = JSON.stringify(license, null, 2);
|
||||
this.platformUtilsService.saveFile(window, licenseString, null, 'bitwarden_organization_license.json');
|
||||
} catch { }
|
||||
closeDownloadLicense() {
|
||||
this.showDownloadLicense = false;
|
||||
}
|
||||
|
||||
updateLicense() {
|
||||
|
||||
Reference in New Issue
Block a user