icon fix, opening fix

This commit is contained in:
sanjayk03-dev
2024-03-26 23:36:58 +05:30
parent aaec4f1197
commit 63421aeeec
2 changed files with 9 additions and 5 deletions

View File

@@ -349,10 +349,14 @@ module.exports = {
this.mdi = this.history[index];
},
open: function () {
open_file: function () {
utils.clickFileInput("gcode-file-input");
},
open_folder: function () {
utils.clickFileInput("gcode-folder-input");
},
upload_file: async function (e) {
const files = e.target.files || e.dataTransfer.files;
if (!files.length) {
@@ -396,7 +400,7 @@ module.exports = {
});
},
upload_folder: function (e) {
upload_folder: async function (e) {
console.log(e);
const folderInput = document.getElementById('folderInput');
console.log(folderInput);

View File

@@ -268,7 +268,7 @@ script#control-view-template(type="text/x-template")
v-if="false", style="height:100px;width:100px;font-weight:normal")
.fa.fa-step-forward
button.pure-button(title="Upload a new GCode program.", @click="open",
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
@@ -276,9 +276,9 @@ script#control-view-template(type="text/x-template")
input(type="file", @change="upload_file", :disabled="!is_ready",
accept=".nc,.ngc,.gcode,.gc")
button.pure-button(title="Upload a new GCode folder.", @click="open",
button.pure-button(title="Upload a new GCode folder.", @click="open_folder",
:disabled="!is_ready",style="height:100px;width:100px;font-weight:normal")
.fa.fa-folder-plus
.fa.fa-folder
form.gcode-folder-input.file-upload
input#folderInput(type="file", @change="upload_folder", :disabled="!is_ready",