移动端历史会话优化重构
This commit is contained in:
1 parent
fd70a2f519
commit
d012099013
3 files changed
+30
-31
No files matched your search
@@ -1628,14 +1628,6 @@ onMounted(async () => {
|
||||
<Bot class="h-4 w-4" />
|
||||
<span>返回聊天</span>
|
||||
</button>
|
||||
<button
|
||||
@click="activeSidebarItem = 'history'; if (chatHistories.length === 0) loadChatHistories()"
|
||||
class="flex w-full items-center gap-3 rounded-2xl px-4 py-3 text-left text-[15px] font-medium transition-all"
|
||||
:class="activeSidebarItem === 'history' ? 'bg-brand-50 text-brand-700 shadow-sm' : 'text-slate-600 hover:bg-slate-50 hover:text-slate-900'"
|
||||
>
|
||||
<Bot class="h-4 w-4" />
|
||||
<span>历史会话</span>
|
||||
</button>
|
||||
<button
|
||||
v-if="currentUser?.role === 'admin'"
|
||||
@click="openAdminPanel"
|
||||
@@ -1657,8 +1649,8 @@ onMounted(async () => {
|
||||
</aside>
|
||||
|
||||
<section class="min-w-0 space-y-6 bg-gray-50 px-4 py-6 md:px-6 md:py-8 lg:px-8" :class="isMobile ? 'pb-20' : ''">
|
||||
<template v-if="activeSidebarItem === 'history'">
|
||||
<div class="space-y-3">
|
||||
<template v-if="activeSidebarItem === 'history'">
|
||||
<div class="space-y-3">
|
||||
<div v-if="isLoadingHistories" class="flex justify-center py-20">
|
||||
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-brand-600"></div>
|
||||
</div>
|
||||
@@ -1670,7 +1662,7 @@ onMounted(async () => {
|
||||
<button
|
||||
v-for="item in chatHistories"
|
||||
:key="item.id"
|
||||
@click="router.push(`/chat/${item.agent_id || 16}`)"
|
||||
@click="router.push(`/chat/${item.agent_id || 16}?conversation_id=${item.conversation_id}`)"
|
||||
class="w-full rounded-2xl border border-slate-200 bg-white p-3 text-left transition-colors hover:border-brand-300 hover:bg-brand-50/50 dark:border-slate-700 dark:bg-slate-800 dark:hover:border-brand-600 mb-2"
|
||||
:class="isMobile ? 'p-2.5 rounded-xl' : ''"
|
||||
>
|
||||
@@ -1693,7 +1685,7 @@ onMounted(async () => {
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template v-if="activeSidebarItem === 'profile'">
|
||||
<template v-else-if="activeSidebarItem === 'profile'">
|
||||
<div v-if="isProfileLoading" class="flex justify-center py-20">
|
||||
<div class="animate-spin rounded-full h-8 w-8 border-b-2 border-brand-600"></div>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user