fix: folder info on upload list
parent
e677c78471
commit
d1d7b23da6
|
@ -25,6 +25,7 @@
|
|||
class="file"
|
||||
v-for="file in filesInUpload"
|
||||
:key="file.id"
|
||||
:data-dir="file.isDir"
|
||||
:data-type="file.type"
|
||||
:aria-label="file.name"
|
||||
>
|
||||
|
|
|
@ -25,15 +25,17 @@ const getters = {
|
|||
let upload = state.upload.uploads[index];
|
||||
let id = upload.id;
|
||||
let type = upload.type;
|
||||
let name = decodeURIComponent(upload.path.replace(/^.*[\\/]/, ""));
|
||||
let progress = state.upload.progress[id];
|
||||
let name = upload.file.name;
|
||||
let size = state.upload.sizes[id];
|
||||
let isDir = upload.file.isDir;
|
||||
let progress = isDir ? 100 : Math.ceil((state.upload.progress[id] / size) * 100);
|
||||
|
||||
files.push({
|
||||
id,
|
||||
name,
|
||||
progress: Math.ceil((progress / size) * 100),
|
||||
progress,
|
||||
type,
|
||||
isDir,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -70,6 +70,7 @@ export function scanFiles(dt) {
|
|||
isDir: true,
|
||||
size: 0,
|
||||
fullPath: `${directory}${entry.name}`,
|
||||
name: entry.name,
|
||||
};
|
||||
|
||||
contents.push(dir);
|
||||
|
|
Loading…
Reference in New Issue