diff --git a/src/js/macros.js b/src/js/macros.js index 8551f01..0618b94 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -83,7 +83,7 @@ module.exports = { this.newGcode[this.tab - 1] = event.target.value; }, isPresent: function (obj) { - this.defaultMacrosList.find(item => item.gcode_file_name == obj.gcode_file_name); + return this.defaultMacrosList.find(item => item.gcode_file_name == obj.gcode_file_name); }, loadMacrosGcode: async function () { const file = this.selectedValues[this.tab - 1]; @@ -178,7 +178,7 @@ module.exports = { gcode_file_name: filename, gcode_file_time: this.state.selected_time, }; - if (this.config.macrosList.some(item => item[gcode_file_name] !== filename)) { + if (this.config.macrosList.some(item => item.gcode_file_name !== filename)) { console.log('new item'); this.config.macrosList.push(gcodeData); } diff --git a/src/stylus/style.styl b/src/stylus/style.styl index b53870c..a0271c7 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -983,8 +983,11 @@ tt.save .modal-footer text-align right + +.footer + width 100% display flex - justify-content space-between + justify-content center .modal-enter, .modal-leave opacity 0