feat: fix the problem in the Operator Market frontend pages

This commit is contained in:
root
2025-12-29 11:38:47 +08:00
parent 29e4a333a9
commit 844add27ea
213 changed files with 45547 additions and 45537 deletions

View File

@@ -1,80 +1,80 @@
import { useState } from "react";
import { Tabs, Button } from "antd";
import { PlusOutlined } from "@ant-design/icons";
import { Plus, ArrowRight } from "lucide-react";
import DataAnnotation from "../DataAnnotation/Annotate/components/TextAnnotation";
import { useNavigate } from "react-router";
import InstructionTemplateTab from "./components/InstructionTemplateTab";
import SynthesisTaskTab from "./components/SynthesisTaskTab";
export default function DataSynthesisPage() {
const navigate = useNavigate();
const [activeTab, setActiveTab] = useState("tasks");
const [showAnnotatePage, setShowAnnotatePage] = useState(false);
if (showAnnotatePage) {
return (
<div>
<div className="flex">
<Button
onClick={() => setShowAnnotatePage(false)}
className="hover:bg-white/70"
>
<ArrowRight className="w-4 h-4 rotate-180 mr-2" />
</Button>
</div>
<DataAnnotation
task={undefined}
currentFileIndex={0}
onSaveAndNext={function (): void {
throw new Error("Function not implemented.");
}}
onSkipAndNext={function (): void {
throw new Error("Function not implemented.");
}}
/>
</div>
);
}
return (
<div className="h-full flex flex-col">
<div className="flex items-center justify-between">
<div className="space-y-1">
<h2 className="text-xl font-bold text-gray-900"></h2>
</div>
<div className="flex items-center gap-2">
<Button
onClick={() => {
navigate("/data/synthesis/task/create-template");
}}
icon={<PlusOutlined />}
>
</Button>
<Button
type="primary"
onClick={() => navigate("/data/synthesis/task/create")}
icon={<PlusOutlined />}
>
</Button>
</div>
</div>
<Tabs
items={[
{ key: "tasks", label: "合成任务", children: <SynthesisTaskTab /> },
{
key: "templates",
label: "指令模板",
children: <InstructionTemplateTab />,
},
]}
activeKey={activeTab}
onChange={setActiveTab}
></Tabs>
</div>
);
}
import { useState } from "react";
import { Tabs, Button } from "antd";
import { PlusOutlined } from "@ant-design/icons";
import { Plus, ArrowRight } from "lucide-react";
import DataAnnotation from "../DataAnnotation/Annotate/components/TextAnnotation";
import { useNavigate } from "react-router";
import InstructionTemplateTab from "./components/InstructionTemplateTab";
import SynthesisTaskTab from "./components/SynthesisTaskTab";
export default function DataSynthesisPage() {
const navigate = useNavigate();
const [activeTab, setActiveTab] = useState("tasks");
const [showAnnotatePage, setShowAnnotatePage] = useState(false);
if (showAnnotatePage) {
return (
<div>
<div className="flex">
<Button
onClick={() => setShowAnnotatePage(false)}
className="hover:bg-white/70"
>
<ArrowRight className="w-4 h-4 rotate-180 mr-2" />
</Button>
</div>
<DataAnnotation
task={undefined}
currentFileIndex={0}
onSaveAndNext={function (): void {
throw new Error("Function not implemented.");
}}
onSkipAndNext={function (): void {
throw new Error("Function not implemented.");
}}
/>
</div>
);
}
return (
<div className="h-full flex flex-col">
<div className="flex items-center justify-between">
<div className="space-y-1">
<h2 className="text-xl font-bold text-gray-900"></h2>
</div>
<div className="flex items-center gap-2">
<Button
onClick={() => {
navigate("/data/synthesis/task/create-template");
}}
icon={<PlusOutlined />}
>
</Button>
<Button
type="primary"
onClick={() => navigate("/data/synthesis/task/create")}
icon={<PlusOutlined />}
>
</Button>
</div>
</div>
<Tabs
items={[
{ key: "tasks", label: "合成任务", children: <SynthesisTaskTab /> },
{
key: "templates",
label: "指令模板",
children: <InstructionTemplateTab />,
},
]}
activeKey={activeTab}
onChange={setActiveTab}
></Tabs>
</div>
);
}