drop the countdown for now

This commit is contained in:
Philipp Dormann 2025-03-24 10:45:14 +01:00
parent 497a108647
commit 4c5499d050
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314

View File

@ -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.
</p>
<!-- TODO: generate actual qr code -->
<img src={sampleQR} alt="" />
TODO:
</p>
{: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>