From d8f70f2aa547dacfb8dc47bb8a783321988d9968 Mon Sep 17 00:00:00 2001 From: josedario87 Date: Mon, 13 Oct 2025 03:00:02 -0600 Subject: [PATCH] Refactor auth components into individual button components - Remove StatusBadges component (badges for authenticated, connected, groups) - Remove ActionButtons component - Create individual button components: - SessionStatusButton: handles session status check - ProfileButton: navigates to user profile - LogoutButton: handles user logout - LoginButton: reloads page to trigger login - Update app.vue to use new individual button components - Improve code quality with better component separation and reusability --- nuxt4/app/app.vue | 14 ++-- nuxt4/app/components/auth/ActionButtons.vue | 64 ------------------- nuxt4/app/components/auth/LoginButton.vue | 19 ++++++ nuxt4/app/components/auth/LogoutButton.vue | 21 ++++++ nuxt4/app/components/auth/ProfileButton.vue | 20 ++++++ .../components/auth/SessionStatusButton.vue | 21 ++++++ nuxt4/app/components/auth/StatusBadges.vue | 46 ------------- 7 files changed, 90 insertions(+), 115 deletions(-) delete mode 100644 nuxt4/app/components/auth/ActionButtons.vue create mode 100644 nuxt4/app/components/auth/LoginButton.vue create mode 100644 nuxt4/app/components/auth/LogoutButton.vue create mode 100644 nuxt4/app/components/auth/ProfileButton.vue create mode 100644 nuxt4/app/components/auth/SessionStatusButton.vue delete mode 100644 nuxt4/app/components/auth/StatusBadges.vue diff --git a/nuxt4/app/app.vue b/nuxt4/app/app.vue index d58f565..0d640f8 100644 --- a/nuxt4/app/app.vue +++ b/nuxt4/app/app.vue @@ -20,11 +20,15 @@ - - - - - + + +
+ + + + +
+
diff --git a/nuxt4/app/components/auth/ActionButtons.vue b/nuxt4/app/components/auth/ActionButtons.vue deleted file mode 100644 index 5840f22..0000000 --- a/nuxt4/app/components/auth/ActionButtons.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - diff --git a/nuxt4/app/components/auth/LoginButton.vue b/nuxt4/app/components/auth/LoginButton.vue new file mode 100644 index 0000000..b02a705 --- /dev/null +++ b/nuxt4/app/components/auth/LoginButton.vue @@ -0,0 +1,19 @@ + + + diff --git a/nuxt4/app/components/auth/LogoutButton.vue b/nuxt4/app/components/auth/LogoutButton.vue new file mode 100644 index 0000000..193012d --- /dev/null +++ b/nuxt4/app/components/auth/LogoutButton.vue @@ -0,0 +1,21 @@ + + + diff --git a/nuxt4/app/components/auth/ProfileButton.vue b/nuxt4/app/components/auth/ProfileButton.vue new file mode 100644 index 0000000..11d81ff --- /dev/null +++ b/nuxt4/app/components/auth/ProfileButton.vue @@ -0,0 +1,20 @@ + + + diff --git a/nuxt4/app/components/auth/SessionStatusButton.vue b/nuxt4/app/components/auth/SessionStatusButton.vue new file mode 100644 index 0000000..68b6465 --- /dev/null +++ b/nuxt4/app/components/auth/SessionStatusButton.vue @@ -0,0 +1,21 @@ + + + diff --git a/nuxt4/app/components/auth/StatusBadges.vue b/nuxt4/app/components/auth/StatusBadges.vue deleted file mode 100644 index b99eee5..0000000 --- a/nuxt4/app/components/auth/StatusBadges.vue +++ /dev/null @@ -1,46 +0,0 @@ - - -