diff --git a/src/assets/css/sendattachments.scss b/src/assets/css/sendattachments.scss index 46f8394..256db11 100644 --- a/src/assets/css/sendattachments.scss +++ b/src/assets/css/sendattachments.scss @@ -38,6 +38,14 @@ $hiliteColor: #4642f1; display: flex; align-items: center; justify-content: center; + &.file-drop { + flex: 0 0 100px; + background-color: transparent; + flex-direction: column; + .file-drop-title { + margin-top: 8px; + } + } } .v-btn { @@ -58,6 +66,10 @@ $hiliteColor: #4642f1; height: $large-button-height; border-radius: $large-button-height * 0.5; } + + &.text { + background-color: transparent !important; + } } .back-button { @@ -119,6 +131,25 @@ $hiliteColor: #4642f1; } } + .file-drop-choose-files { + background-color: $backgroundSection; + border-radius: 19px; + padding: 16px 18px; + flex: 0 0 40%; + margin: 20px; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + .file-format-info { + font-family: "Inter", sans-serif; + font-size: 11 * $chat-text-size; + line-height: 117%; + color: rgba(white, 0.6); + margin-top: 5px; + } + } + .file-drop-thumbnail-container, .gallery-thumbnail-container { width: 100%; 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 ed26912..9374014 100644 --- a/src/components/file_mode/SendAttachmentsLayout.vue +++ b/src/components/file_mode/SendAttachmentsLayout.vue @@ -1,29 +1,32 @@