refactor(chat):新手指南改为学习之窗优化
This commit is contained in:
1 parent
0bb1946b7e
commit
e23da3f170
1 file changed
+6
-7
@@ -718,13 +718,13 @@ const loadAgentGuides = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const showGuideSidebar = ref(false);
|
const showGuideSidebar = ref(true);
|
||||||
|
|
||||||
const openGuideModal = () => {
|
const openGuideModal = () => {
|
||||||
if (agentGuides.value.length > 0) {
|
if (agentGuides.value.length > 0) {
|
||||||
activeGuideId.value = agentGuides.value[0].id;
|
activeGuideId.value = agentGuides.value[0].id;
|
||||||
showGuideModal.value = true;
|
showGuideModal.value = true;
|
||||||
showGuideSidebar.value = false; // 默认收起
|
showGuideSidebar.value = true; // 默认展开
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const showDeleteConfirmDialog = ref(false);
|
const showDeleteConfirmDialog = ref(false);
|
||||||
@@ -2689,7 +2689,7 @@ const showChatRating = ref(false);
|
|||||||
class="flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-brand-700 bg-brand-100 border border-brand-300 rounded-lg hover:bg-brand-200 hover:border-brand-400 transition-all shadow-sm"
|
class="flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-brand-700 bg-brand-100 border border-brand-300 rounded-lg hover:bg-brand-200 hover:border-brand-400 transition-all shadow-sm"
|
||||||
>
|
>
|
||||||
<BookOpen class="w-4 h-4" />
|
<BookOpen class="w-4 h-4" />
|
||||||
新手指南
|
学习之窗
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<span v-if="currentAgent?.name === '人事规章'" class="block text-[11px] text-muted mt-1 truncate cursor-help">
|
<span v-if="currentAgent?.name === '人事规章'" class="block text-[11px] text-muted mt-1 truncate cursor-help">
|
||||||
@@ -2827,7 +2827,7 @@ const showChatRating = ref(false);
|
|||||||
class="flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-brand-700 bg-brand-100 border border-brand-300 rounded-lg hover:bg-brand-200 hover:border-brand-400 transition-all shadow-sm ml-1"
|
class="flex items-center gap-1.5 px-3 py-1.5 text-xs font-bold text-brand-700 bg-brand-100 border border-brand-300 rounded-lg hover:bg-brand-200 hover:border-brand-400 transition-all shadow-sm ml-1"
|
||||||
>
|
>
|
||||||
<BookOpen class="w-4 h-4" />
|
<BookOpen class="w-4 h-4" />
|
||||||
新手指南
|
学习之窗
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center gap-1">
|
<div class="flex items-center gap-1">
|
||||||
@@ -3738,13 +3738,13 @@ const showChatRating = ref(false);
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Teleport to="body">
|
<Teleport to="body">
|
||||||
<!-- 新手指南 Modal -->
|
<!-- 学习之窗 Modal -->
|
||||||
<div v-if="showGuideModal" class="fixed inset-0 z-[9999] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm">
|
<div v-if="showGuideModal" class="fixed inset-0 z-[9999] flex items-center justify-center p-4 bg-black/50 backdrop-blur-sm">
|
||||||
<div class="bg-surface rounded-2xl shadow-xl w-full max-w-4xl overflow-hidden flex flex-col h-[85vh]">
|
<div class="bg-surface rounded-2xl shadow-xl w-full max-w-4xl overflow-hidden flex flex-col h-[85vh]">
|
||||||
<div class="px-6 py-4 border-b border-default flex justify-between items-center bg-surface shrink-0">
|
<div class="px-6 py-4 border-b border-default flex justify-between items-center bg-surface shrink-0">
|
||||||
<h3 class="text-lg font-bold text-primary flex items-center gap-2">
|
<h3 class="text-lg font-bold text-primary flex items-center gap-2">
|
||||||
<BookOpen class="w-5 h-5 text-brand-600" />
|
<BookOpen class="w-5 h-5 text-brand-600" />
|
||||||
{{ currentAgent?.name }} - 新手指南
|
{{ currentAgent?.name }} - 学习之窗
|
||||||
</h3>
|
</h3>
|
||||||
<div class="flex items-center gap-3">
|
<div class="flex items-center gap-3">
|
||||||
<button @click="showGuideSidebar = !showGuideSidebar" class="flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-brand-600 hover:text-brand-700 hover:bg-brand-50 rounded-lg transition-colors border border-transparent hover:border-brand-100">
|
<button @click="showGuideSidebar = !showGuideSidebar" class="flex items-center gap-1.5 px-3 py-1.5 text-sm font-medium text-brand-600 hover:text-brand-700 hover:bg-brand-50 rounded-lg transition-colors border border-transparent hover:border-brand-100">
|
||||||
@@ -3786,7 +3786,6 @@ const showChatRating = ref(false);
|
|||||||
:key="'video-' + activeGuide.id"
|
:key="'video-' + activeGuide.id"
|
||||||
:src="activeGuide.file_url || activeGuide.file_path"
|
:src="activeGuide.file_url || activeGuide.file_path"
|
||||||
controls
|
controls
|
||||||
autoplay
|
|
||||||
class="w-full h-full object-contain bg-black"
|
class="w-full h-full object-contain bg-black"
|
||||||
></video>
|
></video>
|
||||||
<iframe
|
<iframe
|
||||||
|
|||||||
Reference in new issue
Block a user