2024-09-27 11:20:48 +08:00
|
|
|
"use client"
|
2024-11-11 10:04:00 +08:00
|
|
|
import Header from "@/components/window/Header"
|
|
|
|
|
import Nav from "@/components/window/Nav"
|
|
|
|
|
import SideBar from "@/components/window/SideBar"
|
2025-03-12 11:22:32 +08:00
|
|
|
import { cn } from "@heroui/react"
|
2024-09-27 11:20:48 +08:00
|
|
|
// import { platform } from "@tauri-apps/plugin-os"
|
2024-09-20 23:15:42 +08:00
|
|
|
|
|
|
|
|
export default function BaseLayout({
|
|
|
|
|
children,
|
|
|
|
|
}: {
|
2024-11-11 10:04:00 +08:00
|
|
|
children: React.ReactNode
|
2024-09-20 23:15:42 +08:00
|
|
|
}) {
|
|
|
|
|
return (
|
2025-03-14 19:15:46 +08:00
|
|
|
<div className="w-full h-full p-0 m-0">
|
2024-09-27 11:20:48 +08:00
|
|
|
{/* bg-[#f1f0f2] */}
|
2024-09-20 23:15:42 +08:00
|
|
|
<Nav />
|
|
|
|
|
|
|
|
|
|
<div className="flex flex-col w-full h-full">
|
|
|
|
|
<SideBar />
|
|
|
|
|
|
2024-09-27 11:20:48 +08:00
|
|
|
<main
|
2025-03-12 11:22:32 +08:00
|
|
|
className={cn(
|
2024-11-11 10:04:00 +08:00
|
|
|
"flex flex-col h-full pb-5 pr-5 ml-20 overflow-hidden",
|
2024-09-27 11:20:48 +08:00
|
|
|
// platform() === "windows" ? "ml-20" : "ml-[4.25rem]"
|
|
|
|
|
)}
|
|
|
|
|
>
|
2024-09-20 23:15:42 +08:00
|
|
|
<Header />
|
|
|
|
|
|
|
|
|
|
{children}
|
|
|
|
|
</main>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2024-09-27 11:20:48 +08:00
|
|
|
)
|
2024-09-20 23:15:42 +08:00
|
|
|
}
|