From aa4143ccf17a811f63e97a86118a40d0c3e88dae Mon Sep 17 00:00:00 2001 From: sky121113 Date: Fri, 16 Jan 2026 10:14:59 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=84=AA=E5=8C=96=E4=B8=AD=E5=A4=AE?= =?UTF-8?q?=E5=BE=8C=E5=8F=B0=20UI=20(=E7=94=A8=E8=AA=9E=E8=AA=BF=E6=95=B4?= =?UTF-8?q?=E3=80=81=E7=A7=BB=E9=99=A4=E9=80=A3=E7=B5=90)=20=E8=88=87?= =?UTF-8?q?=E5=AF=A6=E4=BD=9C=20RWD=20=E6=94=AF=E6=8F=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/js/Layouts/LandlordLayout.tsx | 61 +++++++++++++------ resources/js/Pages/Landlord/Dashboard.tsx | 10 +-- resources/js/Pages/Landlord/Tenant/Create.tsx | 12 ++-- resources/js/Pages/Landlord/Tenant/Edit.tsx | 14 ++--- resources/js/Pages/Landlord/Tenant/Index.tsx | 18 +++--- resources/js/Pages/Landlord/Tenant/Show.tsx | 8 +-- 6 files changed, 72 insertions(+), 51 deletions(-) diff --git a/resources/js/Layouts/LandlordLayout.tsx b/resources/js/Layouts/LandlordLayout.tsx index f5e9958..535eae9 100644 --- a/resources/js/Layouts/LandlordLayout.tsx +++ b/resources/js/Layouts/LandlordLayout.tsx @@ -15,6 +15,8 @@ import { DropdownMenuSeparator, DropdownMenuTrigger, } from "@/Components/ui/dropdown-menu"; +import { useState } from "react"; +import { Menu, X } from "lucide-react"; interface LandlordLayoutProps { children: React.ReactNode; @@ -34,31 +36,51 @@ export default function LandlordLayout({ children, title }: LandlordLayoutProps) active: url === "/landlord" || url === "/landlord/", }, { - label: "租戶管理", + label: "客戶管理", href: "/landlord/tenants", icon: Building2, active: url.startsWith("/landlord/tenants"), }, ]; + const [isSidebarOpen, setIsSidebarOpen] = useState(false); + return ( -
+
+ {/* Sidebar Overlay for mobile */} + {isSidebarOpen && ( +
setIsSidebarOpen(false)} + /> + )} + {/* Sidebar */} -