From 47373c447bb4ca9b21fbd8c0519f1a789161eb0d Mon Sep 17 00:00:00 2001 From: N-Pex Date: Fri, 17 Oct 2025 17:06:00 +0200 Subject: [PATCH] Re-add the "send more files" option to file drop --- src/assets/css/sendattachments.scss | 4 ++++ src/components/Chat.vue | 5 +++++ src/components/file_mode/SendAttachmentsLayout.vue | 8 ++++++++ 3 files changed, 17 insertions(+) diff --git a/src/assets/css/sendattachments.scss b/src/assets/css/sendattachments.scss index 8243dfa..256db11 100644 --- a/src/assets/css/sendattachments.scss +++ b/src/assets/css/sendattachments.scss @@ -66,6 +66,10 @@ $hiliteColor: #4642f1; height: $large-button-height; border-radius: $large-button-height * 0.5; } + + &.text { + background-color: transparent !important; + } } .back-button { diff --git a/src/components/Chat.vue b/src/components/Chat.vue index d5f0021..4cd4e04 100644 --- a/src/components/Chat.vue +++ b/src/components/Chat.vue @@ -35,6 +35,7 @@ v-on:add-files="(files) => addAttachments(files)" :batch="uploadBatch" v-on:close="closeFileMode" + v-on:reset="resetFileMode" :fileModeMode="true" :defaultRootMessageText="$t('file_mode.files')" /> @@ -1975,6 +1976,10 @@ export default { } }, + resetFileMode() { + this.uploadBatch = this.$matrix.attachmentManager.createUpload(this.room); + }, + closeFileMode() { this.uploadBatch?.cancel(); this.uploadBatch = undefined; diff --git a/src/components/file_mode/SendAttachmentsLayout.vue b/src/components/file_mode/SendAttachmentsLayout.vue index 5c7d2f3..9374014 100644 --- a/src/components/file_mode/SendAttachmentsLayout.vue +++ b/src/components/file_mode/SendAttachmentsLayout.vue @@ -126,6 +126,7 @@ }}
+ {{ $t("file_mode.send_more_files") }} {{ $t("file_mode.close") }}
@@ -264,6 +265,13 @@ export default defineComponent({ } this.batch.addFiles(files); }, + reset() { + this.sendingAttachments = []; + this.status = this.mainStatuses.SELECTING; + this.messageInput = ""; + this.currentItemIndex = 0; + this.$emit('reset'); + }, close() { this.batch.cancel(); this.status = this.mainStatuses.SELECTING;