diff --git a/src/assets/css/channel.scss b/src/assets/css/channel.scss index b987e56..48644fb 100644 --- a/src/assets/css/channel.scss +++ b/src/assets/css/channel.scss @@ -69,6 +69,8 @@ margin-top: 24px; .message { color: black !important; + display: flex; + flex-direction: column; } } .bubble { @@ -172,6 +174,7 @@ .swipeable-thumbnails-view { margin-left: -15px; margin-right: -15px; + order: 2; .thumbnail-item.file-item { margin: 15px; width: auto; diff --git a/src/components/Chat.vue b/src/components/Chat.vue index 6b9ee74..d25d233 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -292,6 +292,8 @@ +
{{ currentSendError }}
@@ -299,7 +301,7 @@ {{ $t("menu.cancel") }} - {{ $t("menu.send") }}
@@ -465,6 +467,7 @@ export default { currentSendShowSendButton: true, currentSendError: null, currentSendErrorExceededFile: null, + attachmentCaption: undefined, showEmojiPicker: false, selectedEvent: null, editedEvent: null, @@ -593,6 +596,12 @@ export default { isCurrentFileInputsAnArray() { return Array.isArray(this.currentFileInputs) }, + showAttachmentCaptionInput() { + // IFF we are sending one PDF, add option to set caption. + const imageFiles = this.imageFiles || []; + const otherFiles = this.nonImageFiles || []; + return imageFiles.length == 0 && otherFiles.length == 1 && (otherFiles[0].type === "application/pdf" || (otherFiles[0].name || "").endsWith(".pdf")); + }, currentFileInputsDialog: { get() { return this.isCurrentFileInputsAnArray @@ -1547,6 +1556,7 @@ export default { const promise = this.sendAttachments(text, this.currentFileInputs); promise.then(() => { this.currentFileInputs = null; + this.attachmentCaption = undefined; this.sendingStatus = this.sendStatuses.INITIAL; }) .catch((err) => { @@ -1565,6 +1575,7 @@ export default { this.$refs.attachment.value = null; this.cancelSendAttachments(); this.currentFileInputs = null; + this.attachmentCaption = undefined; this.currentSendError = null; this.currentSendErrorExceededFile = null; this.sendingStatus = this.sendStatuses.INITIAL; diff --git a/src/components/messages/MessageIncomingThread.vue b/src/components/messages/MessageIncomingThread.vue index 9b0888b..62e15c0 100644 --- a/src/components/messages/MessageIncomingThread.vue +++ b/src/components/messages/MessageIncomingThread.vue @@ -1,5 +1,5 @@