mirror of
https://github.com/massbug/judge4c.git
synced 2025-07-03 23:30:50 +00:00
feat(panel): add horizontal scrollbar to edit panels
This commit is contained in:
parent
8c96e0d77d
commit
f1882e5410
@ -6,8 +6,8 @@ import { Language } from "@/generated/client";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { CoreEditor } from "@/components/core-editor";
|
import { CoreEditor } from "@/components/core-editor";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { getProblemData } from "@/app/actions/getProblem";
|
import { getProblemData } from "@/app/actions/getProblem";
|
||||||
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
||||||
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
||||||
import { updateProblemTemplate } from "@/components/creater/problem-maintain";
|
import { updateProblemTemplate } from "@/components/creater/problem-maintain";
|
||||||
@ -112,6 +112,7 @@ export default function EditCodePanel({ problemId }: EditCodePanelProps) {
|
|||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</PanelLayout>
|
</PanelLayout>
|
||||||
);
|
);
|
||||||
|
@ -13,10 +13,10 @@ import MdxPreview from "@/components/mdx-preview";
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { Accordion } from "@/components/ui/accordion";
|
import { Accordion } from "@/components/ui/accordion";
|
||||||
import { CoreEditor } from "@/components/core-editor";
|
import { CoreEditor } from "@/components/core-editor";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { getProblemData } from "@/app/actions/getProblem";
|
import { getProblemData } from "@/app/actions/getProblem";
|
||||||
import { VideoEmbed } from "@/components/content/video-embed";
|
import { VideoEmbed } from "@/components/content/video-embed";
|
||||||
import { getProblemLocales } from "@/app/actions/getProblemLocales";
|
import { getProblemLocales } from "@/app/actions/getProblemLocales";
|
||||||
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
|
|
||||||
@ -211,6 +211,7 @@ export default function EditDescriptionPanel({
|
|||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</PanelLayout>
|
</PanelLayout>
|
||||||
);
|
);
|
||||||
|
@ -6,8 +6,8 @@ import { Input } from "@/components/ui/input";
|
|||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { Difficulty } from "@/generated/client";
|
import { Difficulty } from "@/generated/client";
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { getProblemData } from "@/app/actions/getProblem";
|
import { getProblemData } from "@/app/actions/getProblem";
|
||||||
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
||||||
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
||||||
import { updateProblemDetail } from "@/components/creater/problem-maintain";
|
import { updateProblemDetail } from "@/components/creater/problem-maintain";
|
||||||
@ -163,6 +163,7 @@ export default function EditDetailPanel({ problemId }: { problemId: string }) {
|
|||||||
</div>
|
</div>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</PanelLayout>
|
</PanelLayout>
|
||||||
);
|
);
|
||||||
|
@ -9,10 +9,10 @@ import MdxPreview from "@/components/mdx-preview";
|
|||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { Accordion } from "@/components/ui/accordion";
|
import { Accordion } from "@/components/ui/accordion";
|
||||||
import { CoreEditor } from "@/components/core-editor";
|
import { CoreEditor } from "@/components/core-editor";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { getProblemData } from "@/app/actions/getProblem";
|
import { getProblemData } from "@/app/actions/getProblem";
|
||||||
import { VideoEmbed } from "@/components/content/video-embed";
|
import { VideoEmbed } from "@/components/content/video-embed";
|
||||||
import { getProblemLocales } from "@/app/actions/getProblemLocales";
|
import { getProblemLocales } from "@/app/actions/getProblemLocales";
|
||||||
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
||||||
import { updateProblemSolution } from "@/components/creater/problem-maintain";
|
import { updateProblemSolution } from "@/components/creater/problem-maintain";
|
||||||
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card";
|
||||||
@ -204,6 +204,7 @@ export default function EditSolutionPanel({
|
|||||||
</Button>
|
</Button>
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</PanelLayout>
|
</PanelLayout>
|
||||||
);
|
);
|
||||||
|
@ -10,9 +10,9 @@ import {
|
|||||||
} from "@/components/creater/problem-maintain";
|
} from "@/components/creater/problem-maintain";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
import { ScrollArea } from "@/components/ui/scroll-area";
|
|
||||||
import { getProblemData } from "@/app/actions/getProblem";
|
import { getProblemData } from "@/app/actions/getProblem";
|
||||||
import { generateAITestcase } from "@/app/actions/ai-testcase";
|
import { generateAITestcase } from "@/app/actions/ai-testcase";
|
||||||
|
import { ScrollArea, ScrollBar } from "@/components/ui/scroll-area";
|
||||||
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
import { Card, CardContent, CardHeader } from "@/components/ui/card";
|
||||||
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
import { PanelLayout } from "@/features/problems/layouts/panel-layout";
|
||||||
|
|
||||||
@ -272,6 +272,7 @@ export default function EditTestcasePanel({
|
|||||||
))}
|
))}
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
|
<ScrollBar orientation="horizontal" />
|
||||||
</ScrollArea>
|
</ScrollArea>
|
||||||
</PanelLayout>
|
</PanelLayout>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user