Add JRPC API, reworked Login and User pages
This commit is contained in:
27
Frontend/src/pages/login/TF/CodeInput.svelte
Normal file
27
Frontend/src/pages/login/TF/CodeInput.svelte
Normal file
@ -0,0 +1,27 @@
|
||||
<script>
|
||||
import Cleave from "cleave.js";
|
||||
import { onMount } from "svelte";
|
||||
import Error from "../Error.svelte";
|
||||
|
||||
// export let label;
|
||||
export let value;
|
||||
export let length = 6;
|
||||
|
||||
let input;
|
||||
onMount(() => {
|
||||
const cleaveCustom = new Cleave(input, {
|
||||
blocks: [length / 2, length / 2],
|
||||
delimiter: " ",
|
||||
numericOnly: true,
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="floating group">
|
||||
<input id="code-input" bind:this={input} autofocus bind:value />
|
||||
<span class="highlight" />
|
||||
<span class="bar" />
|
||||
<label for="code-input">Code</label>
|
||||
|
||||
<Error />
|
||||
</div>
|
Reference in New Issue
Block a user