mirror of
https://github.com/bitwarden/web
synced 2025-12-06 00:03:28 +00:00
download license for org
This commit is contained in:
2
jslib
2
jslib
Submodule jslib updated: 9c0b4b8973...4228277d23
@@ -79,8 +79,10 @@
|
|||||||
<button type="button" class="btn btn-outline-secondary" (click)="changePlan()">
|
<button type="button" class="btn btn-outline-secondary" (click)="changePlan()">
|
||||||
{{'changeBillingPlan' | i18n}}
|
{{'changeBillingPlan' | i18n}}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" class="btn btn-outline-secondary ml-1" (click)="downloadLicense()" *ngIf="subscription && !subscription.cancelled">
|
<button type="button" class="btn btn-outline-secondary btn-submit ml-1" #licenseBtn [appApiAction]="licensePromise" [disabled]="licenseBtn.loading"
|
||||||
{{'downloadLicense' | i18n}}
|
(click)="downloadLicense()" *ngIf="subscription && !subscription.cancelled">
|
||||||
|
<i class="fa fa-spinner fa-spin"></i>
|
||||||
|
<span>{{'downloadLicense' | i18n}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button #cancelBtn type="button" class="btn btn-outline-danger btn-submit ml-auto" (click)="cancel()" [appApiAction]="cancelPromise"
|
<button #cancelBtn type="button" class="btn btn-outline-danger btn-submit ml-auto" (click)="cancel()" [appApiAction]="cancelPromise"
|
||||||
[disabled]="cancelBtn.loading" *ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel">
|
[disabled]="cancelBtn.loading" *ngIf="subscription && !subscription.cancelled && !subscriptionMarkedForCancel">
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ export class OrganizationBillingComponent implements OnInit {
|
|||||||
|
|
||||||
cancelPromise: Promise<any>;
|
cancelPromise: Promise<any>;
|
||||||
reinstatePromise: Promise<any>;
|
reinstatePromise: Promise<any>;
|
||||||
|
licensePromise: Promise<any>;
|
||||||
|
|
||||||
constructor(private tokenService: TokenService, private apiService: ApiService,
|
constructor(private tokenService: TokenService, private apiService: ApiService,
|
||||||
private platformUtilsService: PlatformUtilsService, private i18nService: I18nService,
|
private platformUtilsService: PlatformUtilsService, private i18nService: I18nService,
|
||||||
@@ -113,10 +114,22 @@ export class OrganizationBillingComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
downloadLicense() {
|
async downloadLicense() {
|
||||||
if (this.loading) {
|
if (this.loading) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 { }
|
||||||
}
|
}
|
||||||
|
|
||||||
updateLicense() {
|
updateLicense() {
|
||||||
|
|||||||
@@ -2219,5 +2219,8 @@
|
|||||||
},
|
},
|
||||||
"bankAccountTypeIndividual": {
|
"bankAccountTypeIndividual": {
|
||||||
"message": "Individual (Personal)"
|
"message": "Individual (Personal)"
|
||||||
|
},
|
||||||
|
"enterInstallationId": {
|
||||||
|
"message": "Enter your installation id"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user