Re-add the "send more files" option to file drop
This commit is contained in:
parent
b30f50b96d
commit
47373c447b
3 changed files with 17 additions and 0 deletions
|
|
@ -66,6 +66,10 @@ $hiliteColor: #4642f1;
|
|||
height: $large-button-height;
|
||||
border-radius: $large-button-height * 0.5;
|
||||
}
|
||||
|
||||
&.text {
|
||||
background-color: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
.back-button {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@
|
|||
}}<v-progress-circular indeterminate size="18" width="2" color="#4642F1"></v-progress-circular></v-btn>
|
||||
</div>
|
||||
<div v-else-if="status == mainStatuses.SENT" class="file-drop-sent-input-container">
|
||||
<v-btn class="text" @click.stop="reset">{{ $t("file_mode.send_more_files") }}</v-btn>
|
||||
<v-btn class="close" @click.stop="close">{{ $t("file_mode.close") }}</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue