removed asyn await and moved print buttons

This commit is contained in:
sanjayk03-dev
2024-04-08 19:37:43 +05:30
parent 7f5daeed6a
commit 89e1cfaf95
3 changed files with 12 additions and 6 deletions

View File

@@ -506,10 +506,10 @@ module.exports = {
this.config.non_macros_list = [...this.state.non_macros_list];
this.config.gcode_list = [...this.state.gcode_list];
for (let file of files) {
const reader = new FileReader();
reader.onload = async () => {
reader.onload = () => {
const gcode = reader.result;
const extension = file.name.split(".").pop();
@@ -525,7 +525,7 @@ module.exports = {
return;
}
await this.upload_gcode(file.name, gcode);
this.upload_gcode(file.name, gcode);
const isAlreadyPresent = this.config.non_macros_list.find(element => element.file_name == file.name);
if (!isAlreadyPresent) {
@@ -782,6 +782,12 @@ module.exports = {
}
}
},
print_config: function () {
console.log(this.config);
},
print_state: function () {
console.log(this.state);
},
},
mixins: [require("./axis-vars")],