From 5173acae6a55a8a4a46a11c9a7c06b25398b6fdd Mon Sep 17 00:00:00 2001 From: Patrick Winfield Date: Thu, 19 Oct 2023 13:51:48 -0600 Subject: [PATCH 1/3] rename bandwidth to data trasfer. add kyc mock endpoint --- mock-hpos-api/defaultResponse.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mock-hpos-api/defaultResponse.js b/mock-hpos-api/defaultResponse.js index ccd47532..1b745fb6 100644 --- a/mock-hpos-api/defaultResponse.js +++ b/mock-hpos-api/defaultResponse.js @@ -534,6 +534,10 @@ const holoNixpkgs = { } } +const mockKycData = { + "kyc": 'holo_kyc_2' +} + // NB: both /api and /holochain-api calls are mocked here const data = { get: { @@ -544,7 +548,8 @@ const data = { '/holochain-api/v1/host_earnings': earnings, '/holochain-api/v1/core_app_version': coreAppVersion, '/holochain-api/v1/host_invoices': mockPaidInvoicesData, - '/holochain-api/v1/redemptions': mockRedemptionHistoryData + '/holochain-api/v1/redemptions': mockRedemptionHistoryData, + '/holochain-api/v1/kyc': mockKycData }, put: { '/api/v1/config': (args) => args, From ae67690f1b1aba596bc90a8e3193b308ebcbc080 Mon Sep 17 00:00:00 2001 From: Patrick Winfield Date: Thu, 19 Oct 2023 14:13:20 -0600 Subject: [PATCH 2/3] update ui-common-lib. rename bandwidth to date transfer --- mock-hpos-api/defaultResponse.js | 4 ++++ src/components/dashboard/UsageCard.vue | 2 +- src/components/settings/hostingPreferences/PricesSection.vue | 2 +- ui-common-library | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/mock-hpos-api/defaultResponse.js b/mock-hpos-api/defaultResponse.js index 1b745fb6..365c0771 100644 --- a/mock-hpos-api/defaultResponse.js +++ b/mock-hpos-api/defaultResponse.js @@ -538,6 +538,9 @@ const mockKycData = { "kyc": 'holo_kyc_2' } +const mockHostPreferences = { +} + // NB: both /api and /holochain-api calls are mocked here const data = { get: { @@ -548,6 +551,7 @@ const data = { '/holochain-api/v1/host_earnings': earnings, '/holochain-api/v1/core_app_version': coreAppVersion, '/holochain-api/v1/host_invoices': mockPaidInvoicesData, + '/holochain-api/v1/host_preferences': mockHostPreferences, '/holochain-api/v1/redemptions': mockRedemptionHistoryData, '/holochain-api/v1/kyc': mockKycData }, diff --git a/src/components/dashboard/UsageCard.vue b/src/components/dashboard/UsageCard.vue index 3242d33f..932637e7 100644 --- a/src/components/dashboard/UsageCard.vue +++ b/src/components/dashboard/UsageCard.vue @@ -78,7 +78,7 @@ const isError = computed((): boolean => isErrorPredicate(props.data) && !!props.
- {{ $t('$.bandwidth') }} + {{ $t('$.data_transfer') }} {{ presentBytes(props.data ? props.data.totalUsage?.bandwidth : 0) }} diff --git a/src/components/settings/hostingPreferences/PricesSection.vue b/src/components/settings/hostingPreferences/PricesSection.vue index 1fab11fa..1775fce5 100644 --- a/src/components/settings/hostingPreferences/PricesSection.vue +++ b/src/components/settings/hostingPreferences/PricesSection.vue @@ -90,7 +90,7 @@ const prices = computed((): PriceItem[] => [ isDisabled: true }, { - label: t('$.bandwidth'), + label: t('$.data_transfer'), value: props.data.bandwidth ? formatPrice(props.data.bandwidth).value : 0, unit: props.data.bandwidth ? formatPrice(props.data.bandwidth).unit : '', prop: 'bandwidth', diff --git a/ui-common-library b/ui-common-library index 0605ef81..0ff574a0 160000 --- a/ui-common-library +++ b/ui-common-library @@ -1 +1 @@ -Subproject commit 0605ef81e1f350dba031d530e8408dcc8f56faab +Subproject commit 0ff574a0544366d3bb8a9e38af0ba052552f8c1f From 1acae9f7db0ffda745e2238d07512225c911aff3 Mon Sep 17 00:00:00 2001 From: Patrick Winfield Date: Thu, 19 Oct 2023 14:27:20 -0600 Subject: [PATCH 3/3] hide storage pricing --- src/components/dashboard/UsageCard.vue | 6 +++++- .../settings/hostingPreferences/PricesSection.vue | 7 ------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/dashboard/UsageCard.vue b/src/components/dashboard/UsageCard.vue index 932637e7..9dd03df6 100644 --- a/src/components/dashboard/UsageCard.vue +++ b/src/components/dashboard/UsageCard.vue @@ -68,7 +68,7 @@ const isError = computed((): boolean => isErrorPredicate(props.data) && !!props.
-
+