From 55922dc1896dd26be5153e301325b9a537764078 Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 4 Jan 2024 21:30:03 +0530 Subject: [PATCH] fixing reset icons --- src/js/macros.js | 17 +++++++++-------- src/pug/templates/macros.pug | 15 ++++++++++++--- src/stylus/style.styl | 12 ++++++++---- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 2656a54..800b5de 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -10,6 +10,7 @@ module.exports = { data: function () { return { tab: "1", + confirmShow: false, }; }, components: { @@ -41,17 +42,17 @@ module.exports = { console.log("file_time", file_time); const file = this.state.selected; console.log("file: ", file); - console.log("last_file: ",this.last_file); - console.log("last_file_time: ",this.last_file_time); + // console.log("last_file: ", this.last_file); + // console.log("last_file_time: ", this.last_file_time); // if (this.last_file == file && this.last_file_time == file_time) { // return; // } - // this.last_file = file; - // this.last_file_time = file_time; + // this.last_file = file; + // this.last_file_time = file_time; - // this.$broadcast("gcode-load", file); - // this.$broadcast("gcode-line", this.state.line); + this.$broadcast("gcode-load", file); + this.$broadcast("gcode-line", this.state.line); // this.toolpath_progress = 0; // this.load_toolpath(file, file_time); }, @@ -103,8 +104,8 @@ module.exports = { } }, cancelMacros: function (id) { - document.getElementById(`macros-name-${id}`).value = ''; - document.getElementById(`macros-color-${id}`).value = '#fff'; + document.getElementById(`macros-name-${id}`).value = ""; + document.getElementById(`macros-color-${id}`).value = "#fff"; }, resetConfig: async function () { this.config.macros = [ diff --git a/src/pug/templates/macros.pug b/src/pug/templates/macros.pug index de9a637..7378fd7 100644 --- a/src/pug/templates/macros.pug +++ b/src/pug/templates/macros.pug @@ -1,13 +1,22 @@ script#macros-template(type="text/x-template") #macros + message(:show.sync="confirmUpload") + h3(slot="header") Upload Firmware? + div(slot="body") + p Are you sure you want to upload firmware #[em {{firmwareName}}]? + + div(slot="footer") + button.pure-button(@click="confirmUpload=false") Cancel + button.pure-button.pure-button-primary(@click="saveMacros(0)") + | Upload h1 Macros Configuration button.pure-button(title="Print config.", @click="resetConfig", - style="height:50px;width:120px;font-weight:normal;color:#fff;background-color:#5a9ad7") Reset Macros - fa.fa-rotate-right + style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7") Reset Macros + .fa.fa-rotate-right .warning-box p u Note: - | Reset the macros to default macros recommended by Onefinity CNC. + | Reset the macros to default macros recommended by Onefinity CNC. .tabs input#tab1(type="radio", name="tabs",checked="" @click="tab = '1'") label(for="tab1",style="height:50px;width:100px") Macros 1 diff --git a/src/stylus/style.styl b/src/stylus/style.styl index b590f54..b23a4fd 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -632,11 +632,15 @@ span.unit width 90% .warning-box - background-color #f9ff17 - border-radius 10px + display flex + background-color #ced512 + border-radius 5px border 0 padding 4px - margin-vertical 5px + margin-top 5px + margin-bottom 10px + margin-top 10px + align-items center .tabs margin-top 5px @@ -650,7 +654,7 @@ span.unit color #fff border 0 - + .path-viewer table margin 0.25em