From 421bac9de4c7eb883f944f89e5259e7af713a4f2 Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Thu, 4 Jan 2024 23:40:32 +0530 Subject: [PATCH] save error fixed , flexed upload button --- src/js/macros.js | 4 ++-- src/stylus/style.styl | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 23f3ff4..338c22b 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -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 = [ diff --git a/src/stylus/style.styl b/src/stylus/style.styl index 0966a67..6435b60 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -641,6 +641,9 @@ span.unit align-items center justify-content center +.select-upload-gcode + display flex + flex-direction row .tabs margin-top 5px