From 15160ca408f98d1d5d939cb28e9b20981ae1f0bd Mon Sep 17 00:00:00 2001 From: CoolElectronics Date: Sun, 20 Aug 2023 13:28:32 -0400 Subject: [PATCH] add account creation and auth error handling --- frontend/src/AccountCreation.svelte | 9 ++++ frontend/src/App.svelte | 76 +++++++++++++++++++++-------- 2 files changed, 64 insertions(+), 21 deletions(-) diff --git a/frontend/src/AccountCreation.svelte b/frontend/src/AccountCreation.svelte index e69de29..96d002d 100644 --- a/frontend/src/AccountCreation.svelte +++ b/frontend/src/AccountCreation.svelte @@ -0,0 +1,9 @@ + + +
+ +

Step 1

+
+
diff --git a/frontend/src/App.svelte b/frontend/src/App.svelte index 7d543a2..6afeab2 100644 --- a/frontend/src/App.svelte +++ b/frontend/src/App.svelte @@ -13,6 +13,7 @@ CircularProgressIndeterminate, Dialog, RadioAnim3, + SnackbarAnim, StyleFromScheme, TextField, } from "m3-svelte"; @@ -30,12 +31,15 @@ import TrackerList from "tracker-list"; import { browserLocalPersistence, + createUserWithEmailAndPassword, getAuth, setPersistence, signInWithEmailAndPassword, } from "firebase/auth"; import logo from "./logo.png"; + import AccountCreation from "./AccountCreation.svelte"; + import { SnackbarIn } from "m3-svelte/package/containers/Snackbar.svelte"; enum ReadyState { Idle, @@ -60,6 +64,10 @@ let showTrackerList = false; + let createaccount = false; + + let snackbar: (data: SnackbarIn) => void; + async function onTransportOpen() { console.log("Transport opened"); @@ -168,8 +176,6 @@ {#if state == ReadyState.Connected} -{:else if state == ReadyState.AccountCreation} - {:else if state == ReadyState.Connecting}
@@ -197,21 +203,9 @@

Adrift

- - - +