Fix free/used disk space handling. Implement file disk usage tracking. Display indicators on FileExplorer for incomplete files (sparse allocation, upload in progress).

This commit is contained in:
2026-02-04 18:54:54 +00:00
parent 60a53ef3d3
commit 62b44ddb43
12 changed files with 169 additions and 26 deletions
+4 -2
View File
@@ -96,8 +96,9 @@ export const useMainStore = defineStore('main', {
space: {
disk: 0,
free: 0,
usage: 0,
used: 0,
storage: 0,
allocated: 0,
}
}),
persist: {
@@ -118,13 +119,14 @@ export const useMainStore = defineStore('main', {
updateRoot(root: FileEntry[]) {
const docs = []
let loc = [] as string[]
for (const [level, name, key, mtime, size, isfile] of root) {
for (const [level, name, key, mtime, size, allocated, isfile] of root) {
loc = loc.slice(0, level - 1)
docs.push(new Doc({
name,
loc: level ? loc.join('/') : '/',
key,
size,
allocated,
mtime,
dir: !isfile,
}))