diff --git a/web/src/components/ChatBox.vue b/web/src/components/ChatBox.vue index 13dfb347..1becf7f7 100644 --- a/web/src/components/ChatBox.vue +++ b/web/src/components/ChatBox.vue @@ -19,7 +19,7 @@
-
+
Total size:

- + {{ totalSize }} - + ({{ fileList.length }})
@@ -87,10 +87,19 @@
- +
+ + + +
@@ -183,7 +192,7 @@ export default { // console.log(this.fileList) }, sendMessageEvent(msg) { - this.fileList=[] + this.fileList = [] this.$emit('messageSentEvent', msg) }, @@ -208,6 +217,10 @@ export default { }, stopGenerating() { this.$emit('stopGenerating') + }, + addFiles(event){ + + this.fileList = this.fileList.concat([...event.target.files]) } }, watch: { @@ -223,11 +236,11 @@ export default { if (val.length > 0) { for (let i = 0; i < val.length; i++) { total = total + parseInt(val[i].size) - + } } - this.totalSize = filesize(total,false) - + this.totalSize = filesize(total, false) + }, deep: true }, diff --git a/web/src/views/DiscussionsView.vue b/web/src/views/DiscussionsView.vue index ee505272..205b5db1 100644 --- a/web/src/views/DiscussionsView.vue +++ b/web/src/views/DiscussionsView.vue @@ -1073,7 +1073,7 @@ export default { //this.fileList = files - this.$refs.chatBox.fileList = files + this.$refs.chatBox.fileList = this.$refs.chatBox.fileList.concat(files) this.isDragOverChat = false },