From ebdd1750820178a1a19a9d90d4e330b04807f3ae Mon Sep 17 00:00:00 2001 From: Ramon Wenger Date: Thu, 17 Oct 2024 15:31:17 +0200 Subject: [PATCH 1/5] Refactor main navigation for clearer separation of concerns Split up the MainNavigationBar component into a separate HeaderBar which decides which header to display, a separate MobileMenuButton that handles the menu and its toggling, and also move some computed attributes to a composable. --- client/src/App.vue | 5 +- .../components/header/DefaultNavigation.vue | 20 + client/src/components/header/HeaderBar.vue | 13 + .../header/MainNavigationBar.scratch | 12 + .../components/header/MainNavigationBar.vue | 468 +++++++----------- .../components/header/MobileMenuButton.vue | 59 +++ client/src/utils/navigation.ts | 79 +++ 7 files changed, 364 insertions(+), 292 deletions(-) create mode 100644 client/src/components/header/DefaultNavigation.vue create mode 100644 client/src/components/header/HeaderBar.vue create mode 100644 client/src/components/header/MainNavigationBar.scratch create mode 100644 client/src/components/header/MobileMenuButton.vue create mode 100644 client/src/utils/navigation.ts diff --git a/client/src/App.vue b/client/src/App.vue index 764062e1..3b4a35c3 100644 --- a/client/src/App.vue +++ b/client/src/App.vue @@ -1,6 +1,6 @@