mirror of
https://github.com/emailerfacu-spec/minix-front.git
synced 2026-04-17 15:47:31 -03:00
Terminado boton de carga register
This commit is contained in:
@@ -13,8 +13,14 @@
|
|||||||
|
|
||||||
const setAlert = () => showAlert = true;
|
const setAlert = () => showAlert = true;
|
||||||
|
|
||||||
|
|
||||||
let dto: RegisterDto = $state({password: "", username: "", email:"", displayName: ""});
|
let dto: RegisterDto = $state({password: "", username: "", email:"", displayName: ""});
|
||||||
|
|
||||||
|
const handleSubmit = async (e: Event) => {
|
||||||
|
cargando = true;
|
||||||
|
await register(e, dto, setAlert);
|
||||||
|
cargando = false;
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Card.Root>
|
<Card.Root>
|
||||||
@@ -23,7 +29,7 @@
|
|||||||
<hr />
|
<hr />
|
||||||
</Card.Header>
|
</Card.Header>
|
||||||
<Card.Content>
|
<Card.Content>
|
||||||
<form onsubmit={(e)=>register(e, dto, setAlert)}>
|
<form onsubmit={handleSubmit}>
|
||||||
<Field.Group>
|
<Field.Group>
|
||||||
<Field.Field>
|
<Field.Field>
|
||||||
<Field.Label for="name">Nombre de Usuario</Field.Label>
|
<Field.Label for="name">Nombre de Usuario</Field.Label>
|
||||||
@@ -51,10 +57,10 @@
|
|||||||
</Field.Field>
|
</Field.Field>
|
||||||
<Field.Group>
|
<Field.Group>
|
||||||
<Field.Field>
|
<Field.Field>
|
||||||
<Button type="submit">
|
<Button type="submit" disabled={cargando}>
|
||||||
{#if cargando}
|
{#if cargando}
|
||||||
<Loader2Icon class="animate-spin" />
|
|
||||||
Creando Cuenta...
|
Creando Cuenta...
|
||||||
|
<Loader2Icon class="animate-spin" />
|
||||||
{:else}
|
{:else}
|
||||||
Crear Cuenta
|
Crear Cuenta
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
Reference in New Issue
Block a user