From 9f0ba2e243be772a7677f8250893f5da7b2acbfe Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Wed, 6 Nov 2024 17:42:02 -0500 Subject: Factor out the elements of the `/me` page, and style them a little. --- ui/lib/components/ChangePassword.svelte | 60 +++++++++++++++++++++++ ui/lib/components/Invite.svelte | 5 +- ui/lib/components/Invites.svelte | 13 ++--- ui/lib/components/LogOut.svelte | 18 +++++++ ui/routes/(app)/me/+page.svelte | 84 +++++---------------------------- 5 files changed, 97 insertions(+), 83 deletions(-) create mode 100644 ui/lib/components/ChangePassword.svelte create mode 100644 ui/lib/components/LogOut.svelte (limited to 'ui') diff --git a/ui/lib/components/ChangePassword.svelte b/ui/lib/components/ChangePassword.svelte new file mode 100644 index 0000000..1e48bee --- /dev/null +++ b/ui/lib/components/ChangePassword.svelte @@ -0,0 +1,60 @@ + + +
+ + + + + + + +
diff --git a/ui/lib/components/Invite.svelte b/ui/lib/components/Invite.svelte index 35e00b4..381f483 100644 --- a/ui/lib/components/Invite.svelte +++ b/ui/lib/components/Invite.svelte @@ -5,8 +5,5 @@ let inviteUrl = $derived(new URL(`/invite/${id}`, document.location)); - + {inviteUrl} diff --git a/ui/lib/components/Invites.svelte b/ui/lib/components/Invites.svelte index cc14f3b..314782a 100644 --- a/ui/lib/components/Invites.svelte +++ b/ui/lib/components/Invites.svelte @@ -4,7 +4,7 @@ let invites = $state([]); - async function onSubmit(event) { + async function onsubmit(event) { event.preventDefault(); let response = await createInvite(); if (response.status == 200) { @@ -13,11 +13,12 @@ } -