fix: update logout behavior to redirect to login page and clean up formatting in ChatHistoryDrawer.vue and ResetPasswordDrawer.vue
This commit is contained in:
parent
ee8412f34d
commit
9cce06b9f1
@ -138,7 +138,7 @@ const openResetPassword = () => {
|
|||||||
|
|
||||||
const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => {
|
const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => {
|
||||||
chatAPI.resetCurrentPassword(param).then(() => {
|
chatAPI.resetCurrentPassword(param).then(() => {
|
||||||
logout()
|
router.push({name: 'login'})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -102,11 +102,9 @@ function resetPassword() {
|
|||||||
resetPasswordFormRef.value?.validate().then(() => {
|
resetPasswordFormRef.value?.validate().then(() => {
|
||||||
chatAPI.resetCurrentPassword(resetPasswordForm.value).then(() => {
|
chatAPI.resetCurrentPassword(resetPasswordForm.value).then(() => {
|
||||||
MsgSuccess(t('common.modifySuccess'))
|
MsgSuccess(t('common.modifySuccess'))
|
||||||
chatUser.logout().then(() => {
|
|
||||||
router.push({name: 'login'})
|
router.push({name: 'login'})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@ -73,7 +73,9 @@
|
|||||||
style="padding-top: 8px; padding-bottom: 8px"
|
style="padding-top: 8px; padding-bottom: 8px"
|
||||||
@click="openResetPassword"
|
@click="openResetPassword"
|
||||||
>
|
>
|
||||||
<el-icon><Lock /></el-icon>
|
<el-icon>
|
||||||
|
<Lock/>
|
||||||
|
</el-icon>
|
||||||
{{ $t('views.login.resetPassword') }}
|
{{ $t('views.login.resetPassword') }}
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item
|
<el-dropdown-item
|
||||||
@ -221,9 +223,12 @@ import { useRouter } from 'vue-router'
|
|||||||
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
import ResetPassword from '@/layout/layout-header/avatar/ResetPassword.vue'
|
||||||
import {t} from '@/locales'
|
import {t} from '@/locales'
|
||||||
import type {ResetCurrentUserPasswordRequest} from '@/api/type/user'
|
import type {ResetCurrentUserPasswordRequest} from '@/api/type/user'
|
||||||
import ExecutionDetailContent from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
|
import ExecutionDetailContent
|
||||||
import ParagraphSourceContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
|
from '@/components/ai-chat/component/knowledge-source-component/ExecutionDetailContent.vue'
|
||||||
import ParagraphDocumentContent from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
|
import ParagraphSourceContent
|
||||||
|
from '@/components/ai-chat/component/knowledge-source-component/ParagraphSourceContent.vue'
|
||||||
|
import ParagraphDocumentContent
|
||||||
|
from '@/components/ai-chat/component/knowledge-source-component/ParagraphDocumentContent.vue'
|
||||||
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
import HistoryPanel from '@/views/chat/component/HistoryPanel.vue'
|
||||||
import {cloneDeep} from 'lodash'
|
import {cloneDeep} from 'lodash'
|
||||||
|
|
||||||
@ -256,7 +261,7 @@ const openResetPassword = () => {
|
|||||||
|
|
||||||
const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => {
|
const handleResetPassword = (param: ResetCurrentUserPasswordRequest) => {
|
||||||
chatAPI.resetCurrentPassword(param).then(() => {
|
chatAPI.resetCurrentPassword(param).then(() => {
|
||||||
logout()
|
router.push({name: 'login'})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -284,7 +289,8 @@ const applicationDetail = computed({
|
|||||||
get: () => {
|
get: () => {
|
||||||
return props.application_profile
|
return props.application_profile
|
||||||
},
|
},
|
||||||
set: (v) => {},
|
set: (v) => {
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
const chatLogData = ref<any[]>([])
|
const chatLogData = ref<any[]>([])
|
||||||
@ -305,6 +311,7 @@ function refreshFieldTitle(chatId: string, abstract: string) {
|
|||||||
find.abstract = abstract
|
find.abstract = abstract
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function deleteLog(row: any) {
|
function deleteLog(row: any) {
|
||||||
chatAPI.deleteChat(row.id, left_loading).then(() => {
|
chatAPI.deleteChat(row.id, left_loading).then(() => {
|
||||||
if (currentChatId.value === row.id) {
|
if (currentChatId.value === row.id) {
|
||||||
@ -466,6 +473,7 @@ const rightPanelType = ref('')
|
|||||||
const rightPanelLoading = ref(false)
|
const rightPanelLoading = ref(false)
|
||||||
const executionDetail = ref<any[]>([])
|
const executionDetail = ref<any[]>([])
|
||||||
const rightPanelDetail = ref<any>()
|
const rightPanelDetail = ref<any>()
|
||||||
|
|
||||||
async function openExecutionDetail(row: any) {
|
async function openExecutionDetail(row: any) {
|
||||||
rightPanelSize.value = 400
|
rightPanelSize.value = 400
|
||||||
rightPanelTitle.value = t('chat.executionDetails.title')
|
rightPanelTitle.value = t('chat.executionDetails.title')
|
||||||
@ -534,10 +542,12 @@ function closeExecutionDetail() {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
.execution-detail-content {
|
.execution-detail-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
height: calc(100% - 63px);
|
height: calc(100% - 63px);
|
||||||
|
|
||||||
.execution-details {
|
.execution-details {
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
}
|
}
|
||||||
@ -550,6 +560,7 @@ function closeExecutionDetail() {
|
|||||||
max-width: 80%;
|
max-width: 80%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media only screen and (max-width: 1000px) {
|
@media only screen and (max-width: 1000px) {
|
||||||
.chat-width {
|
.chat-width {
|
||||||
max-width: 100% !important;
|
max-width: 100% !important;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user