Skip to content

Commit

Permalink
🎨 ui - show zip download only if there was files zipped
Browse files Browse the repository at this point in the history
  • Loading branch information
ikenfin committed Feb 21, 2019
1 parent 24ae45c commit 30e3fa7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/foc_csv/src/components/exporter/Export.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<p>{{ $t('Check your download links:') }}</p>
<div class="btn-group">
<a :href="csvFileUrl" target="_blank" class="btn btn-primary">{{ $t('CSV file') }}</a>
<a v-if="imagesZipUrl" target="_blank" :href="imagesZipUrl" class="btn btn-default">{{ $t('Images ZIP file') }}</a>
<a v-if="collectedImages > 0" target="_blank" :href="imagesZipUrl" class="btn btn-default">{{ $t('Images ZIP file') }}</a>
</div>
</div>
</div>
Expand Down Expand Up @@ -103,6 +103,7 @@ export default {
return {
msg: 'Export',
errors: 0,
collectedImages: 0,
imagesZipUrl: null,
csvFileUrl: null
}
Expand Down Expand Up @@ -153,6 +154,8 @@ export default {
this.current = position
this.collectedImages += (parseInt(response.data.message.collected_images) || 0);
if (this.current < this.total) {
this.submitExportPart(callbackUrl, response.data.message)
}
Expand All @@ -171,6 +174,7 @@ export default {
this.errors = 0
this.csvFileUrl = null
this.imagesZipUrl = null
this.collectedImages = 0
try {
let response = await this.$api.exporter.submitData(data.profile)
Expand Down

0 comments on commit 30e3fa7

Please sign in to comment.