mirror of
https://github.com/massbug/judge4c.git
synced 2025-05-17 23:12:23 +00:00
feat(playground): add AI panel to problem layout
This commit is contained in:
parent
599d44b341
commit
da92cd49bc
@ -13,6 +13,7 @@ interface PlaygroundLayoutProps {
|
|||||||
problem: React.ReactNode;
|
problem: React.ReactNode;
|
||||||
workspace: React.ReactNode;
|
workspace: React.ReactNode;
|
||||||
terminal: React.ReactNode;
|
terminal: React.ReactNode;
|
||||||
|
ai: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function PlaygroundLayout({
|
export default async function PlaygroundLayout({
|
||||||
@ -20,6 +21,7 @@ export default async function PlaygroundLayout({
|
|||||||
problem,
|
problem,
|
||||||
workspace,
|
workspace,
|
||||||
terminal,
|
terminal,
|
||||||
|
ai,
|
||||||
}: PlaygroundLayoutProps) {
|
}: PlaygroundLayoutProps) {
|
||||||
const { id } = await params;
|
const { id } = await params;
|
||||||
|
|
||||||
@ -54,11 +56,11 @@ export default async function PlaygroundLayout({
|
|||||||
<PlaygroundHeader />
|
<PlaygroundHeader />
|
||||||
<main className="flex flex-grow overflow-y-hidden p-2.5 pt-0">
|
<main className="flex flex-grow overflow-y-hidden p-2.5 pt-0">
|
||||||
<ResizablePanelGroup direction="horizontal" className="relative h-full flex">
|
<ResizablePanelGroup direction="horizontal" className="relative h-full flex">
|
||||||
<ResizablePanel defaultSize={50} className="border border-muted rounded-xl min-w-9">
|
<ResizablePanel defaultSize={30} className="border border-muted rounded-xl min-w-9">
|
||||||
{problem}
|
{problem}
|
||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
<ResizableHandle className="mx-1 bg-transparent hover:bg-blue-500" />
|
<ResizableHandle className="mx-1 bg-transparent hover:bg-blue-500" />
|
||||||
<ResizablePanel defaultSize={50} className="min-w-9">
|
<ResizablePanel defaultSize={40} className="min-w-9">
|
||||||
<ResizablePanelGroup direction="vertical">
|
<ResizablePanelGroup direction="vertical">
|
||||||
<ResizablePanel defaultSize={50} className="border border-muted rounded-xl min-h-9">
|
<ResizablePanel defaultSize={50} className="border border-muted rounded-xl min-h-9">
|
||||||
{workspace}
|
{workspace}
|
||||||
@ -69,6 +71,10 @@ export default async function PlaygroundLayout({
|
|||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
</ResizablePanelGroup>
|
</ResizablePanelGroup>
|
||||||
</ResizablePanel>
|
</ResizablePanel>
|
||||||
|
<ResizableHandle className="mx-1 bg-transparent hover:bg-blue-500" />
|
||||||
|
<ResizablePanel defaultSize={30} className="border border-muted rounded-xl min-w-9">
|
||||||
|
{ai}
|
||||||
|
</ResizablePanel>
|
||||||
</ResizablePanelGroup>
|
</ResizablePanelGroup>
|
||||||
</main>
|
</main>
|
||||||
</ProblemStoreProvider>
|
</ProblemStoreProvider>
|
||||||
|
Loading…
Reference in New Issue
Block a user