logging
This commit is contained in:
@@ -16,9 +16,9 @@ module.exports = {
|
|||||||
deleteGCode: false,
|
deleteGCode: false,
|
||||||
edited: false,
|
edited: false,
|
||||||
maxLimitReached: false,
|
maxLimitReached: false,
|
||||||
newGcode: "",
|
macrosName: "",
|
||||||
fileName: "default",
|
fileName: "default",
|
||||||
macrosName:"",
|
newGcode: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
events: {
|
events: {
|
||||||
@@ -173,7 +173,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
saveMacros: async function () {
|
saveMacros: async function () {
|
||||||
var macrosName = document.getElementById("macros-name").value;
|
var macrosName = document.getElementById("macros-name").value;
|
||||||
console.log("Macros Name: ",this.macrosName)
|
console.log("Macros Name: ", this.macrosName);
|
||||||
var macrosColor = document.getElementById("macros-color").value;
|
var macrosColor = document.getElementById("macros-color").value;
|
||||||
|
|
||||||
console.log(" this.state.selected && time: ", this.state.selected, this.state.selected_time);
|
console.log(" this.state.selected && time: ", this.state.selected, this.state.selected_time);
|
||||||
@@ -205,7 +205,6 @@ module.exports = {
|
|||||||
console.log("delete a gcode");
|
console.log("delete a gcode");
|
||||||
if (filename == "default") {
|
if (filename == "default") {
|
||||||
this.$set("newGcode", "");
|
this.$set("newGcode", "");
|
||||||
this.fileName="default";
|
|
||||||
} else {
|
} else {
|
||||||
api.delete(`file/${filename}`);
|
api.delete(`file/${filename}`);
|
||||||
this.$set("newGcode", "");
|
this.$set("newGcode", "");
|
||||||
@@ -219,7 +218,7 @@ module.exports = {
|
|||||||
console.error("Restore Failed: ", error);
|
console.error("Restore Failed: ", error);
|
||||||
alert("Restore failed");
|
alert("Restore failed");
|
||||||
}
|
}
|
||||||
console.log("tab in delete_current:", this.tab);
|
this.fileName = "default";
|
||||||
this.deleteGCode = false;
|
this.deleteGCode = false;
|
||||||
},
|
},
|
||||||
delete_all_macros: async function () {
|
delete_all_macros: async function () {
|
||||||
@@ -229,12 +228,12 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
clearMacros: async function () {
|
clearMacros: async function () {
|
||||||
console.log("this.tab", this.tab - 1);
|
console.log("this.tab", this.tab - 1);
|
||||||
console.log(document.getElementById("macros-name").value);
|
console.log("macros-name: ", document.getElementById("macros-name").value);
|
||||||
|
console.log("macros-color: ", document.getElementById("macros-color").value);
|
||||||
const defaultValue = this.config.macros[this.tab - 1];
|
const defaultValue = this.config.macros[this.tab - 1];
|
||||||
console.log("DefaultValue: ",defaultValue);
|
console.log("DefaultValue: ", defaultValue);
|
||||||
document.getElementById("macros-name").value = defaultValue.name;
|
document.getElementById("macros-name").value = defaultValue.name;
|
||||||
document.getElementById("macros-color").value = defaultValue.color;
|
document.getElementById("macros-color").value = defaultValue.color;
|
||||||
document.getElementById("gcode-field").value = "";
|
|
||||||
this.$set("newGcode", "");
|
this.$set("newGcode", "");
|
||||||
this.fileName = "default";
|
this.fileName = "default";
|
||||||
},
|
},
|
||||||
@@ -345,10 +344,13 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
loadMacrosSettings: function () {
|
loadMacrosSettings: function () {
|
||||||
console.log("selected : ", this.tab);
|
console.log("selected : ", this.tab);
|
||||||
const macros = this.config.macros[this.tab-1];
|
const macros = this.config.macros[this.tab - 1];
|
||||||
|
console.log("macros-name: ", document.getElementById("macros-name").value);
|
||||||
|
console.log("macros-color: ", document.getElementById("macros-color").value);
|
||||||
document.getElementById("macros-name").value = macros.name;
|
document.getElementById("macros-name").value = macros.name;
|
||||||
document.getElementById("macros-color").value = macros.color;
|
document.getElementById("macros-color").value = macros.color;
|
||||||
document.getElementById("gcode-field").value = "";
|
// document.getElementById("gcode-field").value = "";
|
||||||
|
this.$set("newGCode", "");
|
||||||
this.$set("fileName", macros.name);
|
this.$set("fileName", macros.name);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -56,9 +56,10 @@ script#macros-template(type="text/x-template")
|
|||||||
| Select a Macros to edit its settings.
|
| Select a Macros to edit its settings.
|
||||||
|
|
||||||
.tabs
|
.tabs
|
||||||
|
p.title Select Macros
|
||||||
select(id="macros-select",title="Select a Macros to edit.",selected
|
select(id="macros-select",title="Select a Macros to edit.",selected
|
||||||
v-model="tab",@change="loadMacrosSettings",
|
v-model="tab",@change="loadMacrosSettings",
|
||||||
style="width:250px;height:50px;border-radius:10px;padding-left:15px;font-weight:bold")
|
style="width:250px;height:50px;border-radius:10px;padding-left:15px;font-weight:bold;margin-left:30px")
|
||||||
option( selected='' value='0') Select a Macros
|
option( selected='' value='0') Select a Macros
|
||||||
option(v-for="(index,file) in macrosList", :value="index+1") Macros {{index+1}}
|
option(v-for="(index,file) in macrosList", :value="index+1") Macros {{index+1}}
|
||||||
.macros-form
|
.macros-form
|
||||||
|
|||||||
@@ -659,7 +659,7 @@ span.unit
|
|||||||
margin-top 10px
|
margin-top 10px
|
||||||
align-items center
|
align-items center
|
||||||
justify-content center
|
justify-content center
|
||||||
|
|
||||||
|
|
||||||
.new-gcode
|
.new-gcode
|
||||||
height 13rem
|
height 13rem
|
||||||
@@ -676,6 +676,7 @@ span.unit
|
|||||||
.tabs
|
.tabs
|
||||||
margin-top 5px
|
margin-top 5px
|
||||||
width 850px
|
width 850px
|
||||||
|
padding 20px
|
||||||
|
|
||||||
.macros-view
|
.macros-view
|
||||||
padding 30px
|
padding 30px
|
||||||
|
|||||||
Reference in New Issue
Block a user