Frontend: Hide message if no files were selected for upload

This commit is contained in:
Michael Mayer 2019-06-13 17:18:06 -07:00
parent 18f1b4bf4a
commit 2ae35b0d8b

View file

@ -87,10 +87,6 @@
this.$refs.upload.click();
},
upload() {
this.$alert.info("Uploading photos...");
Event.publish("ajax.start");
this.selected = this.$refs.upload.files;
this.busy = true;
this.total = this.selected.length;
@ -98,6 +94,14 @@
this.completed = 0;
this.uploads = [];
if(!this.total) {
return
}
this.$alert.info("Uploading photos...");
Event.publish("ajax.start");
async function performUpload(ctx) {
for (let i = 0; i < ctx.selected.length; i++) {
ctx.current = i + 1;