Merge pull request #69 from BlackDex/fix-billing-call

Fix billing call and small Makefile change.
This commit is contained in:
Daniel García 2022-06-04 18:41:05 +02:00 committed by GitHub
commit 12e588e967
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 0 deletions

View file

@ -45,6 +45,7 @@ docker-extract: docker
@docker rm bw_web_vault_extract || true
@docker create --name bw_web_vault_extract bw_web_vault
@mkdir -vp docker_builds
@rm -rf ./docker_builds/bw_web_vault.tar.gz ./docker_builds/web-vault
@docker cp bw_web_vault_extract:/bw_web_vault.tar.gz ./docker_builds/bw_web_vault.tar.gz
@docker cp bw_web_vault_extract:/web-vault ./docker_builds/web-vault
@docker rm bw_web_vault_extract || true

View file

@ -191,6 +191,35 @@ index eacfea97..c2f81033 100644
this.environmentService.setUrls(urls);
setTimeout(() => this.notificationsService.init(), 3000);
diff --git a/src/app/settings/settings.component.ts b/src/app/settings/settings.component.ts
index 9756ba41..348c3843 100644
--- a/src/app/settings/settings.component.ts
+++ b/src/app/settings/settings.component.ts
@@ -55,10 +55,6 @@ export class SettingsComponent implements OnInit, OnDestroy {
this.hasFamilySponsorshipAvailable = await this.organizationService.canManageSponsorships();
const hasPremiumFromOrg = await this.stateService.getCanAccessPremium();
let billing = null;
- if (!this.selfHosted) {
- billing = await this.apiService.getUserBillingHistory();
- }
- this.hideSubscription =
- !this.premium && hasPremiumFromOrg && (this.selfHosted || billing?.hasNoHistory);
+ this.hideSubscription = true;
}
}
diff --git a/src/app/settings/user-billing-history.component.ts b/src/app/settings/user-billing-history.component.ts
index ae26862d..69ff16a0 100644
--- a/src/app/settings/user-billing-history.component.ts
+++ b/src/app/settings/user-billing-history.component.ts
@@ -39,7 +39,7 @@ export class UserBillingHistoryComponent implements OnInit {
return;
}
this.loading = true;
- this.billing = await this.apiService.getUserBillingHistory();
+ this.billing = null;
this.loading = false;
}
diff --git a/src/app/vault/add-edit.component.html b/src/app/vault/add-edit.component.html
index 37410ea5..8c9e1a6f 100644
--- a/src/app/vault/add-edit.component.html