removed asyn await and moved print buttons
This commit is contained in:
@@ -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")],
|
||||
|
||||
@@ -359,6 +359,9 @@ script#control-view-template(type="text/x-template")
|
||||
//- :disabled="!is_ready")
|
||||
//- | Upload File
|
||||
|
||||
button.submit-macros(title="Cancel Macros",@click="print_config",style="margin-left:5px;background-color:#fafafa;") CONFIG
|
||||
button.submit-macros(title="Cancel Macros",@click="print_state",style="margin-left:5px;background-color:#fafafa;") STATE
|
||||
|
||||
.progress(v-if="toolpath_progress && toolpath_progress < 1",
|
||||
title="Simulating GCode to check for errors, calculate ETA and " +
|
||||
"generate 3D view. You can run GCode before the simulation " +
|
||||
|
||||
@@ -136,6 +136,3 @@ script#macros-template(type="text/x-template")
|
||||
button.pure-button.pure-button-primary(@click="save_macro") Confirm
|
||||
|
||||
button.submit-macros(title="Cancel Macro",@click="clear_macro",style="margin-left:5px;background-color:#fafafa;",:disabled="initial_tab") Cancel
|
||||
|
||||
button.submit-macros(title="Cancel Macros",@click="print_config",style="margin-left:5px;background-color:#fafafa;") CONFIG
|
||||
button.submit-macros(title="Cancel Macros",@click="print_state",style="margin-left:5px;background-color:#fafafa;") STATE
|
||||
|
||||
Reference in New Issue
Block a user