From 65b47489860011783e5c42861c8525648c0c322e Mon Sep 17 00:00:00 2001 From: Samantha Piatt Date: Fri, 29 Mar 2024 10:27:22 -0400 Subject: [PATCH] Add user session logout popout. --- package-lock.json | 2 +- package.json | 2 +- src/lib/components/Navigation.svelte | 72 ++++++++++++++++++-------- src/routes/+layout.svelte | 5 +- tests/lib/component/navigation/test.ts | 17 +++--- 5 files changed, 67 insertions(+), 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index aff65eef..4c6c620b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "pic-sure-frontend", "version": "0.0.1", "dependencies": { - "@floating-ui/dom": "1.5.3", + "@floating-ui/dom": "^1.5.3", "@fortawesome/fontawesome-free": "^6.5.1", "@vincjo/datatables": "^1.14.5", "dotenv": "^16.3.1", diff --git a/package.json b/package.json index 913dc146..395526f1 100644 --- a/package.json +++ b/package.json @@ -47,7 +47,7 @@ }, "type": "module", "dependencies": { - "@floating-ui/dom": "1.5.3", + "@floating-ui/dom": "^1.5.3", "@fortawesome/fontawesome-free": "^6.5.1", "@vincjo/datatables": "^1.14.5", "dotenv": "^16.3.1", diff --git a/src/lib/components/Navigation.svelte b/src/lib/components/Navigation.svelte index ef49e3d8..1611041b 100644 --- a/src/lib/components/Navigation.svelte +++ b/src/lib/components/Navigation.svelte @@ -1,5 +1,11 @@ @@ -105,24 +117,40 @@ {/each} -
- +
+

{$user.email}

+ +
+ {:else} + + + + + {/if}
diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 39b558b0..920c60e8 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -1,10 +1,13 @@