From 2dfb319e1c451ecc0ab6d1b13c5b2b02607811ab Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 4 Jan 2024 20:32:05 +0530 Subject: [PATCH] set cancel color to white, adding reset icon, --- src/js/macros.js | 2 +- src/pug/templates/macros.pug | 27 ++++++++++++----------- src/stylus/style.styl | 42 ++++++++++++++++++------------------ 3 files changed, 36 insertions(+), 35 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 65238b1..2656a54 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -104,7 +104,7 @@ module.exports = { }, cancelMacros: function (id) { document.getElementById(`macros-name-${id}`).value = ''; - document.getElementById(`macros-color-${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 decf882..de9a637 100644 --- a/src/pug/templates/macros.pug +++ b/src/pug/templates/macros.pug @@ -2,7 +2,8 @@ script#macros-template(type="text/x-template") #macros h1 Macros Configuration button.pure-button(title="Print config.", @click="resetConfig", - style="height:50px;width:120px;font-weight:normal;padding-vertical:5px;background-color:#5a9ad7") Reset Macros + style="height:50px;width:120px;font-weight:normal;color:#fff;background-color:#5a9ad7") Reset Macros + fa.fa-rotate-right .warning-box p u Note: @@ -48,8 +49,8 @@ script#macros-template(type="text/x-template") gcode-viewer button.submit-macros(title="Save Macros",@click="saveMacros(0)", style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save - button.submit-macros(title="Save Macros",@click="cancelMacros(0)", - style="height:50px;width:140px;font-weight:normal;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel + button.submit-macros(title="Cancel Macros",@click="cancelMacros(0)", + style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel section#content2.tab-content .macros-form @@ -73,8 +74,8 @@ script#macros-template(type="text/x-template") gcode-viewer button.submit-macros(title="Save Macros",@click="saveMacros(1)", style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save - button.submit-macros(title="Save Macros",@click="cancelMacros(1)", - style="height:50px;width:140px;font-weight:normal;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel + button.submit-macros(title="Cancel Macros",@click="cancelMacros(1)", + style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel section#content3.tab-content .macros-form @@ -98,8 +99,8 @@ script#macros-template(type="text/x-template") gcode-viewer button.submit-macros(title="Save Macros",@click="saveMacros(2)", style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save - button.submit-macros(title="Save Macros",@click="cancelMacros(2)", - style="height:50px;width:140px;font-weight:normal;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel + button.submit-macros(title="Cancel Macros",@click="cancelMacros(2)", + style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel section#content4.tab-content .macros-form @@ -123,8 +124,8 @@ script#macros-template(type="text/x-template") gcode-viewer button.submit-macros(title="Save Macros",@click="saveMacros(3)", style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save - button.submit-macros(title="Save Macros",@click="cancelMacros(3)", - style="height:50px;width:140px;font-weight:normal;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel + button.submit-macros(title="Cancel Macros",@click="cancelMacros(3)", + style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel section#content5.tab-content .macros-form @@ -148,8 +149,8 @@ script#macros-template(type="text/x-template") gcode-viewer button.submit-macros(title="Save Macros",@click="saveMacros(4)", style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save - button.submit-macros(title="Save Macros",@click="cancelMacros(4)", - style="height:50px;width:140px;font-weight:normal;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel + button.submit-macros(title="Cancel Macros",@click="cancelMacros(4)", + style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel section#content6.tab-content .macros-form @@ -173,5 +174,5 @@ script#macros-template(type="text/x-template") gcode-viewer button.submit-macros(title="Save Macros",@click="saveMacros(5)", style="height:50px;width:140px;font-weight:normal;background-color:#add1ad;color:#fff;border:0;margin-top:30px") Save - button.submit-macros(title="Save Macros",@click="cancelMacros(5)", - style="height:50px;width:140px;font-weight:normal;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel + button.submit-macros(title="Cancel Macros",@click="cancelMacros(5)", + style="height:50px;width:140px;font-weight:normal;margin-left:5px;background-color:#f6f6f6;color:#000;border:0;margin-top:30px") Cancel diff --git a/src/stylus/style.styl b/src/stylus/style.styl index 1c23ee7..b590f54 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -531,7 +531,7 @@ span.unit white-space nowrap .tabs - padding-top 40px + padding-top 10px section min-height 500px @@ -628,29 +628,29 @@ span.unit border 0 color #fff - .macros - width 90% +.macros + width 90% - .warning-box - background-color #f9ff17 - border-radius 10px - border 0 - padding 4px - - .tabs - margin-top 5px - - .submit-macros - height 50px - width 140px - margin-top 30px - font-weight normal - background-color #add1ad - color #fff + .warning-box + background-color #f9ff17 + border-radius 10px border 0 + padding 4px + margin-vertical 5px + + .tabs + margin-top 5px + + .submit-macros + height 50px + width 140px + margin-top 30px + font-weight normal + background-color #add1ad + color #fff + border 0 + - - .path-viewer table margin 0.25em