Skip to content

Commit

Permalink
mv processing text to button (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjaudiomv authored Feb 17, 2024
1 parent 4b805db commit f5db13f
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions src/lib/DataConverter.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
}
processing.set(true);
errorMessage.set('');
loadingText.set('Processing');
csvDownloadUrl = '';
kmlDownloadUrl = '';
startLoadingAnimation();
Expand Down Expand Up @@ -81,11 +82,9 @@
on:keydown={(event) => event.key === 'Enter' && handleExport()}
placeholder="BMLT URL query..."
/>
<button on:click={handleExport} disabled={$processing}>Generate Export Data</button>
{#if $processing}
<div class="loading">{$loadingText}</div>
{/if}

<button on:click={handleExport} disabled={$processing}
>{$processing ? $loadingText : 'Generate Export Data'}</button
>
{#if $errorMessage}
<p class="error" id="errorMessages">{$errorMessage}</p>
{/if}
Expand Down Expand Up @@ -152,6 +151,7 @@
padding: 10px 20px;
margin-bottom: 15px;
border-radius: 3px;
height: 40px;
cursor: pointer;
}
Expand Down Expand Up @@ -201,11 +201,4 @@
box-sizing: border-box;
text-align: center;
}
.loading {
color: #007bff;
text-align: center;
padding: 10px;
font-weight: bold;
}
</style>

0 comments on commit f5db13f

Please sign in to comment.