1
0
mirror of https://github.com/comatory/fb2iCal synced 2025-06-05 22:09:25 +02:00

improvement: disable input when request is pending

This commit is contained in:
Ondřej Synáček
2020-12-25 09:59:13 +01:00
parent 06c8a217e0
commit 7c831b76e2
4 changed files with 44 additions and 14 deletions

View File

@ -0,0 +1,25 @@
<script>
import { parseStatusStore, requestStore, swStatusStore } from '../stores'
import Input from './Input.svelte'
import Status from './Status.svelte'
$: error = ($requestStore && $requestStore.error) ? $requestStore.error : null
$: pending = Boolean($requestStore && !$requestStore.error)
$: pendingRequest = $requestStore
$: status = $parseStatusStore
$: swStatus = $swStatusStore
</script>
<div class="input-container">
<Input
{pending}
{error}
/>
<Status
{error}
{pending}
{pendingRequest}
{status}
{swStatus}
/>
</div>