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