fixing checkbox

This commit is contained in:
sanjayk03-dev
2024-02-22 03:54:38 +05:30
parent df50a22bd8
commit f10791bb6d
3 changed files with 5 additions and 5 deletions

View File

@@ -545,7 +545,7 @@ module.exports = {
} }
try { try {
this.load(); this.load();
if (this.config.macros[id].alert) { if (this.config.macros[id].alert == true) {
this.macrosLoading = true; this.macrosLoading = true;
} else { } else {
setImmediate(() => this.start_pause()); setImmediate(() => this.start_pause());

View File

@@ -74,6 +74,7 @@ module.exports = {
editedAlert: function (event) { editedAlert: function (event) {
if (this.tab != 0 && this.config.macros[this.tab - 1].alert != event.target.value) { if (this.tab != 0 && this.config.macros[this.tab - 1].alert != event.target.value) {
this.$dispatch("macros-edited"); this.$dispatch("macros-edited");
this.macrosAlert = event.target.value;
} }
}, },
editedName: function (event) { editedName: function (event) {
@@ -214,7 +215,6 @@ module.exports = {
return; return;
} }
var file_name = this.fileName == "default" ? formattedFilename + ".ngc" : this.fileName; var file_name = this.fileName == "default" ? formattedFilename + ".ngc" : this.fileName;
var file = this.newGcode; var file = this.newGcode;

View File

@@ -82,9 +82,9 @@ script#macros-template(type="text/x-template")
.input-container .input-container
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" v-model="macrosAlert",@change="editedAlert") input.input-alert(type="checkbox",id="macros-alert" v-model="macrosAlert",@change="editedAlert")
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
select(id="gcode-select",title="Select previously uploaded GCode programs.",selected select(id="gcode-select",title="Select previously uploaded GCode programs.",selected