summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2023-10-05 16:19:26 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2023-10-06 14:29:59 +0200
commit951ab7a999a58f80b530ce05488d2c6cec5924d5 (patch)
treeb3cb60c1dfefd9223b0962c54d020f648da73670 /apps/files
parent8a162eeeb1de7da3d339f03a5decf1f52ef046f8 (diff)
downloadnextcloud-server-951ab7a999a58f80b530ce05488d2c6cec5924d5.tar.gz
nextcloud-server-951ab7a999a58f80b530ce05488d2c6cec5924d5.zip
fix(files): Show correct quota size (file size base 2)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/src/components/FileEntry.vue2
-rw-r--r--apps/files/src/components/FilesListFooter.vue4
-rw-r--r--apps/files/src/components/NavigationQuota.vue4
3 files changed, 5 insertions, 5 deletions
diff --git a/apps/files/src/components/FileEntry.vue b/apps/files/src/components/FileEntry.vue
index 6509e3b3bce..b15b1bb1a11 100644
--- a/apps/files/src/components/FileEntry.vue
+++ b/apps/files/src/components/FileEntry.vue
@@ -261,7 +261,7 @@ export default Vue.extend({
if (typeof size !== 'number' || size < 0) {
return this.t('files', 'Pending')
}
- return formatFileSize(size, true)
+ return formatFileSize(size, true, true).replace('iB', 'B')
},
sizeOpacity() {
const size = parseInt(this.source.size, 10) || 0
diff --git a/apps/files/src/components/FilesListFooter.vue b/apps/files/src/components/FilesListFooter.vue
index 80047f404fc..b67b8163ae3 100644
--- a/apps/files/src/components/FilesListFooter.vue
+++ b/apps/files/src/components/FilesListFooter.vue
@@ -127,11 +127,11 @@ export default Vue.extend({
totalSize() {
// If we have the size already, let's use it
if (this.currentFolder?.size) {
- return formatFileSize(this.currentFolder.size, true)
+ return formatFileSize(this.currentFolder.size, true, true).replace('iB', 'B')
}
// Otherwise let's compute it
- return formatFileSize(this.nodes.reduce((total, node) => total + node.size || 0, 0), true)
+ return formatFileSize(this.nodes.reduce((total, node) => total + node.size || 0, 0), true, true).replace('iB', 'B')
},
},
diff --git a/apps/files/src/components/NavigationQuota.vue b/apps/files/src/components/NavigationQuota.vue
index d38d4d2fd9e..6644d7446ee 100644
--- a/apps/files/src/components/NavigationQuota.vue
+++ b/apps/files/src/components/NavigationQuota.vue
@@ -51,8 +51,8 @@ export default {
computed: {
storageStatsTitle() {
- const usedQuotaByte = formatFileSize(this.storageStats?.used)
- const quotaByte = formatFileSize(this.storageStats?.quota)
+ const usedQuotaByte = formatFileSize(this.storageStats?.used, false, true).replace('iB', 'B')
+ const quotaByte = formatFileSize(this.storageStats?.quota, false, true).replace('iB', 'B')
// If no quota set
if (this.storageStats?.quota < 0) {