From f58f51615a8ff267944db948c81538b596d2780b Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Tue, 23 Jan 2024 11:26:18 +0530 Subject: [PATCH] syncing message --- src/js/macros.js | 2 +- src/pug/templates/macros.pug | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 6b44576..d3249ce 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -100,12 +100,12 @@ module.exports = { } this.$set("selectedValues[this.tab - 1]", file.name); - this.loadMacrosGcode(); SvelteComponents.showDialog("Upload", { file, onComplete: () => { this.last_file_time = undefined; // Force reload + this.loadMacrosGcode(); }, }); }, diff --git a/src/pug/templates/macros.pug b/src/pug/templates/macros.pug index 404b38c..92b95fe 100644 --- a/src/pug/templates/macros.pug +++ b/src/pug/templates/macros.pug @@ -31,12 +31,13 @@ script#macros-template(type="text/x-template") |  Selected h1 Macros Configuration - button.pure-button(title="Reset Macros", @click="confirmReset=true", - style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7;display:flex;align-items:center;justify-content:space-around") Reset Macros - .fa.fa-rotate-right - button.pure-button(title="Delete Macros GCodes",@click="deleteMacros = true", - :disabled="!state.selected",style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7;display:flex;align-items:center;justify-content:space-around:margin-left: 0.1rem") Delete GCode - .fa.fa-trash + .select-upload-gcode + button.pure-button(title="Reset Macros", @click="confirmReset=true", + style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7;display:flex;align-items:center;justify-content:space-around") Reset Macros + .fa.fa-rotate-right + button.pure-button(title="Delete Macros GCodes",@click="deleteGCode = true", + :disabled="!state.selected",style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7;display:flex;align-items:center;justify-content:space-around:margin-left:") Delete GCode + .fa.fa-trash .warning-box p u Note: @@ -70,8 +71,8 @@ script#macros-template(type="text/x-template") .macros-form p.title Name .input-container - input.input-color(type="color",id="macros-color-0",value="getMacrosData('color')") - input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0" value="getMacrosData('name')") + input.input-color(type="color",id="macros-color-0",v-model="getMacrosData('color')") + input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0" v-model="getMacrosData('name')") p.title G-Code .select-upload-gcode select#gcodeSelect-0(title="Select previously uploaded GCode programs.",selected