fixing reset icons

This commit is contained in:
sanjayk03-dev
2024-01-04 21:30:03 +05:30
parent 2dfb319e1c
commit 55922dc189
3 changed files with 29 additions and 15 deletions

View File

@@ -10,6 +10,7 @@ module.exports = {
data: function () { data: function () {
return { return {
tab: "1", tab: "1",
confirmShow: false,
}; };
}, },
components: { components: {
@@ -41,8 +42,8 @@ module.exports = {
console.log("file_time", file_time); console.log("file_time", file_time);
const file = this.state.selected; const file = this.state.selected;
console.log("file: ", file); console.log("file: ", file);
console.log("last_file: ",this.last_file); // console.log("last_file: ", this.last_file);
console.log("last_file_time: ",this.last_file_time); // console.log("last_file_time: ", this.last_file_time);
// if (this.last_file == file && this.last_file_time == file_time) { // if (this.last_file == file && this.last_file_time == file_time) {
// return; // return;
// } // }
@@ -50,8 +51,8 @@ module.exports = {
// this.last_file = file; // this.last_file = file;
// this.last_file_time = file_time; // this.last_file_time = file_time;
// this.$broadcast("gcode-load", file); this.$broadcast("gcode-load", file);
// this.$broadcast("gcode-line", this.state.line); this.$broadcast("gcode-line", this.state.line);
// this.toolpath_progress = 0; // this.toolpath_progress = 0;
// this.load_toolpath(file, file_time); // this.load_toolpath(file, file_time);
}, },
@@ -103,8 +104,8 @@ module.exports = {
} }
}, },
cancelMacros: function (id) { cancelMacros: function (id) {
document.getElementById(`macros-name-${id}`).value = ''; document.getElementById(`macros-name-${id}`).value = "";
document.getElementById(`macros-color-${id}`).value = '#fff'; document.getElementById(`macros-color-${id}`).value = "#fff";
}, },
resetConfig: async function () { resetConfig: async function () {
this.config.macros = [ this.config.macros = [

View File

@@ -1,9 +1,18 @@
script#macros-template(type="text/x-template") script#macros-template(type="text/x-template")
#macros #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 h1 Macros Configuration
button.pure-button(title="Print config.", @click="resetConfig", button.pure-button(title="Print config.", @click="resetConfig",
style="height:50px;width:120px;font-weight:normal;color:#fff;background-color:#5a9ad7") Reset Macros style="height:50px;width:170px;font-weight:normal;color:#fff;background-color:#5a9ad7") Reset Macros
fa.fa-rotate-right .fa.fa-rotate-right
.warning-box .warning-box
p p
u Note: u Note:

View File

@@ -632,11 +632,15 @@ span.unit
width 90% width 90%
.warning-box .warning-box
background-color #f9ff17 display flex
border-radius 10px background-color #ced512
border-radius 5px
border 0 border 0
padding 4px padding 4px
margin-vertical 5px margin-top 5px
margin-bottom 10px
margin-top 10px
align-items center
.tabs .tabs
margin-top 5px margin-top 5px