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