gcodes box, naming conventions,
This commit is contained in:
@@ -44,6 +44,7 @@ module.exports = {
|
||||
showGcodeMessage: false,
|
||||
showNoGcodeMessage: false,
|
||||
macrosLoading: false,
|
||||
show_gcodes: false,
|
||||
};
|
||||
},
|
||||
|
||||
@@ -413,7 +414,7 @@ module.exports = {
|
||||
const folderName = files[0].webkitRelativePath.split("/")[0];
|
||||
console.log(files);
|
||||
for (let file of files) {
|
||||
console.log(file);
|
||||
console.log(file.name);
|
||||
const extension = file.name.split(".").pop();
|
||||
switch (extension.toLowerCase()) {
|
||||
case "nc":
|
||||
@@ -453,13 +454,15 @@ module.exports = {
|
||||
alert("Restore failed");
|
||||
}
|
||||
|
||||
SvelteComponents.showDialog("Upload", {
|
||||
file,
|
||||
onComplete: () => {
|
||||
this.last_file_time = undefined; // Force reload
|
||||
this.$broadcast("gcode-reload", file.name);
|
||||
},
|
||||
});
|
||||
setImmediate(() =>
|
||||
SvelteComponents.showDialog("Upload", {
|
||||
file,
|
||||
onComplete: () => {
|
||||
this.last_file_time = undefined; // Force reload
|
||||
this.$broadcast("gcode-reload", file.name);
|
||||
},
|
||||
}),
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -377,11 +377,11 @@ module.exports = {
|
||||
}
|
||||
this.deleteSelected = false;
|
||||
},
|
||||
},
|
||||
print_config: function () {
|
||||
console.log(this.config);
|
||||
},
|
||||
print_state: function () {
|
||||
console.log(this.state);
|
||||
print_config: function () {
|
||||
console.log(this.config);
|
||||
},
|
||||
print_state: function () {
|
||||
console.log(this.state);
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
@@ -270,7 +270,25 @@ script#control-view-template(type="text/x-template")
|
||||
:disabled="(!is_ready && !is_holding) || !state.selected",
|
||||
v-if="false", style="height:100px;width:100px;font-weight:normal")
|
||||
.fa.fa-step-forward
|
||||
|
||||
message(:show.sync="show_gcodes")
|
||||
h3(slot="header") Select G-Code
|
||||
div(slot="body")
|
||||
details
|
||||
summary
|
||||
| folder name
|
||||
ul.folder-list
|
||||
li one
|
||||
li two
|
||||
|
||||
div(slot="footer")
|
||||
button.pure-button(@click="show_gcodes=false") Cancel
|
||||
button.pure-button.pure-button-primary(@click="show_gcodes=false") Select
|
||||
|
||||
button.pure-button(title="Open Title", @click="show_gcodes=true",
|
||||
:disabled="!is_ready",style="height:100px;width:100px;font-weight:normal")
|
||||
.fa.fa-folder
|
||||
|
||||
button.pure-button(title="Upload a new GCode program.", @click="open_file",
|
||||
:disabled="!is_ready",style="height:100px;width:100px;font-weight:normal")
|
||||
.fa.fa-folder-open
|
||||
|
||||
@@ -110,5 +110,5 @@ script#macros-template(type="text/x-template")
|
||||
button.submit-macros.button-success(title="Save Macros",@click="confirmSave=true",:disabled="!edited") Save
|
||||
button.submit-macros(title="Cancel Macros",@click="clear_macro",style="margin-left:5px;background-color:#fafafa;",:disabled="initial_tab") Cancel
|
||||
|
||||
button.submit-macros(title="Cancel Macros",@click="print_config",style="margin-left:5px;background-color:#fafafa;",:disabled="initial_tab") CONFIG
|
||||
button.submit-macros(title="Cancel Macros",@click="print_state",style="margin-left:5px;background-color:#fafafa;",:disabled="initial_tab") STATE
|
||||
button.submit-macros(title="Cancel Macros",@click="print_config",style="margin-left:5px;background-color:#fafafa;") CONFIG
|
||||
button.submit-macros(title="Cancel Macros",@click="print_state",style="margin-left:5px;background-color:#fafafa;") STATE
|
||||
|
||||
Reference in New Issue
Block a user