message while uploading folder

This commit is contained in:
sanjayk03-dev
2024-04-09 11:21:43 +05:30
parent 39304d3241
commit d1764d4f09
2 changed files with 12 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ module.exports = {
macrosLoading: false,
show_gcodes: false,
GCodeNotFound: false,
uploadFolder: false,
};
},
@@ -523,6 +524,7 @@ module.exports = {
},
upload_folder: async function (e) {
this.uploadFolder = true;
const files = e.target.files || e.dataTransfer.files;
if (!files.length) {
return;
@@ -577,9 +579,13 @@ module.exports = {
this.save_config(this.config);
};
reader.onerror = error => alert("Error uploading file: ", error);
reader.onerror = error => {
alert("Error uploading file: ", error);
this.uploadFolder = false;
};
reader.readAsText(file, "utf-8");
}
this.uploadFolder = false;
},
delete_current: async function () {

View File

@@ -274,6 +274,11 @@ script#control-view-template(type="text/x-template")
@click="optional_pause", v-if="false", style="height:100px;width:100px;font-weight:normal")
.fa.fa-stop-circle-o
message(:show.sync="uploadFolder")
h3(slot="header") Uploading
p(slot="body") Uploading files is currently in progress. Do not close window.
div(slot="footer")
button.pure-button(title="Execute one program step.", @click="step",
:disabled="(!is_ready && !is_holding) || !state.selected",
v-if="false", style="height:100px;width:100px;font-weight:normal")