From f10791bb6def191b50b9ca244167632a41543825 Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 22 Feb 2024 03:54:38 +0530 Subject: [PATCH] fixing checkbox --- src/js/control-view.js | 2 +- src/js/macros.js | 2 +- src/pug/templates/macros.pug | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/js/control-view.js b/src/js/control-view.js index e382350..396d05f 100644 --- a/src/js/control-view.js +++ b/src/js/control-view.js @@ -545,7 +545,7 @@ module.exports = { } try { this.load(); - if (this.config.macros[id].alert) { + if (this.config.macros[id].alert == true) { this.macrosLoading = true; } else { setImmediate(() => this.start_pause()); diff --git a/src/js/macros.js b/src/js/macros.js index ffd87a1..07b7e5f 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -74,6 +74,7 @@ module.exports = { editedAlert: function (event) { if (this.tab != 0 && this.config.macros[this.tab - 1].alert != event.target.value) { this.$dispatch("macros-edited"); + this.macrosAlert = event.target.value; } }, editedName: function (event) { @@ -214,7 +215,6 @@ module.exports = { return; } - var file_name = this.fileName == "default" ? formattedFilename + ".ngc" : this.fileName; var file = this.newGcode; diff --git a/src/pug/templates/macros.pug b/src/pug/templates/macros.pug index 384c9ca..78f7e21 100644 --- a/src/pug/templates/macros.pug +++ b/src/pug/templates/macros.pug @@ -82,9 +82,9 @@ script#macros-template(type="text/x-template") .input-container 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" v-model="macrosAlert",@change="editedAlert") - label Would you like an alert when running this macro? + div + input.input-alert(type="checkbox",id="macros-alert" v-model="macrosAlert",@change="editedAlert") + label Would you like an alert when running this macro? p.title Macros G-Code .flex-row-container select(id="gcode-select",title="Select previously uploaded GCode programs.",selected