Sidebar profile

This commit is contained in:
2026-08-19 14:29:10 +02:00
parent e71a95313e
commit 021f71889c
2 changed files with 27 additions and 24 deletions
+7 -8
View File
@@ -35,21 +35,20 @@ export default function App() {
<NewProfilePage appRef={appRef} /> <NewProfilePage appRef={appRef} />
) : ( ) : (
<> <>
<ServerList appRef={appRef} />
<ResizablePanelGroup orientation="horizontal" className="h-screen"> <ResizablePanelGroup orientation="horizontal" className="h-screen">
{appRef.current.server?.meta && (
<>
<ResizablePanel <ResizablePanel
defaultSize="500px" defaultSize="600px"
maxSize="350px" maxSize="400px"
className="shrink-0" minSize="4rem"
groupResizeBehavior="preserve-pixel-size" groupResizeBehavior="preserve-pixel-size"
> >
<div className="flex">
<ServerList appRef={appRef} />
<Sidebar appRef={appRef} /> <Sidebar appRef={appRef} />
</div>
</ResizablePanel> </ResizablePanel>
<ResizableHandle withHandle /> <ResizableHandle withHandle />
</>
)}
<ResizablePanel defaultSize="100%"> <ResizablePanel defaultSize="100%">
<div className="h-screen"></div> <div className="h-screen"></div>
</ResizablePanel> </ResizablePanel>
+7 -3
View File
@@ -58,8 +58,9 @@ export default function Sidebar({
appRef: React.RefObject<Enclave | null>; appRef: React.RefObject<Enclave | null>;
}) { }) {
return ( return (
appRef.current?.server?.meta && ( <div className="h-screen relative w-full @container">
<div className="h-screen"> {appRef.current?.server?.meta && (
<>
<header className="px-3 pt-2.5 pb-2.5 text-lg font-semibold border-b border-b-border"> <header className="px-3 pt-2.5 pb-2.5 text-lg font-semibold border-b border-b-border">
<h1>{appRef.current.server.meta.name}</h1> <h1>{appRef.current.server.meta.name}</h1>
</header> </header>
@@ -67,7 +68,10 @@ export default function Sidebar({
<section className="px-1.5 pt-3.5 w-full flex flex-col gap-1"> <section className="px-1.5 pt-3.5 w-full flex flex-col gap-1">
<RenderChannels channels={appRef.current.server.meta.channels} /> <RenderChannels channels={appRef.current.server.meta.channels} />
</section> </section>
</>
)}
<div className="absolute -left-16 right-16 bottom-0 h-24 w-[calc(100%+4rem-2rem)] z-10 ml-4 mb-4 @max-[150px]:hidden" />
</div> </div>
)
); );
} }