历史回复

This commit is contained in:
2026-03-18 20:33:28 +08:00
parent fad174824a
commit 1a45638f32

View File

@@ -167,14 +167,14 @@
<div v-else> <div v-else>
<div v-for="(session, index) in repliedSessions" :key="index" <div v-for="(session, index) in repliedSessions" :key="index"
class="px-3 py-1.5 text-xs text-gray-700 hover:bg-gray-50 border-b border-gray-50 last:border-0 flex items-center justify-between"> class="px-3 py-1.5 text-xs text-gray-700 hover:bg-gray-50 border-b border-gray-50 last:border-0 flex items-center justify-between">
<div class="truncate" :title="session.name"> <div class="truncate w-16" :title="session.name">
{{ session.name }} {{ session.name }}
</div> </div>
<div class="flex items-center gap-2"> <div class="flex items-center gap-2">
<!-- <span class="text-gray-400 text-[10px]"> <span class="text-gray-400 text-[10px]">
ID: {{ session.id }} 视图: {{ session.viewId }}
</span> --> </span>
<button @click="copyAnchorId(session.id)" <button @click="copyAnchorId(session.anchorId)"
class="text-blue-500 hover:text-blue-600 p-1 rounded hover:bg-blue-50 transition-colors" class="text-blue-500 hover:text-blue-600 p-1 rounded hover:bg-blue-50 transition-colors"
title="复制 ID"> title="复制 ID">
<svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <svg class="w-3 h-3" fill="none" stroke="currentColor" viewBox="0 0 24 24">
@@ -222,8 +222,9 @@ const showReplyList = async () => {
if (replyListVisible.value && window.electronAPI?.getRepliedSessions) { if (replyListVisible.value && window.electronAPI?.getRepliedSessions) {
try { try {
const result = await window.electronAPI.getRepliedSessions() const result = await window.electronAPI.getRepliedSessions()
// 最新的在最后,前端展示时保持原顺序(最下边是最新的) console.log("回复列表里是", result)
repliedSessions.value = result || [] // 按倒序展示,最新的在最前面
repliedSessions.value = (result || []).reverse()
} catch (e) { } catch (e) {
console.error('获取回复列表失败:', e) console.error('获取回复列表失败:', e)
repliedSessions.value = [] repliedSessions.value = []