fix fileload in gcode-files
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
1486f1a1fd
commit
7ebb947a58
@ -912,26 +912,37 @@
|
|||||||
watch: {
|
watch: {
|
||||||
filetree: {
|
filetree: {
|
||||||
deep: true,
|
deep: true,
|
||||||
handler() {
|
handler(newVal) {
|
||||||
/*let dirArray = this.currentPath.split("/");
|
let dirArray = this.currentPath.split("/");
|
||||||
this.files = findDirectory(newVal, dirArray);
|
this.files = findDirectory(newVal, dirArray);
|
||||||
|
|
||||||
if (!this.showHiddenFiles) {
|
if (!this.showHiddenFiles) {
|
||||||
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
|
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: {
|
currentPath: {
|
||||||
handler() {
|
handler(newVal) {
|
||||||
/*let dirArray = newVal.split("/");
|
let dirArray = newVal.split("/");
|
||||||
this.files = findDirectory(this.filetree, dirArray);
|
this.files = findDirectory(this.filetree, dirArray);
|
||||||
|
|
||||||
if (!this.showHiddenFiles) {
|
if (!this.showHiddenFiles) {
|
||||||
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
|
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: {
|
displayMetadata: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user