This commit is contained in:
sanjayk03-dev
2023-12-30 05:51:32 +05:30
parent 6432510785
commit 72ed2f7390
4 changed files with 8 additions and 7 deletions

View File

@@ -204,6 +204,8 @@ module.exports = {
}, },
isMacrosPresent: function(){ isMacrosPresent: function(){
if(this.config.macros!=undefined){ if(this.config.macros!=undefined){
console.log("isMacrosPresent",this.config.macros!=undefined);
console.log(this.config.macros.length!=0);
return this.config.macros.length!=0; return this.config.macros.length!=0;
} }
return false; return false;

View File

@@ -8,7 +8,6 @@ module.exports = {
data: function (){ data: function (){
return { return {
no_of_macros : 0,
toolpath_progress: 0, toolpath_progress: 0,
} }
}, },
@@ -38,9 +37,6 @@ module.exports = {
utils.clickFileInput("gcode-file-input"); utils.clickFileInput("gcode-file-input");
console.log("utils done"); console.log("utils done");
}, },
getMacrosList : function (){
return no_of_macros;
},
load: function() { load: function() {
const file_time = this.state.selected_time; const file_time = this.state.selected_time;
console.log('file_time',this.state.selected_time); console.log('file_time',this.state.selected_time);
@@ -67,6 +63,8 @@ module.exports = {
name:macrosName, name:macrosName,
color:macrosColor color:macrosColor
}) })
console.log("Successfully saved");
console.lof(this.config.macros);
}, },
} }
} }

View File

@@ -207,7 +207,8 @@ script#control-view-template(type="text/x-template")
label {{(progress || 0) | percent}} label {{(progress || 0) | percent}}
.bar(:style="'width:' + (progress || 0) * 100 + '%'") .bar(:style="'width:' + (progress || 0) * 100 + '%'")
.macros-buttons(v-if="this.config.macros!=undefined") .macros-div
.macros-buttons(v-if="isMacrosPresent")
<p> there is a macro <p> there is a macro
.tabs .tabs

View File

@@ -14,6 +14,6 @@ script#macros-template(type="text/x-template")
v-model="state.selected", @change="load", :disabled="!is_ready", v-model="state.selected", @change="load", :disabled="!is_ready",
style="max-width:100%") style="max-width:100%")
option(v-for="file in state.files", :value="file") {{file}} option(v-for="file in state.files", :value="file") {{file}}
button.submit-macros(title="Save Macros",@click="saveMacros",style="height:100px;width:100px;font-weight:normal") button.submit-macros(title="Save Macros",@click="saveMacros",style="height:100px;width:100px;font-weight:normal") Save Macros
gcode-viewer gcode-viewer