From 52dcfb3bd457eefb8123f8525140def06ee390cf Mon Sep 17 00:00:00 2001 From: Benedikt Kulmann Date: Fri, 18 Feb 2022 23:46:45 +0100 Subject: [PATCH] String adjustments in SpaceQuota component --- packages/web-app-files/src/components/SpaceQuota.vue | 4 ++-- .../unit/components/__snapshots__/SpaceQuota.spec.js.snap | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/web-app-files/src/components/SpaceQuota.vue b/packages/web-app-files/src/components/SpaceQuota.vue index 8ec4f4a1836..865b50c81da 100644 --- a/packages/web-app-files/src/components/SpaceQuota.vue +++ b/packages/web-app-files/src/components/SpaceQuota.vue @@ -24,7 +24,7 @@ export default { computed: { spaceStorageDetailsLabel() { return this.$gettextInterpolate( - this.$gettext('%{used} of %{total} used (%{percentage} % used)'), + this.$gettext('%{used} of %{total} used (%{percentage}% used)'), { used: this.quotaUsed, total: this.quotaTotal, @@ -39,7 +39,7 @@ export default { return filesize(this.spaceQuota.used) }, quotaUsagePercent() { - return ((this.spaceQuota.used / this.spaceQuota.total) * 100).toFixed(2) + return ((this.spaceQuota.used / this.spaceQuota.total) * 100).toFixed(1) }, quotaProgressVariant() { switch (this.spaceQuota.state) { diff --git a/packages/web-app-files/tests/unit/components/__snapshots__/SpaceQuota.spec.js.snap b/packages/web-app-files/tests/unit/components/__snapshots__/SpaceQuota.spec.js.snap index c8463185e34..f6d007d7977 100644 --- a/packages/web-app-files/tests/unit/components/__snapshots__/SpaceQuota.spec.js.snap +++ b/packages/web-app-files/tests/unit/components/__snapshots__/SpaceQuota.spec.js.snap @@ -2,7 +2,7 @@ exports[`SpaceQuota component renders the space storage quota label 1`] = `
-

1 B of 10 B used (10.00 % used)

+

1 B of 10 B used (10.0% used)

`;