From 9cce06b9f15e9e3df1858ecf59706274b7163ebf Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Tue, 15 Jul 2025 11:32:36 +0800 Subject: [PATCH] fix: update logout behavior to redirect to login page and clean up formatting in ChatHistoryDrawer.vue and ResetPasswordDrawer.vue --- .../embed/component/ChatHistoryDrawer.vue | 2 +- .../mobile/component/ResetPasswordDrawer.vue | 4 +- ui/src/views/chat/pc/index.vue | 173 ++++++++++-------- 3 files changed, 94 insertions(+), 85 deletions(-) diff --git a/ui/src/views/chat/embed/component/ChatHistoryDrawer.vue b/ui/src/views/chat/embed/component/ChatHistoryDrawer.vue index 05f7d2d1a..7d2c81b17 100644 --- a/ui/src/views/chat/embed/component/ChatHistoryDrawer.vue +++ b/ui/src/views/chat/embed/component/ChatHistoryDrawer.vue @@ -138,7 +138,7 @@ const openResetPassword = () => { const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => { chatAPI.resetCurrentPassword(param).then(() => { - logout() + router.push({name: 'login'}) }) } diff --git a/ui/src/views/chat/mobile/component/ResetPasswordDrawer.vue b/ui/src/views/chat/mobile/component/ResetPasswordDrawer.vue index df7d4cebf..2eb0a2565 100644 --- a/ui/src/views/chat/mobile/component/ResetPasswordDrawer.vue +++ b/ui/src/views/chat/mobile/component/ResetPasswordDrawer.vue @@ -102,9 +102,7 @@ function resetPassword() { resetPasswordFormRef.value?.validate().then(() => { chatAPI.resetCurrentPassword(resetPasswordForm.value).then(() => { MsgSuccess(t('common.modifySuccess')) - chatUser.logout().then(() => { - router.push({ name: 'login' }) - }) + router.push({name: 'login'}) }) }) } diff --git a/ui/src/views/chat/pc/index.vue b/ui/src/views/chat/pc/index.vue index fe0811e85..74316998a 100644 --- a/ui/src/views/chat/pc/index.vue +++ b/ui/src/views/chat/pc/index.vue @@ -40,16 +40,16 @@ chatUser.chat_profile.authentication_type === 'password' " > - +
- + {{ - chatUser.chatUserProfile?.nick_name - }} + chatUser.chatUserProfile?.nick_name + }}
- -
- - -
-
-
-

{{ rightPanelTitle }}

-   -
+
+ + +
+
+
+
+

{{ rightPanelTitle }}

+   +
- + - - + + - + - + -
-
-
- - -
+
+ + + +
+
@@ -209,27 +211,30 @@