Comment download
@@ -18,16 +18,20 @@ export default {
},
methods: {
download: function (event) {
+ // If we are not on a listing, download the current file.
if (this.req.kind !== 'listing') {
api.download(null, this.$route.path)
return
}
+ // If we are on a listing and there is one element selected,
+ // download it.
if (this.selectedCount === 1) {
api.download(null, this.req.items[this.selected[0]].url)
return
}
+ // Otherwise show the prompt to choose the formt of the download.
this.$store.commit('showHover', 'download')
}
}
