fix: refine chat document and image layout,and some translation issues (#2177)

* fix: Rrefine english words

* fix: refine chat document and image layout,and some translation issues

---------

Co-authored-by: wangdan-fit2cloud <dan.wang@fit2cloud.com>
This commit is contained in:
shaohuzhang1 2025-02-09 13:36:08 +08:00 committed by GitHub
parent 96c79f44ed
commit 761b686214
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 38 additions and 43 deletions

View File

@ -19,10 +19,10 @@
v-for="(item, index) in uploadDocumentList" v-for="(item, index) in uploadDocumentList"
:key="index" :key="index"
:xs="24" :xs="24"
:sm="12" :sm="props.type === 'debug-ai-chat' ? 24 : 12"
:md="12" :md="props.type === 'debug-ai-chat' ? 24 : 12"
:lg="12" :lg="props.type === 'debug-ai-chat' ? 24 : 12"
:xl="12" :xl="props.type === 'debug-ai-chat' ? 24 : 12"
class="mb-8" class="mb-8"
> >
<el-card <el-card
@ -54,10 +54,10 @@
<el-col <el-col
:xs="24" :xs="24"
:sm="12" :sm="props.type === 'debug-ai-chat' ? 24 : 12"
:md="12" :md="props.type === 'debug-ai-chat' ? 24 : 12"
:lg="12" :lg="props.type === 'debug-ai-chat' ? 24 : 12"
:xl="12" :xl="props.type === 'debug-ai-chat' ? 24 : 12"
class="mb-8" class="mb-8"
v-for="(item, index) in uploadAudioList" v-for="(item, index) in uploadAudioList"
:key="index" :key="index"
@ -85,10 +85,10 @@
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<div class="flex"> <el-space wrap>
<template v-for="(item, index) in uploadImageList" :key="index"> <template v-for="(item, index) in uploadImageList" :key="index">
<div <div
class="file cursor border border-r-4 mr-8" class="file cursor border border-r-4"
v-if="item.url" v-if="item.url"
@mouseenter.stop="mouseenter(item)" @mouseenter.stop="mouseenter(item)"
@mouseleave.stop="mouseleave()" @mouseleave.stop="mouseleave()"
@ -111,7 +111,7 @@
/> />
</div> </div>
</template> </template>
</div> </el-space>
</div> </div>
</el-scrollbar> </el-scrollbar>
<div class="flex"> <div class="flex">

View File

@ -21,10 +21,10 @@
v-for="(item, index) in document_list" v-for="(item, index) in document_list"
:key="index" :key="index"
:xs="24" :xs="24"
:sm="12" :sm="props.type === 'debug-ai-chat' ? 24 : 12"
:md="12" :md="props.type === 'debug-ai-chat' ? 24 : 12"
:lg="12" :lg="props.type === 'debug-ai-chat' ? 24 : 12"
:xl="12" :xl="props.type === 'debug-ai-chat' ? 24 : 12"
class="mb-8 w-full" class="mb-8 w-full"
> >
<el-card shadow="never" style="--el-card-padding: 8px" class="download-file cursor"> <el-card shadow="never" style="--el-card-padding: 8px" class="download-file cursor">
@ -45,17 +45,8 @@
</el-row> </el-row>
</div> </div>
<div class="mb-8" v-if="image_list.length"> <div class="mb-8" v-if="image_list.length">
<el-row :gutter="10"> <el-space wrap>
<el-col <template v-for="(item, index) in image_list" :key="index">
v-for="(item, index) in image_list"
:key="index"
:xs="24"
:sm="12"
:md="12"
:lg="12"
:xl="12"
class="mb-8"
>
<div class="file cursor border-r-4" v-if="item.url"> <div class="file cursor border-r-4" v-if="item.url">
<el-image <el-image
:src="item.url" :src="item.url"
@ -70,8 +61,8 @@
class="border-r-4" class="border-r-4"
/> />
</div> </div>
</el-col> </template>
</el-row> </el-space>
</div> </div>
<div class="mb-8" v-if="audio_list.length"> <div class="mb-8" v-if="audio_list.length">
<el-row :gutter="10"> <el-row :gutter="10">
@ -79,10 +70,10 @@
v-for="(item, index) in audio_list" v-for="(item, index) in audio_list"
:key="index" :key="index"
:xs="24" :xs="24"
:sm="12" :sm="props.type === 'debug-ai-chat' ? 24 : 12"
:md="12" :md="props.type === 'debug-ai-chat' ? 24 : 12"
:lg="12" :lg="props.type === 'debug-ai-chat' ? 24 : 12"
:xl="12" :xl="props.type === 'debug-ai-chat' ? 24 : 12"
class="mb-8" class="mb-8"
> >
<div class="file cursor border-r-4" v-if="item.url"> <div class="file cursor border-r-4" v-if="item.url">
@ -109,6 +100,7 @@ import { onMounted, computed } from 'vue'
const props = defineProps<{ const props = defineProps<{
application: any application: any
chatRecord: chatType chatRecord: chatType
type: 'log' | 'ai-chat' | 'debug-ai-chat'
}>() }>()
const document_list = computed(() => { const document_list = computed(() => {
if (props.chatRecord?.upload_meta) { if (props.chatRecord?.upload_meta) {
@ -163,7 +155,6 @@ onMounted(() => {})
} }
} }
.download-button { .download-button {
display: none; display: none;
} }

View File

@ -18,7 +18,11 @@
<template v-for="(item, index) in chatList" :key="index"> <template v-for="(item, index) in chatList" :key="index">
<!-- 问题 --> <!-- 问题 -->
<QuestionContent :application="applicationDetails" :chat-record="item"></QuestionContent> <QuestionContent
:type="type"
:application="applicationDetails"
:chat-record="item"
></QuestionContent>
<!-- 回答 --> <!-- 回答 -->
<AnswerContent <AnswerContent
:application="applicationDetails" :application="applicationDetails"

View File

@ -54,7 +54,7 @@ const changeLang = (lang: string) => {
} }
const currentLanguage = computed(() => { const currentLanguage = computed(() => {
return langList.value?.filter((v: any) => v.value === user.getLanguage())[0].label return langList.value?.filter((v: any) => v.value === user.getLanguage())?.[0]?.label
}) })
const fileURL = computed(() => { const fileURL = computed(() => {

View File

@ -1,8 +1,8 @@
export default { export default {
noHistory: 'No Chat History', noHistory: 'No Chat History',
createChat: 'New Conversation', createChat: 'New Chat',
history: 'Chat History', history: 'Chat History',
only20history: 'Showing only the last 20 conversations', only20history: 'Showing only the last 20 chats',
question_count: 'Questions', question_count: 'Questions',
exportRecords: 'Export Chat History', exportRecords: 'Export Chat History',
chatId: 'Chat ID', chatId: 'Chat ID',
@ -68,7 +68,7 @@ export default {
searchContent: 'Search Query', searchContent: 'Search Query',
searchResult: 'Search Results', searchResult: 'Search Results',
conditionResult: 'Condition Evaluation', conditionResult: 'Condition Evaluation',
currentChat: 'Current Conversation', currentChat: 'Current Chat',
answer: 'AI Response', answer: 'AI Response',
replyContent: 'Reply Content', replyContent: 'Reply Content',
textContent: 'Text Content', textContent: 'Text Content',

View File

@ -93,17 +93,17 @@ export default {
}, },
voiceInput: { voiceInput: {
label: 'Voice input', label: 'Voice Input',
placeholder: 'Please select a speech recognition model', placeholder: 'Please select a speech recognition model',
requiredMessage: 'Please select a speech input model', requiredMessage: 'Please select a speech input model',
autoSend: 'Automatic sending' autoSend: 'Automatic Sending'
}, },
voicePlay: { voicePlay: {
label: 'Voice playback', label: 'Voice Playback',
placeholder: 'Please select a speech synthesis model', placeholder: 'Please select a speech synthesis model',
requiredMessage: 'Please select a speech playback model', requiredMessage: 'Please select a speech playback model',
autoPlay: 'Automatic playback', autoPlay: 'Automatic Playback',
browser: 'Browser playback (free)', browser: 'Browser Playback (free)',
tts: 'TTS Model', tts: 'TTS Model',
listeningTest: 'Preview' listeningTest: 'Preview'
}, },