trying file name and removed default name in config
This commit is contained in:
@@ -77,8 +77,16 @@ module.exports = {
|
||||
});
|
||||
},
|
||||
saveMacros: async function () {
|
||||
var macrosName = document.getElementById(
|
||||
`macros-name-${this.tab-1}`
|
||||
).value;
|
||||
var macrosColor = document.getElementById(
|
||||
`macros-color-${this.tab-1}`
|
||||
).value;
|
||||
|
||||
if(this.state.selected =='default'){
|
||||
const file = this.newGcode[this.tab-1];
|
||||
file.name = macrosName;
|
||||
SvelteComponents.showDialog("Upload", {
|
||||
file,
|
||||
onComplete: () => {
|
||||
@@ -87,20 +95,13 @@ module.exports = {
|
||||
},
|
||||
});
|
||||
}
|
||||
var macrosName = document.getElementById(
|
||||
`macros-name-${this.tab-1}`
|
||||
).value;
|
||||
var macrosColor = document.getElementById(
|
||||
`macros-color-${this.tab-1}`
|
||||
).value;
|
||||
|
||||
console.log(this.tab-1);
|
||||
console.log(macrosColor, macrosName);
|
||||
|
||||
this.config.macros[this.tab-1].name = macrosName;
|
||||
console.log(this.config.macros[this.tab-1].name);
|
||||
this.config.macros[this.tab-1].color = macrosColor;
|
||||
this.config.macros[this.tab-1].gcode_file_name = this.state.selected;
|
||||
this.config.macros[this.tab-1].gcode_file_name = file.name;
|
||||
this.config.macros[this.tab-1].gcode_file_time =
|
||||
this.state.selected_time;
|
||||
console.log(this.config.macros);
|
||||
|
||||
@@ -638,11 +638,6 @@
|
||||
}
|
||||
],
|
||||
"template": {
|
||||
"name": {
|
||||
"type": "enum",
|
||||
"values": ["FireLaser", "Home", "Perk", "Spindle Warmup", "Spindle ON", "Spindle OFF","Vacuum ON","Vacuum OFF"],
|
||||
"default": " "
|
||||
},
|
||||
"color": {
|
||||
"type": "text",
|
||||
"default": "#e6e6e6"
|
||||
|
||||
Reference in New Issue
Block a user