submission is now a modal

This commit is contained in:
Ax333l 2023-02-08 18:09:47 +01:00
parent c389a77dfe
commit 10c3dad90f
No known key found for this signature in database
GPG Key ID: D2B4D85271127D23

View File

@ -226,23 +226,26 @@
{/if} {/if}
{#if submit} {#if submit}
<div style="text-align: center;"> <Modal modalOpen={true}>
{#await submitBallot()} <svelte:fragment slot="title">Submit</svelte:fragment>
<h6 in:fly={{ x: transitionDirection, easing: expoOut, duration: 1000 }}> <div style="text-align: center;">
Submitting... {#await submitBallot()}
</h6> <h6 in:fly={{ x: transitionDirection, easing: expoOut, duration: 1000 }}>
{:then _} Submitting...
<h6 in:fly={{ x: transitionDirection, easing: expoOut, duration: 1000 }}> </h6>
Your vote has been cast. {:then _}
</h6> <h6 in:fly={{ x: transitionDirection, easing: expoOut, duration: 1000 }}>
{:catch err} Your vote has been cast.
<h6 in:fly={{ x: transitionDirection, easing: expoOut, duration: 1000 }}> </h6>
An error occured. Try again later. {:catch err}
<br /> <h6 in:fly={{ x: transitionDirection, easing: expoOut, duration: 1000 }}>
{err} An error occured. Try again later.
</h6> <br />
{/await} {err}
</div> </h6>
{/await}
</div>
</Modal>
{/if} {/if}
</div> </div>
<div class="buttons-container"> <div class="buttons-container">