diff --git a/src/pages/Files.vue b/src/pages/Files.vue
index 65de6dab..5b0a9027 100644
--- a/src/pages/Files.vue
+++ b/src/pages/Files.vue
@@ -85,6 +85,9 @@
+
+
+
@@ -445,6 +448,14 @@
return this.$store.dispatch("gui/setSettings", { gcodefiles: { showHiddenFiles: newVal } })
}
},
+ showPrintedFiles: {
+ get: function() {
+ return this.$store.state.gui.gcodefiles.showPrintedFiles
+ },
+ set: function(newVal) {
+ return this.$store.dispatch("gui/setSettings", { gcodefiles: { showPrintedFiles: newVal } })
+ }
+ },
countPerPage: {
get: function() {
return this.$store.state.gui.gcodefiles.countPerPage
@@ -701,6 +712,12 @@
if (!this.showHiddenFiles) {
this.files = this.files.filter(file => file.filename !== "thumbs" && file.filename.substr(0, 1) !== ".");
}
+ 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')
+ }
},
startPrint(filename = "") {
filename = (this.currentPath+"/"+filename).substring(7)
@@ -895,23 +912,26 @@
watch: {
filetree: {
deep: true,
- handler(newVal) {
- let dirArray = this.currentPath.split("/");
+ handler() {
+ /*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()
}
},
currentPath: {
- handler(newVal) {
- let dirArray = newVal.split("/");
+ handler() {
+ /*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()
}
},
displayMetadata: {
diff --git a/src/store/gui/index.js b/src/store/gui/index.js
index a9add32b..3365bc60 100644
--- a/src/store/gui/index.js
+++ b/src/store/gui/index.js
@@ -58,6 +58,7 @@ export function getDefaultState() {
gcodefiles: {
countPerPage: 10,
showHiddenFiles: false,
+ showPrintedFiles: true,
hideMetadataColums: []
},
history: {