From 5adaee25a0de44d6a3ac8b77cd5c4481c38c9d0f Mon Sep 17 00:00:00 2001 From: Agent Zero Date: Tue, 21 Jul 2026 22:18:19 +0200 Subject: [PATCH] Sidebar: narrower width (w-56), tree structure with expandable sub-menus for Calendar, Files, Email --- frontend/src/components/layout/Sidebar.tsx | 182 +++++++++++++++++++-- frontend/src/i18n/locales/de.json | 3 + frontend/src/i18n/locales/en.json | 3 + 3 files changed, 175 insertions(+), 13 deletions(-) diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx index e02b623..b7ce512 100644 --- a/frontend/src/components/layout/Sidebar.tsx +++ b/frontend/src/components/layout/Sidebar.tsx @@ -1,33 +1,112 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import clsx from 'clsx'; -import { NavLink } from 'react-router-dom'; +import { NavLink, useLocation } from 'react-router-dom'; import { useTranslation } from 'react-i18next'; import { useUIStore } from '@/store/uiStore'; -interface NavItem { +interface NavLeaf { + to: string; + labelKey: string; +} + +interface NavTreeItem { + labelKey: string; + icon: React.ReactNode; + children: NavLeaf[]; +} + +interface NavSingleItem { to: string; labelKey: string; icon: React.ReactNode; } const navIcon = (path: string) => ( -
+
leocrm