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 @@
-
+
{{ inReplyToSender }}
@@ -10,7 +10,7 @@
-
+
@@ -22,7 +22,7 @@
block
{{ redactedBySomeoneElse(event) ? $t('message.incoming_message_deleted_text') : $t('message.outgoing_message_deleted_text')}}
-
+
{{ $t('message.edited') }}
diff --git a/src/components/messages/MessageOutgoingThread.vue b/src/components/messages/MessageOutgoingThread.vue
index 9f8737c..2736f5a 100644
--- a/src/components/messages/MessageOutgoingThread.vue
+++ b/src/components/messages/MessageOutgoingThread.vue
@@ -1,5 +1,5 @@
-
+
{{ inReplyToSender }}
@@ -11,7 +11,7 @@
-
+
@@ -23,7 +23,7 @@
block
{{ redactedBySomeoneElse(event) ? $t('message.incoming_message_deleted_text') : $t('message.outgoing_message_deleted_text')}}
-
+
{{ $t('message.edited') }}
diff --git a/src/components/messages/channel/SwipeableThumbnailsView.vue b/src/components/messages/channel/SwipeableThumbnailsView.vue
index bd9a5dd..fe1dcc6 100644
--- a/src/components/messages/channel/SwipeableThumbnailsView.vue
+++ b/src/components/messages/channel/SwipeableThumbnailsView.vue
@@ -1,13 +1,13 @@
-
-
+
+
-
+
-
@@ -16,6 +16,7 @@
diff --git a/src/plugins/utils.js b/src/plugins/utils.js
index a641c47..56368b3 100644
--- a/src/plugins/utils.js
+++ b/src/plugins/utils.js
@@ -914,6 +914,7 @@ class Util {
}
download(matrixClient, event) {
+ console.log("DOWNLOAD");
this
.getAttachment(matrixClient, event)
.then((url) => {
@@ -924,6 +925,7 @@ class Util {
// PDFs are shown inline, not downloaded
link.download = event.getContent().body || this.$t("fallbacks.download_name");
}
+ console.log("LINK", link);
document.body.appendChild(link);
link.click();
setTimeout(function () {