summaryrefslogtreecommitdiff
path: root/frontend/src/pages/ProjectDataTab.svelte
diff options
context:
space:
mode:
authorSomhairle H. Marisol <[email protected]>2026-09-18 18:11:53 +0800
committerSomhairle H. Marisol <[email protected]>2026-09-18 18:11:53 +0800
commitc52a727d11b87d70ec00a7e2569841e6e6abcd9c (patch)
treec7bc7217cb0ef02613b34e5a1f228ac3a68431a9 /frontend/src/pages/ProjectDataTab.svelte
parent63098a260dadf9e5d01650afb02570343abe20d9 (diff)
downloadstrategy-lab-c52a727d11b87d70ec00a7e2569841e6e6abcd9c.tar.gz
[变更性质] 用户旅程重排:项目首页指标摘要+项目卡、结果页首屏 capital 三卡+交易分页、数据/策略/回测 CTA 与三态统一,token 白名单清扫(docs/ui-user-journey-round6.md §1/§2)
Diffstat (limited to 'frontend/src/pages/ProjectDataTab.svelte')
-rw-r--r--frontend/src/pages/ProjectDataTab.svelte25
1 files changed, 15 insertions, 10 deletions
diff --git a/frontend/src/pages/ProjectDataTab.svelte b/frontend/src/pages/ProjectDataTab.svelte
index 7b9f8ea..b7555ad 100644
--- a/frontend/src/pages/ProjectDataTab.svelte
+++ b/frontend/src/pages/ProjectDataTab.svelte
@@ -59,26 +59,31 @@
}
</script>
-<div class="flex flex-col gap-3">
+<div class="flex flex-col gap-4 md:gap-6">
{#if wizardOpen}
<DatasetWizard onCreated={() => void load()} />
- <Button variant="ghost" size="sm" onclick={() => (wizardOpen = false)}>收起新建面板</Button>
+ <Button variant="ghost" class="w-fit" onclick={() => (wizardOpen = false)}>收起新建面板</Button>
{:else}
- <Button size="sm" class="w-fit" onclick={() => (wizardOpen = true)}>新建数据集</Button>
+ <Button class="w-fit" onclick={() => (wizardOpen = true)}>接入数据</Button>
{/if}
- <h2>我的数据集</h2>
- <Status busy={busy} error={error} busyText="加载数据集列表…" empty={null} />
+ <h2 class="text-lg font-semibold m-0">我的数据集</h2>
- {#if !busy && !error && items.length === 0}
+ {#if busy}
+ <Status busy={false} busyText="加载数据集列表…" skeletonRows={3} empty={null} />
+ {:else if error}
+ <Status busy={false} {error} empty={null}>
+ {#snippet errorCta()}
+ <Button onclick={load}>重新加载</Button>
+ {/snippet}
+ </Status>
+ {:else if items.length === 0}
<Status
busy={false}
empty="还没有数据集"
- emptyHint="先创建数据集:选择标的、日期范围与复权方式,提交后异步获取并给出覆盖预览"
+ emptyHint="选择标的、日期范围与复权方式,提交后异步获取并给出覆盖预览"
/>
- {/if}
-
- {#if !busy && !error && items.length > 0}
+ {:else}
{#each items as ds (ds.id)}
<DatasetCard dsId={ds.id} onRecreated={() => void load()} />
{/each}