From fd34d661b3aff46ddf0a58d415edb6a031372e6d Mon Sep 17 00:00:00 2001 From: JohnVonNeumann Date: Mon, 25 Nov 2024 17:53:32 +1100 Subject: [PATCH 1/2] refactor(App{Footer,Header}.vue): use nuxtui to replace hacked together header and footer --- frontend/components/AppFooter.vue | 43 ++++++++++++++----------------- frontend/components/AppHeader.vue | 42 ++++++++++++++++-------------- 2 files changed, 42 insertions(+), 43 deletions(-) diff --git a/frontend/components/AppFooter.vue b/frontend/components/AppFooter.vue index 5cd7398..1f20020 100644 --- a/frontend/components/AppFooter.vue +++ b/frontend/components/AppFooter.vue @@ -1,24 +1,21 @@ - - - - - \ No newline at end of file + +
+

ZeroTwentyFifty

+ +
+
+ + + + + \ No newline at end of file diff --git a/frontend/components/AppHeader.vue b/frontend/components/AppHeader.vue index 5cd7398..f715f27 100644 --- a/frontend/components/AppHeader.vue +++ b/frontend/components/AppHeader.vue @@ -1,24 +1,26 @@ - - - + \ No newline at end of file From 5734c79a2214db15c25d1b58a00ed522806c91bb Mon Sep 17 00:00:00 2001 From: JohnVonNeumann Date: Tue, 26 Nov 2024 00:27:13 +1100 Subject: [PATCH 2/2] refactor(components): use NuxtUI for elements instead of hand rolling --- frontend/components/AuthForm.vue | 44 +++++++++++++++++++-------- frontend/components/FootprintList.vue | 9 +++--- frontend/pages/dashboard.vue | 1 - 3 files changed, 37 insertions(+), 17 deletions(-) diff --git a/frontend/components/AuthForm.vue b/frontend/components/AuthForm.vue index 5ea52cb..75d60ec 100644 --- a/frontend/components/AuthForm.vue +++ b/frontend/components/AuthForm.vue @@ -5,8 +5,7 @@ import { useRouter } from 'vue-router' const { state, validate, onSubmit } = useAuth() const router = useRouter() -async function handleSubmit(event: Event) { - event.preventDefault() +async function handleSubmit(event: FormSubmitEvent) { const success = await onSubmit(event) if (success) { router.push('/dashboard') @@ -15,20 +14,41 @@ async function handleSubmit(event: Event) { diff --git a/frontend/components/FootprintList.vue b/frontend/components/FootprintList.vue index 6523817..735ec72 100644 --- a/frontend/components/FootprintList.vue +++ b/frontend/components/FootprintList.vue @@ -6,11 +6,12 @@ const { footprints, fetchFootprints } = useFootprints() diff --git a/frontend/pages/dashboard.vue b/frontend/pages/dashboard.vue index 578e562..67d8092 100644 --- a/frontend/pages/dashboard.vue +++ b/frontend/pages/dashboard.vue @@ -1,6 +1,5 @@ \ No newline at end of file