From c34202f5e27b5a43e68bf48e4c91b4a901a98cdd Mon Sep 17 00:00:00 2001 From: Vitalii Date: Thu, 28 Sep 2023 16:10:43 +0300 Subject: [PATCH] web/satellite/vuetify-poc: localize big numbers Localized number formatting (e.g. dots, commas, spaces) Issue: https://github.com/storj/storj/issues/6335 Change-Id: Ia1f6ba781fe0089803717aa0e2a9eb5da6ab2946 --- .../components/dialogs/BucketDetailsDialog.vue | 16 ++++++++-------- .../dialogs/EditProjectLimitDialog.vue | 2 +- .../vuetify-poc/src/views/Dashboard.vue | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/web/satellite/vuetify-poc/src/components/dialogs/BucketDetailsDialog.vue b/web/satellite/vuetify-poc/src/components/dialogs/BucketDetailsDialog.vue index 832e2f8d0..369cb428e 100644 --- a/web/satellite/vuetify-poc/src/components/dialogs/BucketDetailsDialog.vue +++ b/web/satellite/vuetify-poc/src/components/dialogs/BucketDetailsDialog.vue @@ -12,7 +12,7 @@ @@ -34,7 +34,7 @@

Name

@@ -43,25 +43,25 @@

Objects

-

{{ bucket.objectCount }}

+

{{ bucket.objectCount.toLocaleString() }}

Segments

-

{{ bucket.segmentCount }}

+

{{ bucket.segmentCount.toLocaleString() }}

Date Created

@@ -70,7 +70,7 @@

Last Updated

diff --git a/web/satellite/vuetify-poc/src/components/dialogs/EditProjectLimitDialog.vue b/web/satellite/vuetify-poc/src/components/dialogs/EditProjectLimitDialog.vue index 97424c2be..06a0c727a 100644 --- a/web/satellite/vuetify-poc/src/components/dialogs/EditProjectLimitDialog.vue +++ b/web/satellite/vuetify-poc/src/components/dialogs/EditProjectLimitDialog.vue @@ -224,7 +224,7 @@ const availableUsage = computed(() => { * Returns the maximum amount of active measurement units that the usage limit can be set to. */ const availableUsageFormatted = computed(() => { - return decimalShift((availableUsage.value / Memory[activeMeasurement.value]).toFixed(2), 0); + return decimalShift((availableUsage.value / Memory[activeMeasurement.value]).toLocaleString(undefined, { maximumFractionDigits: 2 }), 0); }); /** diff --git a/web/satellite/vuetify-poc/src/views/Dashboard.vue b/web/satellite/vuetify-poc/src/views/Dashboard.vue index 48fd78e74..e9739d92f 100644 --- a/web/satellite/vuetify-poc/src/views/Dashboard.vue +++ b/web/satellite/vuetify-poc/src/views/Dashboard.vue @@ -74,7 +74,7 @@ - +