bug fix
This commit is contained in:
@@ -205,9 +205,18 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
gcode_files: function () {
|
gcode_files: function () {
|
||||||
let files = [];
|
let files = [];
|
||||||
files = this.config.gcode_list
|
if (!this.state.folder || this.state.folder == "") {
|
||||||
.find(item => item.name == this.state.folder || "")
|
return files;
|
||||||
.files.map(item => item.file_name);
|
}
|
||||||
|
if (this.state.folder == "unorganized files") {
|
||||||
|
files = this.config.gcode_list.map(item => {
|
||||||
|
if (item.type == "file") {
|
||||||
|
return item.name;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return files;
|
||||||
|
}
|
||||||
|
files = this.config.gcode_list.find(item => item.name == this.state.folder).files.map(item => item.file_name);
|
||||||
// const filesWithNoMacros = this.state.files.filter(
|
// const filesWithNoMacros = this.state.files.filter(
|
||||||
// item => !this.config.macros_list.some(compareItem => compareItem.file_name == item),
|
// item => !this.config.macros_list.some(compareItem => compareItem.file_name == item),
|
||||||
// );
|
// );
|
||||||
@@ -217,7 +226,7 @@ module.exports = {
|
|||||||
return files;
|
return files;
|
||||||
},
|
},
|
||||||
gcode_folders: function () {
|
gcode_folders: function () {
|
||||||
let folders = [];
|
let folders = ["unorganized files"];
|
||||||
for (let item of this.config.gcode_list) {
|
for (let item of this.config.gcode_list) {
|
||||||
if (item.type == "folder") {
|
if (item.type == "folder") {
|
||||||
folders.push(item.name);
|
folders.push(item.name);
|
||||||
@@ -445,7 +454,7 @@ module.exports = {
|
|||||||
if (isAlreadyPresent == undefined) {
|
if (isAlreadyPresent == undefined) {
|
||||||
this.config.non_macros_list.push({ file_name: file.name });
|
this.config.non_macros_list.push({ file_name: file.name });
|
||||||
}
|
}
|
||||||
SvelteComponents.showDialog("Upload", {
|
await SvelteComponents.showDialog("Upload", {
|
||||||
file,
|
file,
|
||||||
onComplete: () => {
|
onComplete: () => {
|
||||||
this.last_file_time = undefined; // Force reload
|
this.last_file_time = undefined; // Force reload
|
||||||
|
|||||||
@@ -328,15 +328,16 @@ script#control-view-template(type="text/x-template")
|
|||||||
.fa.fa-trash
|
.fa.fa-trash
|
||||||
| Selected
|
| Selected
|
||||||
|
|
||||||
select(title="Select previously uploaded GCode programs.",
|
.drop-down-container
|
||||||
v-model="state.folder", :disabled="!is_ready",
|
select(title="Select previously uploaded GCode folder.",
|
||||||
style="max-width:100%")
|
v-model="state.folder", :disabled="!is_ready",
|
||||||
option(v-for="file in gcode_folders", :value="file") {{file}}
|
style="max-width:100%")
|
||||||
|
option(v-for="file in gcode_folders", :value="file") {{file}}
|
||||||
|
|
||||||
select(title="Select previously uploaded GCode programs.",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
v-model="state.selected", @change="load", :disabled="!is_ready",
|
||||||
style="max-width:100%")
|
style="max-width:100%")
|
||||||
option(v-for="file in gcode_files", :value="file") {{file}}
|
option(v-for="file in gcode_files", :value="file") {{file}}
|
||||||
|
|
||||||
.progress(v-if="toolpath_progress && toolpath_progress < 1",
|
.progress(v-if="toolpath_progress && toolpath_progress < 1",
|
||||||
title="Simulating GCode to check for errors, calculate ETA and " +
|
title="Simulating GCode to check for errors, calculate ETA and " +
|
||||||
|
|||||||
@@ -289,6 +289,9 @@ span.unit
|
|||||||
.control-view
|
.control-view
|
||||||
max-width 95%
|
max-width 95%
|
||||||
|
|
||||||
|
.drop-down-container
|
||||||
|
margin 1rem
|
||||||
|
|
||||||
table
|
table
|
||||||
border-collapse collapse
|
border-collapse collapse
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user