mirror of
https://github.com/gurucomputing/headscale-ui.git
synced 2026-01-23 02:34:43 +00:00
move registration to component
This commit is contained in:
parent
367c87d44c
commit
01dace2c0d
2 changed files with 18 additions and 12 deletions
16
src/lib/components/login/login.svelte
Normal file
16
src/lib/components/login/login.svelte
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<script lang="ts">
|
||||
import { fade } from "svelte/transition";
|
||||
</script>
|
||||
|
||||
<div in:fade class="flex items-center justify-center">
|
||||
<fieldset class="fieldset bg-base-200 border-base-300 rounded-box w-xs border p-4">
|
||||
<legend class="fieldset-legend">First Time Registration</legend>
|
||||
|
||||
<label class="label" for="email">Email</label>
|
||||
<input type="email" required class="input validator" id="email" placeholder="Email" />
|
||||
<label class="label" for="password">New Password</label>
|
||||
<input type="password" class="input" id="password" placeholder="Password" />
|
||||
|
||||
<button class="btn btn-neutral mt-4" type="submit">Register Admin Account</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
|
|
@ -3,6 +3,7 @@
|
|||
import { fade } from 'svelte/transition';
|
||||
import { loginOrRegister } from '$lib/components/login/auth-functions.svelte';
|
||||
import { onMount } from 'svelte';
|
||||
import Login from '$lib/components/login/login.svelte';
|
||||
|
||||
appSettings.navbarTitle = 'Login';
|
||||
appSettings.sidebarDrawerOpen = false;
|
||||
|
|
@ -32,16 +33,5 @@
|
|||
{/if}
|
||||
|
||||
{#if loginType == 'registration'}
|
||||
<div in:fade class="flex items-center justify-center">
|
||||
<fieldset class="fieldset bg-base-200 border-base-300 rounded-box w-xs border p-4">
|
||||
<legend class="fieldset-legend">First Time Registration</legend>
|
||||
|
||||
<label class="label" for="email">Email</label>
|
||||
<input type="email" required class="input validator" id="email" placeholder="Email" />
|
||||
<label class="label" for="password">New Password</label>
|
||||
<input type="password" class="input" id="password" placeholder="Password" />
|
||||
|
||||
<button class="btn btn-neutral mt-4" type="submit">Register Admin Account</button>
|
||||
</fieldset>
|
||||
</div>
|
||||
<Login></Login>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue