feat: 个人中心侧边栏显示、代表作滚动、图片工作台预览样式、首页轮播尺寸调整

This commit is contained in:
OmniAI Developer
2026-06-03 19:15:45 +08:00
parent 7b41cf3e87
commit 7afcfa54c2
7 changed files with 56 additions and 34 deletions
+2 -2
View File
@@ -193,9 +193,9 @@ function getHomeCarouselCardStyle(offset: number): CSSProperties {
const depth = Math.abs(offset);
const direction = Math.sign(offset);
const isActive = depth === 0;
const xByDepth = [0, 286, 456, 610, 735, 840];
const xByDepth = [0, 190, 320, 430, 520, 590];
const yByDepth = [8, -2, -8, -13, -18, -24];
const scaleByDepth = [1, 0.98, 0.94, 0.91, 0.88, 0.84];
const scaleByDepth = [1, 1, 1, 1, 1, 1];
const x = direction * (xByDepth[depth] ?? xByDepth[xByDepth.length - 1]!);
const y = yByDepth[depth] ?? yByDepth[yByDepth.length - 1]!;
const z = isActive ? 90 : 28 - depth;
@@ -1284,12 +1284,16 @@ function ImageWorkbenchPage({ initialTool = "workbench", onOpenMore, onSelectVie
))}
</div>
) : referenceImage ? (
<img src={referenceImage} alt="参考图预览" />
<div className="studio-canvas-image">
<img src={referenceImage} alt="参考图预览" />
</div>
) : (
<div className="image-workbench-empty">
<PictureOutlined />
<strong></strong>
<span></span>
<div className="studio-canvas-ghost">
<div className="studio-canvas-ghost__icon">
<PictureOutlined />
</div>
<div className="studio-canvas-ghost__title"></div>
<div className="studio-canvas-ghost__hint"></div>
</div>
)}
</section>
+16 -14
View File
@@ -458,20 +458,22 @@ function ProfilePage({
const renderActivePanel = () => {
if (activePanel === "works") {
return visibleWorks.length ? (
<div className="profile-page__list-grid motion-stagger">
{visibleWorks.map((task) => (
<article key={task.id} className="profile-page__list-card">
<div className="profile-page__list-card-head">
<strong>{task.title}</strong>
<span>{task.type}</span>
</div>
<p>{task.prompt}</p>
<div className="profile-page__list-card-meta">
<span>{task.status}</span>
<span>{task.createdAt}</span>
</div>
</article>
))}
<div className="profile-page__works-scroll">
<div className="profile-page__list-grid motion-stagger">
{visibleWorks.map((task) => (
<article key={task.id} className="profile-page__list-card">
<div className="profile-page__list-card-head">
<strong>{task.title}</strong>
<span>{task.type}</span>
</div>
<p>{task.prompt}</p>
<div className="profile-page__list-card-meta">
<span>{task.status}</span>
<span>{task.createdAt}</span>
</div>
</article>
))}
</div>
</div>
) : (
renderEmptyState("向全世界展示你最得意的创作。", "开始创作", onOpenWorkbench)