summaryrefslogtreecommitdiff
path: root/frontend/src/pages/ProjectDataTab.svelte
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/src/pages/ProjectDataTab.svelte')
-rw-r--r--frontend/src/pages/ProjectDataTab.svelte9
1 files changed, 5 insertions, 4 deletions
diff --git a/frontend/src/pages/ProjectDataTab.svelte b/frontend/src/pages/ProjectDataTab.svelte
index e3b1923..284aec7 100644
--- a/frontend/src/pages/ProjectDataTab.svelte
+++ b/frontend/src/pages/ProjectDataTab.svelte
@@ -5,6 +5,7 @@
import { listDatasets } from '../lib/client';
import { extractStatusMessage } from '../lib/state';
import type { Dataset } from '../lib/types';
+ import { Button } from '$lib/components/ui/button';
interface Props {
projectId?: string;
@@ -17,7 +18,7 @@
let error: string | null = $state(null);
// svelte-ignore state_referenced_locally
let wizardOpen = $state(showWizard);
-
+
let refreshTimer: ReturnType<typeof setInterval> | null = null;
@@ -61,9 +62,9 @@
<div class="stack">
{#if wizardOpen}
<DatasetWizard onCreated={() => void load()} />
- <button class="btn ghost" onclick={() => (wizardOpen = false)}>收起新建面板</button>
+ <Button variant="ghost" size="sm" onclick={() => (wizardOpen = false)}>收起新建面板</Button>
{:else}
- <button class="btn primary" onclick={() => (wizardOpen = true)}>新建数据集</button>
+ <Button size="sm" class="w-fit" onclick={() => (wizardOpen = true)}>新建数据集</Button>
{/if}
<h2>我的数据集</h2>
@@ -79,7 +80,7 @@
{#if !busy && !error && items.length > 0}
{#each items as ds (ds.id)}
- <DatasetCard dsId={ds.id} />
+ <DatasetCard dsId={ds.id} onRecreated={() => void load()} />
{/each}
{/if}
</div>