优化调整
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
const chatHistoryData = [
|
||||
{
|
||||
date: '2025年7月15日',
|
||||
summary: '我们聊了聊去云南旅行的计划,感觉好兴奋!',
|
||||
href: 'chat.html'
|
||||
},
|
||||
{
|
||||
date: '2025年7月14日',
|
||||
summary: '关于最近工作上的一些烦恼,谢谢你的倾听。',
|
||||
href: 'chat.html'
|
||||
},
|
||||
{
|
||||
date: '2025年7月12日',
|
||||
summary: '你给我推荐的电影《心灵捕手》太棒了!',
|
||||
href: 'chat.html'
|
||||
},
|
||||
{
|
||||
date: '2025年7月10日',
|
||||
summary: '讨论了一下MBTI测试结果,感觉更了解自己了。',
|
||||
href: 'chat.html'
|
||||
},
|
||||
{
|
||||
date: '2025年7月9日',
|
||||
summary: '学习新的编程语言真的好难,但是也很有趣。',
|
||||
href: 'chat.html'
|
||||
},
|
||||
{
|
||||
date: '2025年7月7日',
|
||||
summary: '今天心情有点低落,和你聊完好多了。',
|
||||
href: 'chat.html'
|
||||
},
|
||||
{
|
||||
date: '2025年7月5日',
|
||||
summary: '帮你规划了周末的出行路线和美食推荐。',
|
||||
href: 'chat.html'
|
||||
}
|
||||
];
|
||||
|
||||
const historyListContainer = document.getElementById('history-list');
|
||||
|
||||
if (historyListContainer) {
|
||||
const historyItemsHtml = chatHistoryData.map(item => `
|
||||
<a href="${item.href}" class="block bg-white p-4 rounded-xl shadow-sm hover:shadow-md hover:border-tech-blue/50 border border-transparent transition-all duration-300 group">
|
||||
<div class="flex justify-between items-center">
|
||||
<div class="flex-1 min-w-0">
|
||||
<p class="text-sm text-text-medium mb-1 group-hover:text-tech-blue transition-colors">${item.date}</p>
|
||||
<p class="font-medium text-text-dark truncate">${item.summary}</p>
|
||||
</div>
|
||||
<i data-lucide="chevron-right" class="w-5 h-5 text-gray-300 group-hover:text-tech-blue transition-colors flex-shrink-0 ml-4"></i>
|
||||
</div>
|
||||
</a>
|
||||
`).join('');
|
||||
|
||||
historyListContainer.innerHTML = historyItemsHtml;
|
||||
|
||||
if (typeof lucide !== 'undefined') {
|
||||
lucide.createIcons();
|
||||
}
|
||||
} else {
|
||||
console.error('History list container not found!');
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user