logging cancel macros
This commit is contained in:
@@ -65,9 +65,13 @@ module.exports = {
|
||||
cache: "no-cache",
|
||||
});
|
||||
console.log("response status: ", response.status);
|
||||
const text = (await response.text()).split(" ").join("\n");
|
||||
console.log("text: ", text);
|
||||
this.$set("newGcode[this.tab-1]", text);
|
||||
if (response.status == 200) {
|
||||
const text = (await response.text()).split(" ").join("\n");
|
||||
console.log("text: ", text);
|
||||
this.$set("newGcode[this.tab-1]", text);
|
||||
} else {
|
||||
console.log("error loading");
|
||||
}
|
||||
} else {
|
||||
this.$set("newGcode[this.tab-1]", "");
|
||||
}
|
||||
@@ -220,12 +224,14 @@ module.exports = {
|
||||
this.config.macrosList = [];
|
||||
},
|
||||
cancelMacros: async function () {
|
||||
console.log("this.tab", this.tab);
|
||||
console.log("this.tab", this.tab - 1);
|
||||
console.log(document.getElementById(`macros-name-${this.tab - 1}`).value);
|
||||
const defaultValue = this.config.macros[this.tab - 1];
|
||||
console.log(defaultValue);
|
||||
document.getElementById(`macros-name-${this.tab - 1}`).value = defaultValue.name;
|
||||
document.getElementById(`macros-color-${this.tab - 1}`).value = defaultValue.color;
|
||||
document.getElementById("gcode-field").value = "";
|
||||
this.$set("newGcode[this.tab]", "");
|
||||
this.$set("newGcode[this.tab-1]", "");
|
||||
this.config.macros[this.tab - 1].file_name = "default";
|
||||
},
|
||||
deleteAllMacros: async function () {
|
||||
|
||||
@@ -7,7 +7,7 @@ script#macros-template(type="text/x-template")
|
||||
|
||||
div(slot="footer")
|
||||
button.pure-button(@click="confirmReset=false") Cancel
|
||||
button.pure-button.pure-button-primary(@click="deleteAllMacros")
|
||||
button.pure-button.button-error(@click="deleteAllMacros")
|
||||
| Delete All
|
||||
|
||||
message(:show.sync="confirmSave")
|
||||
@@ -24,7 +24,7 @@ script#macros-template(type="text/x-template")
|
||||
p(slot="body")
|
||||
div(slot="footer")
|
||||
button.pure-button(@click="deleteGCode = false") Cancel
|
||||
button.pure-button.button-success(@click="delete_current")
|
||||
button.pure-button.button-error(@click="delete_current")
|
||||
.fa.fa-trash
|
||||
| Selected
|
||||
|
||||
@@ -33,7 +33,7 @@ script#macros-template(type="text/x-template")
|
||||
p(slot="body")
|
||||
div(slot="footer")
|
||||
button.pure-button(@click="deleteSelected = false") Cancel
|
||||
button.pure-button.button-success(@click="deleteSelectedMacros")
|
||||
button.pure-button.button-error(@click="deleteSelectedMacros")
|
||||
.fa.fa-trash
|
||||
| Yes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user