progress indicator in exports

This commit is contained in:
SPRINX0\prochazka
2025-03-04 13:55:36 +01:00
parent 4006f03444
commit 0c104d5d29
8 changed files with 87 additions and 12 deletions

View File

@@ -104,6 +104,7 @@
$: sourceList = $values.sourceList;
let targetEditKey = 0;
export let progressHolder = null;
const previewSource = writable(null);
@@ -231,11 +232,16 @@
header: 'Target',
slot: 1,
},
{
supportsPreview && {
fieldName: 'preview',
header: 'Preview',
slot: 0,
},
!!progressHolder && {
fieldName: 'status',
header: 'Status',
slot: 3,
},
{
fieldName: 'columns',
header: 'Columns',
@@ -296,6 +302,17 @@
>{columnCount > 0 ? `(${columnCount} columns)` : '(copy from source)'}
</Link>
</svelte:fragment>
<svelte:fragment slot="3" let:row>
{#if progressHolder[row]?.status == 'running'}
<FontIcon icon="icon loading" /> Running
{:else if progressHolder[row]?.status == 'error'}
<FontIcon icon="img error" /> Error
{:else if progressHolder[row]?.status == 'done'}
<FontIcon icon="img ok" /> Done
{:else}
<FontIcon icon="icon wait" /> Queued
{/if}
</svelte:fragment>
</TableControl>
{/key}
</div>