added div for upload
This commit is contained in:
@@ -93,7 +93,7 @@ module.exports = {
|
|||||||
cancelMacros: function (id) {
|
cancelMacros: function (id) {
|
||||||
document.getElementById(`macros-name-${id}`).value = "";
|
document.getElementById(`macros-name-${id}`).value = "";
|
||||||
document.getElementById(`macros-color-${id}`).value = "#ffffff";
|
document.getElementById(`macros-color-${id}`).value = "#ffffff";
|
||||||
this.$broadcast("gcode-clear");
|
// this.$broadcast("gcode-clear");
|
||||||
},
|
},
|
||||||
resetConfig: async function () {
|
resetConfig: async function () {
|
||||||
this.config.macros = [
|
this.config.macros = [
|
||||||
|
|||||||
@@ -43,18 +43,19 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-color(type="color",id="macros-color-0",value="#ffffff")
|
input.input-color(type="color",id="macros-color-0",value="#ffffff")
|
||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-0")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
button.pure-button(title="Upload a new GCode program.", @click="open",
|
.select-upload-gcode
|
||||||
: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
|
select(title="Select previously uploaded GCode programs.",
|
||||||
.fa.fa-upload
|
v-model="state.selected",@change="load", :disabled="!is_ready",
|
||||||
|
style="max-width:100%;height:40px;border-radius:5px")
|
||||||
form.gcode-file-input.file-upload
|
option(v-for="file in state.files", :value="file") {{file}}
|
||||||
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}}
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
form.gcode-file-input.file-upload
|
||||||
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
|
accept=".nc,.ngc,.gcode,.gc")
|
||||||
br
|
br
|
||||||
gcode-viewer
|
gcode-viewer
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros(0)",
|
button.submit-macros(title="Save Macros",@click="saveMacros(0)",
|
||||||
@@ -69,18 +70,19 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-color(type="color",id="macros-color-1",value="#ffffff")
|
input.input-color(type="color",id="macros-color-1",value="#ffffff")
|
||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-1")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-1")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
select(title="Select previously uploaded GCode programs.",
|
.select-upload-gcode
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
style="max-width:100%;height:40px;border-radius:5px")
|
v-model="state.selected", @change="load", :disabled="!is_ready",
|
||||||
option(v-for="file in state.files", :value="file") {{file}}
|
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",
|
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
|
: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
|
.fa.fa-upload
|
||||||
|
|
||||||
form.gcode-file-input.file-upload
|
form.gcode-file-input.file-upload
|
||||||
input(type="file", @change="upload", :disabled="!is_ready",
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
accept=".nc,.ngc,.gcode,.gc")
|
accept=".nc,.ngc,.gcode,.gc")
|
||||||
br
|
br
|
||||||
gcode-viewer
|
gcode-viewer
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros(1)",
|
button.submit-macros(title="Save Macros",@click="saveMacros(1)",
|
||||||
@@ -95,18 +97,19 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-color(type="color",id="macros-color-2",value="#ffffff")
|
input.input-color(type="color",id="macros-color-2",value="#ffffff")
|
||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-2")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-2")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
select(title="Select previously uploaded GCode programs.",
|
.select-upload-gcode
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
style="max-width:100%;height:40px;border-radius:5px")
|
v-model="state.selected", @change="load", :disabled="!is_ready",
|
||||||
option(v-for="file in state.files", :value="file") {{file}}
|
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",
|
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
|
: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
|
.fa.fa-upload
|
||||||
|
|
||||||
form.gcode-file-input.file-upload
|
form.gcode-file-input.file-upload
|
||||||
input(type="file", @change="upload", :disabled="!is_ready",
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
accept=".nc,.ngc,.gcode,.gc")
|
accept=".nc,.ngc,.gcode,.gc")
|
||||||
br
|
br
|
||||||
gcode-viewer
|
gcode-viewer
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros(2)",
|
button.submit-macros(title="Save Macros",@click="saveMacros(2)",
|
||||||
@@ -121,18 +124,19 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-color(type="color",id="macros-color-3",value="#ffffff")
|
input.input-color(type="color",id="macros-color-3",value="#ffffff")
|
||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-3")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-3")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
select(title="Select previously uploaded GCode programs.",
|
.select-upload-gcode
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
style="max-width:100%;height:40px;border-radius:5px")
|
v-model="state.selected", @change="load", :disabled="!is_ready",
|
||||||
option(v-for="file in state.files", :value="file") {{file}}
|
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",
|
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
|
: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
|
.fa.fa-upload
|
||||||
|
|
||||||
form.gcode-file-input.file-upload
|
form.gcode-file-input.file-upload
|
||||||
input(type="file", @change="upload", :disabled="!is_ready",
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
accept=".nc,.ngc,.gcode,.gc")
|
accept=".nc,.ngc,.gcode,.gc")
|
||||||
br
|
br
|
||||||
gcode-viewer
|
gcode-viewer
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros(3)",
|
button.submit-macros(title="Save Macros",@click="saveMacros(3)",
|
||||||
@@ -147,18 +151,19 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-color(type="color",id="macros-color-4",value="#ffffff")
|
input.input-color(type="color",id="macros-color-4",value="#ffffff")
|
||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-4")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-4")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
select(title="Select previously uploaded GCode programs.",
|
.select-upload-gcode
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
style="max-width:100%;height:40px;border-radius:5px")
|
v-model="state.selected", @change="load", :disabled="!is_ready",
|
||||||
option(v-for="file in state.files", :value="file") {{file}}
|
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",
|
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
|
: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
|
.fa.fa-upload
|
||||||
|
|
||||||
form.gcode-file-input.file-upload
|
form.gcode-file-input.file-upload
|
||||||
input(type="file", @change="upload", :disabled="!is_ready",
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
accept=".nc,.ngc,.gcode,.gc")
|
accept=".nc,.ngc,.gcode,.gc")
|
||||||
br
|
br
|
||||||
gcode-viewer
|
gcode-viewer
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros(4)",
|
button.submit-macros(title="Save Macros",@click="saveMacros(4)",
|
||||||
@@ -173,18 +178,19 @@ script#macros-template(type="text/x-template")
|
|||||||
input.input-color(type="color",id="macros-color-5",value="#ffffff")
|
input.input-color(type="color",id="macros-color-5",value="#ffffff")
|
||||||
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-5")
|
input.input-name(type="text",minlength='1',maxlength='15',id="macros-name-5")
|
||||||
p.title G-Code
|
p.title G-Code
|
||||||
select(title="Select previously uploaded GCode programs.",
|
.select-upload-gcode
|
||||||
v-model="state.selected", @change="load", :disabled="!is_ready",
|
select(title="Select previously uploaded GCode programs.",
|
||||||
style="max-width:100%;height:40px;border-radius:5px")
|
v-model="state.selected", @change="load", :disabled="!is_ready",
|
||||||
option(v-for="file in state.files", :value="file") {{file}}
|
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",
|
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
|
: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
|
.fa.fa-upload
|
||||||
|
|
||||||
form.gcode-file-input.file-upload
|
form.gcode-file-input.file-upload
|
||||||
input(type="file", @change="upload", :disabled="!is_ready",
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
accept=".nc,.ngc,.gcode,.gc")
|
accept=".nc,.ngc,.gcode,.gc")
|
||||||
br
|
br
|
||||||
gcode-viewer
|
gcode-viewer
|
||||||
button.submit-macros(title="Save Macros",@click="saveMacros(5)",
|
button.submit-macros(title="Save Macros",@click="saveMacros(5)",
|
||||||
|
|||||||
Reference in New Issue
Block a user