style(整合): 优化更新日志显示,同日期更新合并为单卡片行式布局

via [HAPI](https://hapi.run)

Co-Authored-By: HAPI <noreply@hapi.run>
This commit is contained in:
ittoview
2026-03-08 03:46:11 +00:00
parent 18461b685c
commit cdf0009602
2 changed files with 33 additions and 25 deletions

View File

@@ -127,40 +127,41 @@ export function ChangelogModal({ isOpen, onClose }: ChangelogModalProps) {
<div className="flex-1 h-px bg-gray-200 dark:bg-gray-700" />
</div>
{/* 该日期下的更新列表 */}
<div className="space-y-3">
{/* 该日期下的更新列表 - 统一卡片 */}
<motion.div
variants={itemVariants}
className="bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 divide-y divide-gray-200 dark:divide-gray-700"
>
{entries.map((entry, index) => {
const meta = typeMeta[entry.type]
return (
<motion.div
<div
key={entry.id || `${entry.date}-${index}`}
variants={itemVariants}
className="bg-gray-50 dark:bg-gray-900 rounded-lg border border-gray-200 dark:border-gray-700 p-4 hover:border-indigo-300 dark:hover:border-indigo-600 transition-colors"
className="p-4 hover:bg-gray-100 dark:hover:bg-gray-800 transition-colors"
>
{/* 标签行 */}
<div className="flex flex-wrap items-center gap-2 mb-2">
{/* 类型标签 */}
<span className={`inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium ${meta.className}`}>
<Tag size={12} />
{meta.label}
</span>
{/* 范围标签 */}
{entry.scope && (
<span className="inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-gray-200 text-gray-700 dark:bg-gray-700 dark:text-gray-300">
{entry.scope}
<div className="flex items-start gap-3">
{/* 标签 */}
<div className="flex items-center gap-2 flex-shrink-0">
<span className={`inline-flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium ${meta.className}`}>
<Tag size={12} />
{meta.label}
</span>
)}
</div>
{entry.scope && (
<span className="inline-flex items-center px-2.5 py-1 rounded-md text-xs font-medium bg-gray-200 text-gray-700 dark:bg-gray-700 dark:text-gray-300">
{entry.scope}
</span>
)}
</div>
{/* 标题 */}
<h4 className="text-sm font-medium text-gray-900 dark:text-white">
{entry.title}
</h4>
</motion.div>
{/* 标题 */}
<p className="text-sm text-gray-900 dark:text-white flex-1">
{entry.title}
</p>
</div>
</div>
)
})}
</div>
</motion.div>
</div>
))}
</motion.div>

View File

@@ -1,5 +1,12 @@
{
"changelogEntries": [
{
"id": "2026-03-08-changelog-unified-card",
"date": "2026-03-08",
"type": "style",
"title": "优化更新日志显示,同日期更新合并为单卡片行式布局",
"scope": "整合"
},
{
"id": "2026-03-08-fix-modal-portal",
"date": "2026-03-08",