message while uploading folder
This commit is contained in:
@@ -50,6 +50,7 @@ module.exports = {
|
|||||||
macrosLoading: false,
|
macrosLoading: false,
|
||||||
show_gcodes: false,
|
show_gcodes: false,
|
||||||
GCodeNotFound: false,
|
GCodeNotFound: false,
|
||||||
|
uploadFolder: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -523,6 +524,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
upload_folder: async function (e) {
|
upload_folder: async function (e) {
|
||||||
|
this.uploadFolder = true;
|
||||||
const files = e.target.files || e.dataTransfer.files;
|
const files = e.target.files || e.dataTransfer.files;
|
||||||
if (!files.length) {
|
if (!files.length) {
|
||||||
return;
|
return;
|
||||||
@@ -577,9 +579,13 @@ module.exports = {
|
|||||||
this.save_config(this.config);
|
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");
|
reader.readAsText(file, "utf-8");
|
||||||
}
|
}
|
||||||
|
this.uploadFolder = false;
|
||||||
},
|
},
|
||||||
|
|
||||||
delete_current: async function () {
|
delete_current: async function () {
|
||||||
|
|||||||
@@ -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")
|
@click="optional_pause", v-if="false", style="height:100px;width:100px;font-weight:normal")
|
||||||
.fa.fa-stop-circle-o
|
.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",
|
button.pure-button(title="Execute one program step.", @click="step",
|
||||||
:disabled="(!is_ready && !is_holding) || !state.selected",
|
:disabled="(!is_ready && !is_holding) || !state.selected",
|
||||||
v-if="false", style="height:100px;width:100px;font-weight:normal")
|
v-if="false", style="height:100px;width:100px;font-weight:normal")
|
||||||
|
|||||||
Reference in New Issue
Block a user