diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json index fea61ac..40f5aee 100644 --- a/src/assets/translations/en.json +++ b/src/assets/translations/en.json @@ -66,8 +66,9 @@ "file_prefix": "File: ", "edited": "(edited)", "download_progress": "{percentage}% downloaded", - "upload_file_too_large": "Maximum file size of ({configFormattedUploadSize}) exceeded. File is too large to upload!", - "upload_exceeded_file_limit": "File: ({exceededFile}) ({formattedUploadSize}) exceeds maximum limit.", + "preparing_to_upload": "Preparing to upload...", + "upload_file_too_large": "File is too large to upload!", + "upload_exceeded_file_limit": "Maximum file size of ({configFormattedUploadSize}) exceeded. ", "upload_progress": "Uploaded {count}", "upload_progress_with_total": "Uploaded {count} of {total}", "user_changed_room_history": "{user} made room history {type}", diff --git a/src/components/Chat.vue b/src/components/Chat.vue index c6bd3dd..e67d54e 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -205,61 +205,72 @@
- {{ $t('message.send_attachements_dialog_title') }} - - - - - - -
{{ currentSendError }}
+ + {{ this.$t("message.preparing_to_upload")}} + + +
@@ -1179,6 +1190,7 @@ export default { * Handle picked attachment */ handlePickedAttachment(event) { + this.currentFileInputs = [] const uploadedFiles = Object.values(event.target.files); this.$matrix.matrixClient.getMediaConfig().then((config) => { @@ -1187,8 +1199,8 @@ export default { uploadedFiles.every(file => { if (configUploadSize && file.size > configUploadSize) { - this.currentSendError = this.$t("message.upload_file_too_large", { configFormattedUploadSize }); - this.currentSendErrorExceededFile = this.$t("message.upload_exceeded_file_limit", { exceededFile: file.name, formattedUploadSize: this.formatBytes(file.size) }); + this.currentSendError = this.$t("message.upload_file_too_large"); + this.currentSendErrorExceededFile = this.$t("message.upload_exceeded_file_limit", { configFormattedUploadSize }); this.currentSendShowSendButton = false; return false; } else {