diff --git a/client/components/cards/ItemUploadCard.vue b/client/components/cards/ItemUploadCard.vue index adbf3adbe..40836b8e4 100644 --- a/client/components/cards/ItemUploadCard.vue +++ b/client/components/cards/ItemUploadCard.vue @@ -62,24 +62,7 @@
- -
- - {{ nonInteractionLabel }} - -
- -
-
- - {{ uploadProgressText }} - -
-
-
-
-
-
+
@@ -108,11 +91,7 @@ export default { isUploading: false, uploadFailed: false, uploadSuccess: false, - isFetchingMetadata: false, - uploadProgress: { - loaded: 0, - total: 0 - } + isFetchingMetadata: false } }, computed: { @@ -137,15 +116,6 @@ export default { } else if (this.isFetchingMetadata) { return this.$strings.LabelFetchingMetadata } - }, - uploadProgressPercent() { - if (this.uploadProgress.total === 0) return 0 - return Math.min(100, Math.round((this.uploadProgress.loaded / this.uploadProgress.total) * 100)) - }, - uploadProgressText() { - const loaded = this.$bytesPretty(this.uploadProgress.loaded) - const total = this.$bytesPretty(this.uploadProgress.total) - return `${this.uploadProgressPercent}% (${loaded} / ${total})` } }, methods: { @@ -153,21 +123,6 @@ export default { this.isUploading = status === 'uploading' this.uploadFailed = status === 'failed' this.uploadSuccess = status === 'success' - - if (status !== 'uploading') { - this.uploadProgress = { - loaded: 0, - total: 0 - } - } - }, - setUploadProgress(progress) { - if (this.isUploading && progress) { - this.uploadProgress = { - loaded: progress.loaded || 0, - total: progress.total || 0 - } - } }, titleUpdated() { this.error = '' diff --git a/client/components/ui/LoadingIndicator.vue b/client/components/ui/LoadingIndicator.vue index 3b4b6e049..d984bf35e 100644 --- a/client/components/ui/LoadingIndicator.vue +++ b/client/components/ui/LoadingIndicator.vue @@ -1,5 +1,5 @@ @@ -25,9 +23,6 @@ export default { computed: { message() { return this.text || this.$strings.MessagePleaseWait - }, - hasSlotContent() { - return this.$slots.default && this.$slots.default.length > 0 } } } diff --git a/client/pages/upload/index.vue b/client/pages/upload/index.vue index adc21ff90..73ebef9c6 100644 --- a/client/pages/upload/index.vue +++ b/client/pages/upload/index.vue @@ -297,15 +297,6 @@ export default { ref.setUploadStatus(status) } }, - updateItemCardProgress(index, progress) { - var ref = this.$refs[`itemCard-${index}`] - if (ref && ref.length) ref = ref[0] - if (!ref) { - console.error('Book card ref not found', index, this.$refs) - } else { - ref.setUploadProgress(progress) - } - }, async uploadItem(item) { var form = new FormData() form.set('title', item.title) @@ -321,20 +312,8 @@ export default { form.set(`${index++}`, file) }) - const config = { - onUploadProgress: (progressEvent) => { - if (progressEvent.lengthComputable) { - const progress = { - loaded: progressEvent.loaded, - total: progressEvent.total - } - this.updateItemCardProgress(item.index, progress) - } - } - } - return this.$axios - .$post('/api/upload', form, config) + .$post('/api/upload', form) .then(() => true) .catch((error) => { console.error('Failed to upload item', error)