fix fileload in gcode-files

Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
Stefan Dej 2021-03-21 03:09:03 +01:00
parent 1486f1a1fd
commit 7ebb947a58

View File

@ -912,26 +912,37 @@
watch: {
filetree: {
deep: true,
handler() {
/*let dirArray = this.currentPath.split("/");
handler(newVal) {
let dirArray = this.currentPath.split("/");
this.files = findDirectory(newVal, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}*/
}
this.loadPath()
if (!this.showPrintedFiles) {
this.files = this.files.filter(file => this.$store.getters["server/history/getPrintStatus"]({
filename: (this.currentPath+"/"+file.filename).substr(7),
modified: new Date(file.modified).getTime()
}) !== 'completed')
}
}
},
currentPath: {
handler() {
/*let dirArray = newVal.split("/");
handler(newVal) {
let dirArray = newVal.split("/");
this.files = findDirectory(this.filetree, dirArray);
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}*/
this.loadPath()
}
if (!this.showPrintedFiles) {
this.files = this.files.filter(file => this.$store.getters["server/history/getPrintStatus"]({
filename: (this.currentPath+"/"+file.filename).substr(7),
modified: new Date(file.modified).getTime()
}) !== 'completed')
}
}
},
displayMetadata: {