drop the countdown for now
This commit is contained in:
parent
497a108647
commit
4c5499d050
@ -62,35 +62,6 @@
|
||||
let firstname = $state<string>("");
|
||||
let lastname = $state<string>("");
|
||||
let remainingseconds = $state<number>(5);
|
||||
|
||||
// Function to handle automatic return to welcome screen
|
||||
function startCountdown() {
|
||||
if (currentStep.progress === 100) {
|
||||
remainingseconds = 10;
|
||||
const timer = setInterval(() => {
|
||||
remainingseconds -= 1;
|
||||
if (remainingseconds <= 0) {
|
||||
clearInterval(timer);
|
||||
currentStep = Steps.WELCOME;
|
||||
}
|
||||
}, 1000);
|
||||
return timer;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
import { onDestroy } from "svelte";
|
||||
|
||||
// Watch for changes to currentStep
|
||||
$effect(() => {
|
||||
if (currentStep.progress === 100) {
|
||||
const timer = startCountdown();
|
||||
// Cleanup when component is destroyed
|
||||
onDestroy(() => {
|
||||
if (timer) clearInterval(timer);
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="pt-48">
|
||||
@ -216,9 +187,9 @@
|
||||
Alright that's it, just walk up to the next available person and
|
||||
tell them your name.<br />
|
||||
You can scan this qr code to login to our selfservice.
|
||||
<!-- TODO: generate actual qr code -->
|
||||
<img src={sampleQR} alt="" />
|
||||
</p>
|
||||
<img src={sampleQR} alt="" />
|
||||
TODO:
|
||||
{:else if currentStep.name == Steps.SIGNIN.name}
|
||||
<div class="grid gap-2">
|
||||
<Button
|
||||
@ -306,9 +277,6 @@
|
||||
currentStep = Steps.WELCOME;
|
||||
}}>Done</Button
|
||||
>
|
||||
<p class="text-center">
|
||||
Returning to the home screen in {remainingseconds} seconds...
|
||||
</p>
|
||||
{/if}
|
||||
</Card.Footer>
|
||||
</Card.Root>
|
||||
|
Loading…
x
Reference in New Issue
Block a user