From f926de4f9177cf61d3bf376cde11c8aa6887a432 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Thu, 10 Jul 2025 17:09:19 +0800 Subject: [PATCH] fix: user language --- ui/src/api/application/application.ts | 9 ++-- ui/src/api/chat/chat.ts | 9 ++-- .../component/answer-content/index.vue | 10 +++- .../chat-input-operate/TouchChat.vue | 19 ++++--- .../component/chat-input-operate/index.vue | 27 ++++++++-- .../component/operation-button/index.vue | 4 +- ui/src/components/ai-chat/index.vue | 52 +++++++++++-------- ui/src/components/app-icon/AppIcon.vue | 4 +- .../components/app-icon/icons/application.ts | 2 +- ui/src/components/app-icon/index.ts | 33 ++++++++++++ .../components/workspace-dropdown/index.vue | 4 +- .../lang/zh-CN/views/application-workflow.ts | 2 +- ui/src/locales/useLocale.ts | 44 ++++++++-------- ui/src/request/chat/index.ts | 8 +-- ui/src/stores/modules/application.ts | 21 -------- ui/src/stores/modules/chat-user.ts | 13 ++--- ui/src/stores/modules/login.ts | 22 ++------ ui/src/stores/modules/user.ts | 7 +-- ui/src/styles/app.scss | 1 - .../component/DropdownMenu.vue | 3 +- .../component/PublishHistory.vue | 3 +- ui/src/views/application-workflow/index.vue | 9 ++-- ui/src/views/chat/index.vue | 10 ++-- .../chat/user-login/auth/password/index.vue | 50 ------------------ .../user-login/components/LoginLayout.vue | 10 ++-- ui/src/views/chat/user-login/index.vue | 3 +- .../system-setting/theme/LoginPreview.vue | 3 +- 27 files changed, 178 insertions(+), 204 deletions(-) delete mode 100644 ui/src/views/chat/user-login/auth/password/index.vue diff --git a/ui/src/api/application/application.ts b/ui/src/api/application/application.ts index ca83a1b83..df5491403 100644 --- a/ui/src/api/application/application.ts +++ b/ui/src/api/application/application.ts @@ -301,7 +301,7 @@ const getMcpTools: ( * 上传文件 * @param 参数 file:file */ -const uploadFile: ( +const postUploadFile: ( file: any, sourceId: string, resourceType: @@ -313,12 +313,13 @@ const uploadFile: ( | 'TEMPORARY_30_MINUTE' | 'TEMPORARY_120_MINUTE' | 'TEMPORARY_1_DAY', -) => Promise> = (file, sourceId, resourceType) => { + loading?: Ref, +) => Promise> = (file, sourceId, resourceType, loading) => { const fd = new FormData() fd.append('file', file) fd.append('source_id', sourceId) fd.append('source_type', resourceType) - return post(`/oss/file`, fd) + return post(`/oss/file`, fd, undefined, loading) } export default { @@ -346,5 +347,5 @@ export default { postTextToSpeech, speechToText, getMcpTools, - uploadFile, + postUploadFile, } diff --git a/ui/src/api/chat/chat.ts b/ui/src/api/chat/chat.ts index c75eb8f9d..53241da51 100644 --- a/ui/src/api/chat/chat.ts +++ b/ui/src/api/chat/chat.ts @@ -297,7 +297,7 @@ const modifyChat: (chat_id: string, data: any, loading?: Ref) => Promis * @param resourceType 资源类型 * @returns */ -const uploadFile: ( +const postUploadFile: ( file: any, sourceId: string, resourceType: @@ -309,12 +309,13 @@ const uploadFile: ( | 'TEMPORARY_30_MINUTE' | 'TEMPORARY_120_MINUTE' | 'TEMPORARY_1_DAY', -) => Promise> = (file, sourceId, sourceType) => { + loading?: Ref, +) => Promise> = (file, sourceId, sourceType, loading) => { const fd = new FormData() fd.append('file', file) fd.append('source_id', sourceId) fd.append('source_type', sourceType) - return post(`/oss/file`, fd) + return post(`/oss/file`, fd, undefined, loading) } export default { open, @@ -344,5 +345,5 @@ export default { speechToText, deleteChat, modifyChat, - uploadFile, + postUploadFile, } diff --git a/ui/src/components/ai-chat/component/answer-content/index.vue b/ui/src/components/ai-chat/component/answer-content/index.vue index f5022898e..f544cfd29 100644 --- a/ui/src/components/ai-chat/component/answer-content/index.vue +++ b/ui/src/components/ai-chat/component/answer-content/index.vue @@ -73,11 +73,11 @@ diff --git a/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue b/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue index 0130b23cd..bd437a46c 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/TouchChat.vue @@ -14,7 +14,11 @@ - +

00:{{ props.time < 10 ? `0${props.time}` : props.time }} props.start, @@ -90,7 +94,7 @@ watch( dialogVisible.value = false isTouching.value = false } - } + }, ) function onTouchStart(event: any) { @@ -127,7 +131,6 @@ function onTouchEnd() { left: 50%; /* 水平居中 */ transform: translateX(-50%); width: 92%; - background: #ffffff; border: 1px solid #ffffff; box-shadow: 0px 6px 24px 0px rgba(31, 35, 41, 0.08); z-index: 999; diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 4147153c9..cc4785603 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -1,10 +1,16 @@ -