From 39e6d1dcaea38f1e9e81c698f3980333e142b2b7 Mon Sep 17 00:00:00 2001 From: BlackDex Date: Sat, 4 Jun 2022 18:37:04 +0200 Subject: [PATCH] Fix billing call and small Makefile change. - Fixed a call to the billing history API. - Make sure to remove the old docker extracted files before generating new ones. --- Makefile | 1 + patches/v2022.05.0.patch | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/Makefile b/Makefile index c792ca3..cde2355 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/patches/v2022.05.0.patch b/patches/v2022.05.0.patch index 3664486..8ed7c0f 100644 --- a/patches/v2022.05.0.patch +++ b/patches/v2022.05.0.patch @@ -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