From a22e4b42ca630a2bb33ca9443f0207f12468cffb Mon Sep 17 00:00:00 2001 From: Bastian Masanek Date: Mon, 3 Nov 2025 19:20:10 +0100 Subject: [PATCH] Refactor navigation components for improved layout and functionality - Updated UserMenu.vue to enhance button styling and spacing for a more modern look. - Simplified CartFAB.vue to always show the cart button when items are present, regardless of the route. - Adjusted AppHeader.vue for better alignment of elements. - Enhanced AreaTabs.vue to enable the educator tab and improve badge styling. - Refined BottomNav.vue to handle cart visibility and navigation more effectively. These changes aim to enhance user navigation and overall experience within the application. --- app/components/Cart/CartFAB.vue | 10 +-- app/components/UserMenu.vue | 4 +- app/components/navigation/AppHeader.vue | 2 +- app/components/navigation/AreaTabs.vue | 28 ++++---- app/components/navigation/BottomNav.vue | 92 +++++++++++------------- app/components/navigation/CartButton.vue | 34 +++------ app/pages/educator/index.vue | 17 ++--- app/pages/experimenta/index.vue | 2 +- app/pages/products/[id].vue | 2 +- app/pages/products/index.vue | 17 ++--- 10 files changed, 82 insertions(+), 126 deletions(-) diff --git a/app/components/Cart/CartFAB.vue b/app/components/Cart/CartFAB.vue index 670ffa6..9c77c28 100644 --- a/app/components/Cart/CartFAB.vue +++ b/app/components/Cart/CartFAB.vue @@ -7,16 +7,10 @@ import { Button } from '@/components/ui/button' const { itemCount, total } = useCart() const { open } = useCartUI() -// Get current route -const route = useRoute() - // Determine if FAB should be visible const isVisible = computed(() => { - // Only show on /products and /products/[id] routes - const isProductPage = route.path === '/products' || route.path.startsWith('/products/') - - // Only show when cart has items - return isProductPage && itemCount.value > 0 + // Show when cart has items (on all pages) + return itemCount.value > 0 }) // Format price as EUR in German locale diff --git a/app/components/UserMenu.vue b/app/components/UserMenu.vue index 4c48989..ab9b23f 100644 --- a/app/components/UserMenu.vue +++ b/app/components/UserMenu.vue @@ -54,7 +54,7 @@ async function handleLogout() {