feat: 首页展示最近生成的素材画廊

- 后端新增 GET /api/v1/assets 接口,返回已完成任务的素材列表(按创建时间倒序)
- 前端新增 AssetGallery 组件,网格展示素材缩略图、类型标签和提示词
- HomePage 中工程列表上方展示最近生成素材
This commit is contained in:
2026-05-25 21:02:03 +08:00
parent 5be74e3ce1
commit b88f9aaf03
6 changed files with 172 additions and 0 deletions
+3
View File
@@ -2,6 +2,7 @@ import { useEffect, useState } from 'react'
import { useProjectListStore } from '../stores/projectList'
import { useToastStore } from '../stores/toast'
import ProjectCard from '../components/ProjectCard'
import AssetGallery from '../components/AssetGallery'
import CreateProjectModal from '../components/CreateProjectModal'
import EmptyState from '../components/EmptyState'
import Skeleton from '../components/Skeleton'
@@ -39,6 +40,8 @@ export default function HomePage() {
return (
<div className="container page-enter" style={{ paddingTop: 32, paddingBottom: 32 }}>
<AssetGallery />
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: 24 }}>
<h1 style={{ fontSize: 22 }}>我的工程</h1>
<button className="btn-primary" onClick={() => setModalOpen(true)}>