diff --git a/src/components/auth/Register.svelte b/src/components/auth/Register.svelte index af807b0..6b84061 100644 --- a/src/components/auth/Register.svelte +++ b/src/components/auth/Register.svelte @@ -9,6 +9,8 @@ } from '$lib/common/webnative' import { sessionStore } from '../../stores' import type { Session } from '$lib/session' + import CheckIcon from '$components/icons/CheckIcon.svelte' + import XIcon from '$components/icons/XIcon.svelte' let username: string = '' let usernameValid = true @@ -18,9 +20,6 @@ let unsubscribeSessionStore: () => void = () => {} - let checkIcon = ` ` - let xIcon = ` ` - onMount(() => { unsubscribeSessionStore = sessionStore.subscribe((session: Session) => { if (session.authed) { @@ -86,12 +85,12 @@ {/if} {#if !(username.length === 0) && usernameAvailable && usernameValid && !checkingUsername} - {@html checkIcon} + {/if} {#if !(username.length === 0) && !checkingUsername && !(usernameAvailable && usernameValid)} - {@html xIcon} + {/if} diff --git a/src/components/icons/CheckIcon.svelte b/src/components/icons/CheckIcon.svelte new file mode 100644 index 0000000..7106bde --- /dev/null +++ b/src/components/icons/CheckIcon.svelte @@ -0,0 +1,14 @@ + + + diff --git a/src/components/icons/XIcon.svelte b/src/components/icons/XIcon.svelte new file mode 100644 index 0000000..7f555f6 --- /dev/null +++ b/src/components/icons/XIcon.svelte @@ -0,0 +1,14 @@ + + +