fixing list of macros

This commit is contained in:
sanjayk03-dev
2024-01-23 13:48:10 +05:30
parent 3435f3ade2
commit 4d311bd083
2 changed files with 6 additions and 3 deletions

View File

@@ -83,7 +83,7 @@ module.exports = {
this.newGcode[this.tab - 1] = event.target.value; this.newGcode[this.tab - 1] = event.target.value;
}, },
isPresent: function (obj) { 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 () { loadMacrosGcode: async function () {
const file = this.selectedValues[this.tab - 1]; const file = this.selectedValues[this.tab - 1];
@@ -178,7 +178,7 @@ module.exports = {
gcode_file_name: filename, gcode_file_name: filename,
gcode_file_time: this.state.selected_time, 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'); console.log('new item');
this.config.macrosList.push(gcodeData); this.config.macrosList.push(gcodeData);
} }

View File

@@ -983,8 +983,11 @@ tt.save
.modal-footer .modal-footer
text-align right text-align right
.footer
width 100%
display flex display flex
justify-content space-between justify-content center
.modal-enter, .modal-leave .modal-enter, .modal-leave
opacity 0 opacity 0