From 6ab8db31c38eb9bf50485bea4cfc3b09add3daad Mon Sep 17 00:00:00 2001 From: Ilion Beyst Date: Mon, 21 Mar 2022 20:05:49 +0100 Subject: implement navbar user controls --- .../src/lib/components/navbar/UserControls.svelte | 75 ++++++++++++++++++++++ web/pw-server/src/routes/__layout.svelte | 4 +- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 web/pw-server/src/lib/components/navbar/UserControls.svelte (limited to 'web/pw-server/src') diff --git a/web/pw-server/src/lib/components/navbar/UserControls.svelte b/web/pw-server/src/lib/components/navbar/UserControls.svelte new file mode 100644 index 0000000..e9dbab1 --- /dev/null +++ b/web/pw-server/src/lib/components/navbar/UserControls.svelte @@ -0,0 +1,75 @@ + + +
+ {#if user} +
+ {user["username"]} +
+
Sign out
+ {:else} + + + {/if} +
+ + diff --git a/web/pw-server/src/routes/__layout.svelte b/web/pw-server/src/routes/__layout.svelte index c22591e..065a82c 100644 --- a/web/pw-server/src/routes/__layout.svelte +++ b/web/pw-server/src/routes/__layout.svelte @@ -1,5 +1,5 @@ @@ -9,7 +9,7 @@ - + -- cgit v1.2.3