Skip to content

Commit 8a736f8

Browse files
committed
feat: change pin page
1 parent 808341a commit 8a736f8

File tree

1 file changed

+29
-0
lines changed
  • infrastructure/eid-wallet/src/routes/(app)/settings/pin

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<script lang="ts">
2+
import { InputPin } from "$lib/ui";
3+
4+
let currentPin = $state("");
5+
let newPin = $state("");
6+
let repeatPin = $state("");
7+
let isError = $state(false);
8+
9+
$effect(() => {
10+
if (repeatPin.length === 4 && newPin !== repeatPin) isError = true;
11+
else isError = false;
12+
});
13+
</script>
14+
15+
<main class="h-[100vh] pt-[3vh] px-[5vw] pb-[4.5vh] flex flex-col gap-[3vh]">
16+
<div>
17+
<p class="mb-[1vh]">Enter you current PIN</p>
18+
<InputPin bind:pin={currentPin} variant="sm"/>
19+
</div>
20+
<div>
21+
<p class="mb-[1vh]">Enter your new PIN</p>
22+
<InputPin bind:pin={newPin} variant="sm"/>
23+
</div>
24+
<div>
25+
<p class="mb-[1vh]">Confirm new PIN</p>
26+
<InputPin bind:pin={repeatPin} variant="sm"/>
27+
</div>
28+
<p class={`small text-danger mt-[3.4vh] ${isError ? "block" : "hidden"}`}>Your PIN does not match, try again.</p>
29+
</main>

0 commit comments

Comments
 (0)