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 () {
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 = [

View File

@@ -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

View File

@@ -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