diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss
index 8d7132a..5781f12 100644
--- a/src/assets/css/chat.scss
+++ b/src/assets/css/chat.scss
@@ -1531,4 +1531,18 @@ body {
right: 20px;
bottom: 20px;
position: absolute;
+}
+
+.download-all-button {
+ font-family: "Inter", sans-serif;
+ font-weight: 700;
+ font-size: 11.54 * $chat-text-size;
+ line-height: 140%;
+ color: white !important;
+ background-color: #4642f1 !important;
+ border-radius: $small-button-height / 2;
+ min-height: 0;
+ height: $small-button-height !important;
+ margin-top: $chat-standard-padding-xs;
+ margin-bottom: $chat-standard-padding-xs;
}
\ No newline at end of file
diff --git a/src/assets/translations/en.json b/src/assets/translations/en.json
index cd12ab2..fea61ac 100644
--- a/src/assets/translations/en.json
+++ b/src/assets/translations/en.json
@@ -104,7 +104,8 @@
"file": "File",
"files": "Files",
"images": "Images",
- "send_attachements_dialog_title": "Do you want to send following attachments ?"
+ "send_attachements_dialog_title": "Do you want to send following attachments ?",
+ "download_all": "Download all"
},
"room": {
"invitations": "You have no invitations | You have 1 invitation | You have {count} invitations",
diff --git a/src/components/Chat.vue b/src/components/Chat.vue
index 7cbb7c3..7b8f8dc 100644
--- a/src/components/Chat.vue
+++ b/src/components/Chat.vue
@@ -1419,24 +1419,7 @@ export default {
},
download(event) {
- util
- .getAttachment(this.$matrix.matrixClient, event)
- .then((url) => {
- const link = document.createElement("a");
- link.href = url;
- link.target = "_blank";
- link.download = event.getContent().body || this.$t("fallbacks.download_name");
- document.body.appendChild(link);
- link.click();
-
- setTimeout(function () {
- document.body.removeChild(link);
- URL.revokeObjectURL(url);
- }, 200);
- })
- .catch((err) => {
- console.log("Failed to fetch attachment: ", err);
- });
+ util.download(this.$matrix.matrixClient, event);
},
cancelEditReply() {
diff --git a/src/components/messages/MessageIncomingThread.vue b/src/components/messages/MessageIncomingThread.vue
index 0ff7129..89b4ecb 100644
--- a/src/components/messages/MessageIncomingThread.vue
+++ b/src/components/messages/MessageIncomingThread.vue
@@ -5,10 +5,14 @@