Display filesize in base 2 format (KiB instead of KB)
This commit is contained in:
parent
6332514ccc
commit
49e3b6231e
@ -105,7 +105,9 @@ export default {
|
|||||||
...mapActions(useFileStore, ["removeSelected"]),
|
...mapActions(useFileStore, ["removeSelected"]),
|
||||||
...mapActions(useLayoutStore, ["showHover", "closeHovers"]),
|
...mapActions(useLayoutStore, ["showHover", "closeHovers"]),
|
||||||
humanSize: function () {
|
humanSize: function () {
|
||||||
return this.type == "invalid_link" ? "invalid link" : filesize(this.size);
|
return this.type == "invalid_link"
|
||||||
|
? "invalid link"
|
||||||
|
: filesize(this.size, { base: 2 });
|
||||||
},
|
},
|
||||||
humanTime: function () {
|
humanTime: function () {
|
||||||
if (this.readOnly == undefined && this.user.dateFormat) {
|
if (this.readOnly == undefined && this.user.dateFormat) {
|
||||||
|
|||||||
@ -99,7 +99,7 @@ export default {
|
|||||||
]),
|
]),
|
||||||
humanSize: function () {
|
humanSize: function () {
|
||||||
if (this.selectedCount === 0 || !this.isListing) {
|
if (this.selectedCount === 0 || !this.isListing) {
|
||||||
return filesize(this.req.size);
|
return filesize(this.req.size, { base: 2 });
|
||||||
}
|
}
|
||||||
|
|
||||||
let sum = 0;
|
let sum = 0;
|
||||||
@ -108,7 +108,7 @@ export default {
|
|||||||
sum += this.req.items[selected].size;
|
sum += this.req.items[selected].size;
|
||||||
}
|
}
|
||||||
|
|
||||||
return filesize(sum);
|
return filesize(sum, { base: 2 });
|
||||||
},
|
},
|
||||||
humanTime: function () {
|
humanTime: function () {
|
||||||
if (this.selectedCount === 0) {
|
if (this.selectedCount === 0) {
|
||||||
|
|||||||
@ -241,7 +241,7 @@ const humanSize = computed(() => {
|
|||||||
if (req.value) {
|
if (req.value) {
|
||||||
return req.value.isDir
|
return req.value.isDir
|
||||||
? req.value.items.length
|
? req.value.items.length
|
||||||
: filesize(req.value.size ?? 0);
|
: filesize(req.value.size ?? 0, { base: 2 });
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user