From 2bca310acc4ca22960c5902b402c2ae23d0f7755 Mon Sep 17 00:00:00 2001
From: secondl1ght <85003930+secondl1ght@users.noreply.github.com>
Date: Sat, 30 Jul 2022 18:58:25 -0600
Subject: hook up all nav buttons, add dropdown menu, add routes...
---
src/components/AppHeader.svelte | 65 ++++++++++++++++++++++++++++++++++-------
1 file changed, 55 insertions(+), 10 deletions(-)
(limited to 'src/components/AppHeader.svelte')
diff --git a/src/components/AppHeader.svelte b/src/components/AppHeader.svelte
index 1c6f639c..9f73adbf 100644
--- a/src/components/AppHeader.svelte
+++ b/src/components/AppHeader.svelte
@@ -4,26 +4,65 @@
import { user } from '$lib/store';
import { goto } from '$app/navigation';
import { Icon } from '$comp';
+
+ const menuButtons = [
+ { title: 'Customers', icon: 'customers', goto: 'customers' },
+ { title: 'Dashboard', icon: 'dash', goto: 'dashboard' },
+ { title: 'Settings', icon: 'settings', goto: 'settings' },
+ { title: 'Support', icon: 'support', goto: 'support' },
+ { title: 'Sign out', icon: 'logout', goto: 'logout' }
+ ];
+
+ let showMenu = false;
+
+ const handleMenuItemClick = (item) => {
+ if (item === 'logout') {
+ goto('/logout');
+ } else {
+ goto(`/${$user.username + '/' + item}`);
+ }
+ };
+
+
--
cgit v1.2.3