From c52a727d11b87d70ec00a7e2569841e6e6abcd9c Mon Sep 17 00:00:00 2001 From: "Somhairle H. Marisol" Date: Fri, 18 Sep 2026 18:11:53 +0800 Subject: [变更性质] 用户旅程重排:项目首页指标摘要+项目卡、结果页首屏 capital 三卡+交易分页、数据/策略/回测 CTA 与三态统一,token 白名单清扫(docs/ui-user-journey-round6.md §1/§2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/pages/ProjectsPage.svelte | 149 ++++++++++++++++++++------------- 1 file changed, 93 insertions(+), 56 deletions(-) (limited to 'frontend/src/pages/ProjectsPage.svelte') diff --git a/frontend/src/pages/ProjectsPage.svelte b/frontend/src/pages/ProjectsPage.svelte index 5cbfecf..65137d2 100644 --- a/frontend/src/pages/ProjectsPage.svelte +++ b/frontend/src/pages/ProjectsPage.svelte @@ -1,20 +1,19 @@ - + {#snippet actions()} {/snippet} -
- - +
+ {#if busy} + + {:else if error} + + {:else} +

+ {projectsStore.all.length} 个项目 · {(datasets ?? []).length} 个数据集 · + {[...runStatusOf.values()].reduce((a, b) => a + b.running, 0)} 个回测运行中 · + {(runs ?? []).length} 次回测 · AI 请求 {usage?.totals?.requests ?? '—'} +

+ {/if} + {#if showCreate} -
-

新建项目

+ +

新建项目

- +
- +
- {#if createErr}{createErr}{/if} + {#if createErr}{createErr}{/if}
-
@@ -114,44 +137,58 @@ {/if} + {#if !busy && error && projectsStore.all.length === 0} + + {#snippet errorCta()} + + {/snippet} + + {/if} + {#if !busy && !error && projectsStore.all.length === 0} - + + {#snippet emptyCta()} + + {/snippet} + {/if} {#if projectsStore.all.length > 0} - - - - - 名称 - 最近回测 - 简介 - 版本代 - 最近更新 - - - - {#each projectsStore.all as p (p.id)} - {@const sp = sparks.get(p.id)} - - - {p.name} - - - {#if sp} - - = sp.first} /> - - {/if} - - {p.description ?? '—'} - {p.draft_generation ?? '—'} - {fmtDateTime(p.updated_at)} - - {/each} - - - +
+ {#each projectsStore.all as p (p.id)} + {@const sp = sparks.get(p.id)} + {@const st = runStatusOf.get(p.id)} + +
+
+ + {p.name} + +

{p.description ?? '—'}

+
+ + {st?.running ? `运行中 ${st.running}` : st?.done ? `最近 ${st.lastReturn ?? '完成'}` : '未回测'} + +
+
+ {#if sp} + + = sp.first} /> + + 最近 {runStatusOf.get(p.id)?.lastReturn ?? '完成'} + {:else} + 还没有回测记录 + {/if} + + 更新 {fmtDateTime(p.updated_at)} +
+
+ {/each} +
{/if}
-- cgit v1.2.3