feat(registration): disabled done button for 7.5s
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Philipp Dormann 2023-04-19 17:04:36 +02:00
parent cbfbd92d0e
commit 5f5b03a8a0
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
1 changed files with 10 additions and 1 deletions

View File

@ -6,6 +6,7 @@
$: firstname = '';
$: lastname = '';
$: doneButtonEnabled = false;
$: showResult = false;
$: showError = false;
@ -38,7 +39,12 @@
})) as ResponseRunner;
showError = false;
showResult = true;
focusDoneButton();
setTimeout(() => {
doneButtonEnabled = true;
setTimeout(() => {
focusDoneButton();
}, 25);
}, 7500);
} catch (error) {
console.log(error);
showError = true;
@ -201,8 +207,11 @@
<div class="mx-auto text-center items-center">
<button
class:opacity-50={!doneButtonEnabled}
disabled={!doneButtonEnabled}
id="done"
on:click={() => {
doneButtonEnabled = false;
showResult = false;
focusFirstName();
}}