Skip to content

Commit 85bd9aa

Browse files
committed
fix: bug fix
1 parent 3575307 commit 85bd9aa

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

frontend/src/components/layout/Person.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ const changeLanguage = (lang: string) => {
5252
const param = {
5353
language: lang,
5454
}
55-
userApi.language(param)
55+
userApi.language(param).then(() => {
56+
window.location.reload()
57+
})
5658
}
5759
5860
const openPwd = () => {

frontend/src/i18n/en.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"AI Model Configuration": "AI Model Configuration"
77
},
88
"common": {
9+
"proceed_with_caution": "Deletion is irreversible, so proceed with caution.",
10+
"sales_in_2024": "Delete conversation: {msg}?",
911
"limited_to_30": "The number of data tables is limited to 30",
1012
"enter_your_password": "Please enter your password",
1113
"your_account_email_address": "Please enter your account/email address",
@@ -521,4 +523,4 @@
521523
"back_community": "Restore to Community Edition",
522524
"confirm_tips": "Are you sure to restore to Community Edition?"
523525
}
524-
}
526+
}

frontend/src/i18n/zh-CN.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"AI Model Configuration": "模型配置"
77
},
88
"common": {
9+
"proceed_with_caution": "删除后无法恢复,请谨慎操作。",
10+
"sales_in_2024": "是否删除对话:{msg}?",
911
"limited_to_30": "数据表数量限制30",
1012
"enter_your_password": "请输入密码",
1113
"your_account_email_address": "请输入账号/邮箱",

frontend/src/views/chat/ChatList.vue

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,21 @@ function handleCommand(command: string | number | object, chat: Chat) {
112112
dialogVisiblePassword.value = true
113113
break
114114
case 'delete':
115-
ElMessageBox.confirm('This action will permanently delete the chat. Continue?', 'Warning', {
116-
confirmButtonText: 'OK',
117-
cancelButtonText: 'Cancel',
118-
type: 'warning',
115+
ElMessageBox.confirm(t('common.sales_in_2024', { msg: chat.brief }), {
116+
confirmButtonType: 'danger',
117+
tip: t('common.proceed_with_caution'),
118+
confirmButtonText: t('dashboard.delete'),
119+
cancelButtonText: t('common.cancel'),
120+
customClass: 'confirm-no_icon',
121+
autofocus: false,
119122
}).then(() => {
120123
_loading.value = true
121124
chatApi
122125
.deleteChat(chat.id)
123-
.then((res) => {
126+
.then(() => {
124127
ElMessage({
125128
type: 'success',
126-
message: res,
129+
message: t('dashboard.delete_success'),
127130
})
128131
emits('chatDeleted', chat.id)
129132
})

0 commit comments

Comments
 (0)