From 48657a710f9a5ec505a01dbce18252056495ae74 Mon Sep 17 00:00:00 2001 From: devmam999 Date: Wed, 31 Dec 2025 08:38:52 -0800 Subject: [PATCH 1/2] Fixed sidebar so it closes properly --- dashboard/src/components/Sidebar.tsx | 64 +++++++++++++++------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/dashboard/src/components/Sidebar.tsx b/dashboard/src/components/Sidebar.tsx index c769016b..d5f6e4e4 100644 --- a/dashboard/src/components/Sidebar.tsx +++ b/dashboard/src/components/Sidebar.tsx @@ -78,15 +78,15 @@ const Sidebar = (props: SidebarProps) => { const MapacheHeader = (props: { isSidebarExpanded: boolean }) => { return ( -
-
+
+
-
-

Mapache

-
+ {props.isSidebarExpanded && ( +
+

Mapache

+
+ )}
); }; @@ -111,20 +111,24 @@ const Sidebar = (props: SidebarProps) => { }} >
-
+
-
- {props.text} -
+ {props.isSidebarExpanded && ( +
+ {props.text} +
+ )}
); @@ -141,30 +145,30 @@ const Sidebar = (props: SidebarProps) => { className={`mx-2 my-2 flex cursor-pointer items-center overflow-hidden rounded-lg bg-gradient-to-br from-gr-pink to-gr-purple bg-[length:100%_100%] p-[2px] transition-all duration-150`} onClick={(e) => e.stopPropagation()} > -
-
+
+
-
-
-
-
- {currentVehicle.name} + {props.isSidebarExpanded && ( +
+
+
+
+ {currentVehicle.name} +
+
+ {currentVehicle.id} • {currentVehicle.type} +
-
- {currentVehicle.id} • {currentVehicle.type} +
+
-
- -
-
+ )}
@@ -286,4 +290,4 @@ const Sidebar = (props: SidebarProps) => { ); }; -export default Sidebar; +export default Sidebar; \ No newline at end of file From 37cb7070f236b70189b5bb085b7bb3082819f7d7 Mon Sep 17 00:00:00 2001 From: devmam999 Date: Wed, 31 Dec 2025 08:56:43 -0800 Subject: [PATCH 2/2] readded animation --- dashboard/src/components/Sidebar.tsx | 50 +++++++++++++--------------- dashboard/src/index.css | 5 ++- 2 files changed, 27 insertions(+), 28 deletions(-) diff --git a/dashboard/src/components/Sidebar.tsx b/dashboard/src/components/Sidebar.tsx index d5f6e4e4..6b64fa58 100644 --- a/dashboard/src/components/Sidebar.tsx +++ b/dashboard/src/components/Sidebar.tsx @@ -82,11 +82,11 @@ const Sidebar = (props: SidebarProps) => {
- {props.isSidebarExpanded && ( -
-

Mapache

-
- )} +
+

Mapache

+
); }; @@ -120,15 +120,11 @@ const Sidebar = (props: SidebarProps) => { className={`${props.isSelected ? "text-white" : "text-neutral-400"}`} />
- {props.isSidebarExpanded && ( -
- {props.text} -
- )} +
+ {props.text} +
); @@ -152,23 +148,23 @@ const Sidebar = (props: SidebarProps) => { iconType={"pixel"} />
- {props.isSidebarExpanded && ( -
-
-
-
- {currentVehicle.name} -
-
- {currentVehicle.id} • {currentVehicle.type} -
+
+
+
+
+ {currentVehicle.name}
-
- +
+ {currentVehicle.id} • {currentVehicle.type}
+
+ +
- )} +
diff --git a/dashboard/src/index.css b/dashboard/src/index.css index 61ccd5cb..0b3bd76a 100644 --- a/dashboard/src/index.css +++ b/dashboard/src/index.css @@ -118,5 +118,8 @@ } .slide-out { - animation: slideOut 0.3s ease forwards; + opacity: 0; + transform: translateX(-100%); + width: 0; + transition: all 0.3s ease; }