mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
fix(files): Show correct quota size (file size base 2)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
This commit is contained in:
parent
8a162eeeb1
commit
951ab7a999
5 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
},
|
||||
},
|
||||
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
4
dist/files-main.js
vendored
4
dist/files-main.js
vendored
File diff suppressed because one or more lines are too long
2
dist/files-main.js.map
vendored
2
dist/files-main.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue