DOM to State
This commit is contained in:
@@ -19,6 +19,7 @@ module.exports = {
|
||||
addMacros: false,
|
||||
maxLimitReached: false,
|
||||
macrosName: "",
|
||||
isChecked: false,
|
||||
fileName: "default",
|
||||
newGcode: "",
|
||||
};
|
||||
@@ -201,7 +202,8 @@ module.exports = {
|
||||
const macrosList = macros.map(item => item.name);
|
||||
var macrosName = document.getElementById("macros-name").value;
|
||||
var macrosColor = document.getElementById("macros-color").value;
|
||||
var macrosAlert = document.getElementById("macros-alert").value;
|
||||
var macrosAlert = this.isChecked;
|
||||
console.log(macrosAlert);
|
||||
const formattedFilename = macrosName
|
||||
.replace(/\\/g, "_")
|
||||
.replace(/\//g, "_")
|
||||
|
||||
@@ -83,7 +83,7 @@ script#macros-template(type="text/x-template")
|
||||
input.input-color(type="color",id="macros-color",value="#ffffff",@change="editedColor")
|
||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name" ,v-model="macrosName",@keypress="editedName")
|
||||
div
|
||||
input.input-alert(type="checkbox",id="macros-alert" value="false",@change="editedAlert")
|
||||
input.input-alert(type="checkbox",id="macros-alert" v-model="isChecked")
|
||||
label Would you like an alert when running this macro?
|
||||
p.title Macros G-Code
|
||||
.flex-row-container
|
||||
|
||||
Reference in New Issue
Block a user