Skip to content

Commit 678122f

Browse files
committed
feat: update video file extensions and clean up code formatting in file upload settings
1 parent b36e8f5 commit 678122f

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ const upload = ref()
403403
404404
const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP']
405405
const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV']
406-
const videoExtensions: any = ['MP4', 'MOV', 'AVI']
406+
const videoExtensions: any = ['MP4', 'AVI', 'MKV', 'MOV', 'FLV', 'WMV']
407407
const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A']
408408
const otherExtensions = ref(['PPT', 'DOC'])
409409

ui/src/components/ai-chat/index.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,8 @@ function chatMessage(chat?: any, problem?: string, re_chat?: boolean, other_para
523523
: [],
524524
audio_list:
525525
other_params_data && other_params_data.audio_list ? other_params_data.audio_list : [],
526+
video_list:
527+
other_params_data && other_params_data.video_list ? other_params_data.video_list : [],
526528
other_list:
527529
other_params_data && other_params_data.other_list ? other_params_data.other_list : [],
528530
},

ui/src/workflow/nodes/base-node/component/FileUploadSettingDialog.vue

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
>
5252
<div class="flex-between">
5353
<div class="flex align-center">
54-
<img class="mr-12" src="@/assets/workflow/icon_file-doc.svg" alt="" />
54+
<img class="mr-12" src="@/assets/workflow/icon_file-doc.svg" alt=""/>
5555
<div>
5656
<p class="line-height-22 mt-4">
5757
{{ $t('common.fileUpload.document') }}
@@ -81,7 +81,7 @@
8181
>
8282
<div class="flex-between">
8383
<div class="flex align-center">
84-
<img class="mr-12" src="@/assets/workflow/icon_file-image.svg" alt="" />
84+
<img class="mr-12" src="@/assets/workflow/icon_file-image.svg" alt=""/>
8585
<div>
8686
<p class="line-height-22 mt-4">
8787
{{ $t('common.fileUpload.image') }}
@@ -96,7 +96,7 @@
9696
<p>{{ imageExtensions.join('、') }}</p>
9797
</div>
9898
</div>
99-
<el-checkbox v-model="form_data.image" @change="form_data.image = !form_data.image" />
99+
<el-checkbox v-model="form_data.image" @change="form_data.image = !form_data.image"/>
100100
</div>
101101
</el-card>
102102

@@ -109,7 +109,7 @@
109109
>
110110
<div class="flex-between">
111111
<div class="flex align-center">
112-
<img class="mr-12" src="@/assets/workflow/icon_file-audio.svg" alt="" />
112+
<img class="mr-12" src="@/assets/workflow/icon_file-audio.svg" alt=""/>
113113
<div>
114114
<p class="line-height-22 mt-4">
115115
{{ $t('common.fileUpload.audio') }}
@@ -124,10 +124,10 @@
124124
<p>{{ audioExtensions.join('、') }}</p>
125125
</div>
126126
</div>
127-
<el-checkbox v-model="form_data.audio" @change="form_data.audio = !form_data.audio" />
127+
<el-checkbox v-model="form_data.audio" @change="form_data.audio = !form_data.audio"/>
128128
</div>
129129
</el-card>
130-
<el-card
130+
<el-card
131131
shadow="hover"
132132
class="card-checkbox cursor w-full mb-8"
133133
:class="form_data.video ? 'active' : ''"
@@ -136,7 +136,7 @@
136136
>
137137
<div class="flex-between">
138138
<div class="flex align-center">
139-
<img class="mr-12" width="32" src="@/assets/workflow/icon_file-video.svg" alt="" />
139+
<img class="mr-12" width="32" src="@/assets/workflow/icon_file-video.svg" alt=""/>
140140
<div>
141141
<p class="line-height-22 mt-4">
142142
{{ $t('common.fileUpload.video') }}
@@ -151,7 +151,7 @@
151151
<p>{{ videoExtensions.join('、') }}</p>
152152
</div>
153153
</div>
154-
<el-checkbox v-model="form_data.video" @change="form_data.video = !form_data.video" />
154+
<el-checkbox v-model="form_data.video" @change="form_data.video = !form_data.video"/>
155155
</div>
156156
</el-card>
157157
<el-card
@@ -163,7 +163,7 @@
163163
>
164164
<div class="flex-between">
165165
<div class="flex align-center">
166-
<img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt="" />
166+
<img class="mr-12" :width="32" src="@/assets/fileType/unknown-icon.svg" alt=""/>
167167
<div>
168168
<p class="line-height-22 mt-4">
169169
{{ $t('common.fileUpload.other') }}
@@ -206,7 +206,7 @@
206206
</el-space>
207207
</div>
208208
</div>
209-
<el-checkbox v-model="form_data.other" @change="form_data.other = !form_data.other" />
209+
<el-checkbox v-model="form_data.other" @change="form_data.other = !form_data.other"/>
210210
</div>
211211
</el-card>
212212
</el-form-item>
@@ -223,11 +223,11 @@
223223
</template>
224224

225225
<script setup lang="ts">
226-
import { nextTick, ref } from 'vue'
227-
import type { InputInstance } from 'element-plus'
228-
import { cloneDeep } from 'lodash'
229-
import { MsgWarning } from '@/utils/message'
230-
import { t } from '@/locales'
226+
import {nextTick, ref} from 'vue'
227+
import type {InputInstance} from 'element-plus'
228+
import {cloneDeep} from 'lodash'
229+
import {MsgWarning} from '@/utils/message'
230+
import {t} from '@/locales'
231231
232232
const emit = defineEmits(['refresh'])
233233
const props = defineProps<{ nodeModel: any }>()
@@ -242,7 +242,7 @@ const InputRef = ref<InputInstance>()
242242
const documentExtensions = ['TXT', 'MD', 'DOCX', 'HTML', 'CSV', 'XLSX', 'XLS', 'PDF']
243243
const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF']
244244
const audioExtensions = ['MP3', 'WAV', 'OGG', 'ACC', 'M4A']
245-
const videoExtensions: any = ['MP4', 'MOV', 'AVI']
245+
const videoExtensions: any = ['MP4', 'AVI', 'MKV', 'MOV', 'FLV', 'WMV']
246246
247247
const form_data = ref({
248248
maxFiles: 3,
@@ -258,7 +258,7 @@ const form_data = ref({
258258
function open(data: any) {
259259
dialogVisible.value = true
260260
nextTick(() => {
261-
form_data.value = { ...form_data.value, ...data }
261+
form_data.value = {...form_data.value, ...data}
262262
})
263263
}
264264

0 commit comments

Comments
 (0)