added div for upload

This commit is contained in:
sanjayk03-dev
2024-01-04 23:20:46 +05:30
parent 4e96582842
commit cefb1b4179
2 changed files with 68 additions and 62 deletions

View File

@@ -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 = [

View File

@@ -43,6 +43,12 @@ script#macros-template(type="text/x-template")
input.input-color(type="color",id="macros-color-0",value="#ffffff")
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0")
p.title G-Code
.select-upload-gcode
select(title="Select previously uploaded GCode programs.",
v-model="state.selected",@change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")
option(v-for="file in state.files", :value="file") {{file}}
button.pure-button(title="Upload a new GCode program.", @click="open",
:disabled="!is_ready",style="height:40px;width:130px;font-weight:normal;border-radius:5px;margin-left:4px;background-color:#5a9ad7;color:#fff;display:flex;align-items:center;justify-content:space-around") Upload
.fa.fa-upload
@@ -50,11 +56,6 @@ script#macros-template(type="text/x-template")
form.gcode-file-input.file-upload
input(type="file", @change="upload", :disabled="!is_ready",
accept=".nc,.ngc,.gcode,.gc")
select(title="Select previously uploaded GCode programs.",
v-model="state.selected",@change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")
option(v-for="file in state.files", :value="file") {{file}}
br
gcode-viewer
button.submit-macros(title="Save Macros",@click="saveMacros(0)",
@@ -69,6 +70,7 @@ script#macros-template(type="text/x-template")
input.input-color(type="color",id="macros-color-1",value="#ffffff")
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-1")
p.title G-Code
.select-upload-gcode
select(title="Select previously uploaded GCode programs.",
v-model="state.selected", @change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")
@@ -95,6 +97,7 @@ script#macros-template(type="text/x-template")
input.input-color(type="color",id="macros-color-2",value="#ffffff")
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-2")
p.title G-Code
.select-upload-gcode
select(title="Select previously uploaded GCode programs.",
v-model="state.selected", @change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")
@@ -121,6 +124,7 @@ script#macros-template(type="text/x-template")
input.input-color(type="color",id="macros-color-3",value="#ffffff")
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-3")
p.title G-Code
.select-upload-gcode
select(title="Select previously uploaded GCode programs.",
v-model="state.selected", @change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")
@@ -147,6 +151,7 @@ script#macros-template(type="text/x-template")
input.input-color(type="color",id="macros-color-4",value="#ffffff")
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-4")
p.title G-Code
.select-upload-gcode
select(title="Select previously uploaded GCode programs.",
v-model="state.selected", @change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")
@@ -173,6 +178,7 @@ script#macros-template(type="text/x-template")
input.input-color(type="color",id="macros-color-5",value="#ffffff")
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-5")
p.title G-Code
.select-upload-gcode
select(title="Select previously uploaded GCode programs.",
v-model="state.selected", @change="load", :disabled="!is_ready",
style="max-width:100%;height:40px;border-radius:5px")