From 4d3e08d782dc1f800cc3b6062ea2873d72e828ad Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 24 Jul 2025 17:50:47 +0800 Subject: [PATCH 1/8] fix: bug fix --- frontend/src/views/system/embedded/index.vue | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/frontend/src/views/system/embedded/index.vue b/frontend/src/views/system/embedded/index.vue index 013e28c7..9355b83c 100644 --- a/frontend/src/views/system/embedded/index.vue +++ b/frontend/src/views/system/embedded/index.vue @@ -252,14 +252,7 @@ const dsRules = { message: t('datasource.please_enter') + t('common.empty') + t('user.workspace'), trigger: 'change', }, - ], - private_list: [ - { - required: true, - message: t('datasource.please_enter') + t('common.empty') + t('user.workspace'), - trigger: 'change', - }, - ], + ] } const urlRules = { @@ -934,11 +927,7 @@ const saveHandler = () => { align-items: center; .open-the_query { color: #ff8800; - &::before { - color: var(--ed-color-danger); - content: '*'; - margin-left: 2px; - } + margin-left: 4px; } } From 075004625b7c3fc51673409eae06bb9f65bf2934 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 24 Jul 2025 17:54:03 +0800 Subject: [PATCH 2/8] fix: bug fix --- frontend/src/views/system/embedded/DsCard.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/system/embedded/DsCard.vue b/frontend/src/views/system/embedded/DsCard.vue index a2845ce7..41604e35 100644 --- a/frontend/src/views/system/embedded/DsCard.vue +++ b/frontend/src/views/system/embedded/DsCard.vue @@ -46,7 +46,7 @@ const handlePublic = () => {
-
{{ name }}
+
{{ name }}
{{ typeName }}
{{ @@ -106,6 +106,7 @@ const handlePublic = () => { font-weight: 500; font-size: 16px; line-height: 24px; + max-width: 250px; } .type { font-weight: 400; From 08e2ede1f3d640d357ba481b29f4b4a9a2f27cc6 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 24 Jul 2025 17:59:23 +0800 Subject: [PATCH 3/8] fix: bug fix --- frontend/src/views/system/permission/index.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/views/system/permission/index.vue b/frontend/src/views/system/permission/index.vue index 9d44b12d..360ad230 100644 --- a/frontend/src/views/system/permission/index.vue +++ b/frontend/src/views/system/permission/index.vue @@ -498,7 +498,7 @@ const columnRules = { table_id: [ { required: true, - message: t('datasource.Please_select') + t('common.empty') + t('permission.set_rule'), + message: t('datasource.Please_select') + t('common.empty') + t('permission.data_table'), trigger: 'change', }, ], @@ -850,6 +850,7 @@ const columnRules = { .ed-empty_200 { padding-top: 200px; padding-bottom: 0; + height: auto; } .tool-left { display: flex; From 81d863709b6fba58752a923e5e715846fdca3d7f Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 24 Jul 2025 18:07:32 +0800 Subject: [PATCH 4/8] fix: bug fix --- frontend/src/components/layout/Person.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/layout/Person.vue b/frontend/src/components/layout/Person.vue index a1333db3..223724ca 100644 --- a/frontend/src/components/layout/Person.vue +++ b/frontend/src/components/layout/Person.vue @@ -75,7 +75,7 @@ const logout = () => {
@@ -184,6 +184,7 @@ const logout = () => { font-size: 14px; line-height: 22px; margin-left: 8px; + max-width: 85px; } &::after { From 1624a0084147ed15ce1ccaeb8b57a62ee25b0f93 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Thu, 24 Jul 2025 18:28:27 +0800 Subject: [PATCH 5/8] fix: bug fix --- frontend/src/i18n/en.json | 6 +- frontend/src/i18n/zh-CN.json | 6 +- frontend/src/views/chat/ChatList.vue | 123 +++++++++++++++++------- frontend/src/views/system/user/User.vue | 2 +- 4 files changed, 98 insertions(+), 39 deletions(-) diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 383cddca..7f801fd3 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -114,7 +114,9 @@ "today": "Today", "week": "This Week", "earlier": "Earlier", - "no_time": "No Time" + "no_time": "No Time", + "rename_conversation_title": "Rename conversation title", + "conversation_title": "Conversation title" }, "ds": { "title": "Data Source", @@ -502,4 +504,4 @@ "back_community": "Restore to Community Edition", "confirm_tips": "Are you sure to restore to Community Edition?" } -} +} \ No newline at end of file diff --git a/frontend/src/i18n/zh-CN.json b/frontend/src/i18n/zh-CN.json index ca01a0fb..6b70d46a 100644 --- a/frontend/src/i18n/zh-CN.json +++ b/frontend/src/i18n/zh-CN.json @@ -117,7 +117,9 @@ "today": "今天", "week": "7天内", "earlier": "更早以前", - "no_time": "没有时间" + "no_time": "没有时间", + "rename_conversation_title": "重命名对话标题", + "conversation_title": "对话标题" }, "ds": { "title": "数据源", @@ -514,4 +516,4 @@ "back_community": "还原至社区版", "confirm_tips": "确定还原至社区版?" } -} +} \ No newline at end of file diff --git a/frontend/src/views/chat/ChatList.vue b/frontend/src/views/chat/ChatList.vue index 73780aae..adcd408c 100644 --- a/frontend/src/views/chat/ChatList.vue +++ b/frontend/src/views/chat/ChatList.vue @@ -4,7 +4,7 @@ import icon_expand_down_filled from '@/assets/embedded/icon_expand-down_filled.s import rename from '@/assets/svg/icon_rename_outlined.svg' import delIcon from '@/assets/svg/icon_delete.svg' import { type Chat, chatApi } from '@/api/chat.ts' -import { computed, ref } from 'vue' +import { computed, nextTick, reactive, ref } from 'vue' import dayjs from 'dayjs' import { getDate } from '@/utils/utils.ts' import { groupBy } from 'lodash-es' @@ -107,39 +107,9 @@ function handleCommand(command: string | number | object, chat: Chat) { if (chat && chat.id !== undefined) { switch (command) { case 'rename': - ElMessageBox.prompt('Please enter new brief', 'Rename', { - confirmButtonText: 'OK', - cancelButtonText: 'Cancel', - customStyle: { 'padding-left': 'unset', padding: 'var(--ed-messagebox-padding-primary)' }, - inputValue: chat.brief, - inputValidator: (value: string) => { - if (!value) return false - if (value.trim().length == 0) return false - return true - }, - }).then(({ value }) => { - _loading.value = true - chatApi - .renameChat(chat.id, value) - .then((res) => { - ElMessage({ - type: 'success', - message: 'Successfully renamed chat', - }) - emits('chatRenamed', { id: chat.id, brief: res }) - }) - .catch((err) => { - ElMessage({ - type: 'error', - message: err.message, - }) - console.error(err) - }) - .finally(() => { - _loading.value = false - }) - }) - + password.id = chat.id + password.name = chat.brief as string + dialogVisiblePassword.value = true break case 'delete': ElMessageBox.confirm('This action will permanently delete the chat. Continue?', 'Warning', { @@ -173,6 +143,56 @@ function handleCommand(command: string | number | object, chat: Chat) { } } } + +const passwordRef = ref() +const dialogVisiblePassword = ref(false) +const password = reactive({ + name: '', + id: 0, +}) + +const passwordRules = { + name: [ + { + required: true, + message: t('datasource.please_enter') + t('common.empty') + t('qa.conversation_title'), + trigger: 'blur', + }, + ], +} + +const handleClosePassword = () => { + passwordRef.value.clearValidate() + dialogVisiblePassword.value = false + password.id = 0 + password.name = '' +} +const handleConfirmPassword = () => { + passwordRef.value.validate((res: any) => { + if (res) { + chatApi + .renameChat(password.id, password.name) + .then((res) => { + ElMessage({ + type: 'success', + message: t('common.save_success'), + }) + emits('chatRenamed', { id: password.id, brief: res }) + handleClosePassword() + }) + .catch((err) => { + ElMessage({ + type: 'error', + message: err.message, + }) + console.error(err) + }) + .finally(() => { + _loading.value = false + }) + } + }) +}