save error fixed , flexed upload button

This commit is contained in:
sanjayk03-dev
2024-01-04 23:40:32 +05:30
parent cefb1b4179
commit 421bac9de4
2 changed files with 5 additions and 2 deletions

View File

@@ -80,11 +80,11 @@ module.exports = {
this.config.macros[id].gcode_file_name = this.state.selected;
this.config.macros[id].gcode_file_time = this.state.selected_time;
console.log(this.config.macros);
this.cancelMacros();
try {
await api.put("config/save", this.config);
console.log("Successfully saved");
this.$dispatch("update");
this.cancelMacros();
} catch (error) {
console.error("Restore Failed: ", error);
alert("Restore failed");
@@ -93,7 +93,7 @@ module.exports = {
cancelMacros: function (id) {
document.getElementById(`macros-name-${id}`).value = "";
document.getElementById(`macros-color-${id}`).value = "#ffffff";
// this.$broadcast("gcode-clear");
this.$broadcast("gcode-clear");
},
resetConfig: async function () {
this.config.macros = [

View File

@@ -641,6 +641,9 @@ span.unit
align-items center
justify-content center
.select-upload-gcode
display flex
flex-direction row
.tabs
margin-top 5px