You've already forked DataMate
feat: add showTime prop to DevelopmentInProgress component across multiple pages
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { Button } from "antd";
|
||||
|
||||
const DevelopmentInProgress = ({ showHome = true }) => {
|
||||
const DevelopmentInProgress = ({ showHome = true, showTime = "" }) => {
|
||||
return (
|
||||
<div className="mt-40 flex flex-col items-center justify-center">
|
||||
<div className="hero-icon">🚧</div>
|
||||
<h1 className="text-2xl font-bold">功能开发中</h1>
|
||||
{showTime && (
|
||||
<p className="mt-4">
|
||||
为了给您带来更好的体验,我们计划<b>2025.10.30</b>
|
||||
为了给您带来更好的体验,我们计划<b>{showTime}</b>
|
||||
开放此功能
|
||||
</p>
|
||||
)}
|
||||
{showHome && (
|
||||
<Button
|
||||
type="primary"
|
||||
|
||||
@@ -22,7 +22,7 @@ import { ColumnType } from "antd/es/table";
|
||||
import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
|
||||
export default function DataAnnotation() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.10.30" />;
|
||||
const navigate = useNavigate();
|
||||
const [viewMode, setViewMode] = useState<"list" | "card">("list");
|
||||
const [showCreateDialog, setShowCreateDialog] = useState(false);
|
||||
|
||||
@@ -59,7 +59,7 @@ const defaultTemplates = [
|
||||
];
|
||||
|
||||
export default function CollectionTaskCreate() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.10.30" />;
|
||||
|
||||
const navigate = useNavigate();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -10,7 +10,7 @@ export default function DataCollection() {
|
||||
const navigate = useNavigate();
|
||||
const [activeTab, setActiveTab] = useState("task-management");
|
||||
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.10.30" />;
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -180,9 +180,7 @@ export default function DataEvaluationPage() {
|
||||
setTasks(tasks.filter((task) => task.id !== taskId));
|
||||
};
|
||||
|
||||
return (
|
||||
<DevelopmentInProgress />
|
||||
);
|
||||
return <DevelopmentInProgress showTime="2025.11.30" />;
|
||||
// 主列表界面
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -37,7 +37,7 @@ const { TextArea } = Input;
|
||||
const { Option } = Select;
|
||||
|
||||
const KnowledgeBaseCreatePage: React.FC = () => {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.10.30" />;
|
||||
const navigate = useNavigate();
|
||||
const [form] = Form.useForm();
|
||||
const [knowledgeBases, setKnowledgeBases] =
|
||||
|
||||
@@ -11,22 +11,12 @@ import {
|
||||
FileText,
|
||||
Download,
|
||||
} from "lucide-react";
|
||||
import {
|
||||
Card,
|
||||
Button,
|
||||
Badge,
|
||||
Input,
|
||||
Tabs,
|
||||
Modal,
|
||||
Breadcrumb,
|
||||
Tag,
|
||||
} from "antd";
|
||||
import {
|
||||
mockChunks,
|
||||
mockQAPairs,
|
||||
sliceOperators,
|
||||
} from "@/mock/knowledgeBase";
|
||||
import type { KnowledgeBase, KBFile } from "@/pages/KnowledgeGeneration/knowledge-base.model";
|
||||
import { Card, Button, Badge, Input, Tabs, Modal, Breadcrumb, Tag } from "antd";
|
||||
import { mockChunks, mockQAPairs, sliceOperators } from "@/mock/knowledgeBase";
|
||||
import type {
|
||||
KnowledgeBase,
|
||||
KBFile,
|
||||
} from "@/pages/KnowledgeGeneration/knowledge-base.model";
|
||||
import { Link, useNavigate } from "react-router";
|
||||
import DetailHeader from "@/components/DetailHeader";
|
||||
import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
@@ -59,7 +49,7 @@ const getStatusColor = (status: string) => {
|
||||
};
|
||||
|
||||
const KnowledgeBaseFileDetail: React.FC = () => {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.10.30" />;
|
||||
const navigate = useNavigate();
|
||||
// 假设通过 props 或路由参数获取 selectedFile/selectedKB
|
||||
const [selectedFile] = useState<KBFile>(
|
||||
|
||||
@@ -20,7 +20,7 @@ import CardView from "@/components/CardView";
|
||||
import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
|
||||
export default function KnowledgeGenerationPage() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.10.30" />;
|
||||
const navigate = useNavigate();
|
||||
const [knowledgeBases, setKnowledgeBases] =
|
||||
useState<KnowledgeBase[]>(mockKnowledgeBases);
|
||||
|
||||
@@ -31,7 +31,7 @@ const { TextArea } = Input;
|
||||
const { Option } = Select;
|
||||
|
||||
export default function CreateRatioTask() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.11.30" />;
|
||||
|
||||
const navigate = useNavigate();
|
||||
const [form] = Form.useForm();
|
||||
|
||||
@@ -28,7 +28,7 @@ import { SearchControls } from "@/components/SearchControls";
|
||||
import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
|
||||
export default function RatioTasksPage() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.11.30" />;
|
||||
const navigate = useNavigate();
|
||||
const [searchQuery, setSearchQuery] = useState("");
|
||||
const [filterStatus, setFilterStatus] = useState("all");
|
||||
|
||||
@@ -41,7 +41,7 @@ import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
const { TextArea } = Input;
|
||||
|
||||
export default function SynthesisTaskCreate() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.11.30" />;
|
||||
const navigate = useNavigate();
|
||||
const [form] = Form.useForm();
|
||||
const [searchQuery, setSearchQuery] = useState("");
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { useState, useRef } from "react";
|
||||
import { Card, Select, Input, Button, Badge, Divider, Form, message } from "antd";
|
||||
import {
|
||||
Plus,
|
||||
ArrowLeft,
|
||||
Play,
|
||||
Save,
|
||||
RefreshCw,
|
||||
FileText,
|
||||
Code,
|
||||
X,
|
||||
} from "lucide-react";
|
||||
Card,
|
||||
Select,
|
||||
Input,
|
||||
Button,
|
||||
Badge,
|
||||
Divider,
|
||||
Form,
|
||||
message,
|
||||
} from "antd";
|
||||
import { Plus, ArrowLeft, Play, Save, RefreshCw, Code, X } from "lucide-react";
|
||||
import { useNavigate } from "react-router";
|
||||
import { mockTemplates } from "@/mock/annotation";
|
||||
import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
@@ -17,9 +17,11 @@ import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
const { TextArea } = Input;
|
||||
|
||||
export default function InstructionTemplateCreate() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.11.30" />;
|
||||
const navigate = useNavigate();
|
||||
const [selectedTemplate, setSelectedTemplate] = useState<Template | null>(null);
|
||||
const [selectedTemplate, setSelectedTemplate] = useState<Template | null>(
|
||||
null
|
||||
);
|
||||
const [isTestingTemplate, setIsTestingTemplate] = useState(false);
|
||||
const [templates, setTemplates] = useState<Template[]>(mockTemplates);
|
||||
const [variables, setVariables] = useState<string[]>([]);
|
||||
@@ -131,10 +133,7 @@ export default function InstructionTemplateCreate() {
|
||||
{/* Header */}
|
||||
<div className="flex items-center justify-between mb-2">
|
||||
<div className="flex items-center">
|
||||
<Button
|
||||
onClick={() => navigate("/data/synthesis/task")}
|
||||
type="text"
|
||||
>
|
||||
<Button onClick={() => navigate("/data/synthesis/task")} type="text">
|
||||
<ArrowLeft className="w-4 h-4 mr-2" />
|
||||
</Button>
|
||||
<h1 className="text-xl font-bold bg-clip-text">
|
||||
@@ -177,7 +176,9 @@ export default function InstructionTemplateCreate() {
|
||||
<Form.Item label="模板描述" name="description">
|
||||
<Input placeholder="简要描述模板的用途和特点" />
|
||||
</Form.Item>
|
||||
<h2 className="font-medium text-gray-900 text-lg mt-6 mb-2">Prompt内容</h2>
|
||||
<h2 className="font-medium text-gray-900 text-lg mt-6 mb-2">
|
||||
Prompt内容
|
||||
</h2>
|
||||
<Form.Item
|
||||
label="Prompt内容"
|
||||
name="prompt"
|
||||
@@ -194,7 +195,9 @@ export default function InstructionTemplateCreate() {
|
||||
提示:使用 {"{变量名}"} 格式定义变量,例如 {"{text}"} 或 {"{input}"}
|
||||
</p>
|
||||
<div className="mb-4">
|
||||
<span className="text-sm font-semibold text-gray-700">变量管理</span>
|
||||
<span className="text-sm font-semibold text-gray-700">
|
||||
变量管理
|
||||
</span>
|
||||
<div className="flex flex-wrap gap-2 min-h-[50px] p-3 border rounded-xl bg-gray-50 mt-2">
|
||||
{variables.map((variable, index) => (
|
||||
<Badge
|
||||
@@ -226,13 +229,19 @@ export default function InstructionTemplateCreate() {
|
||||
className="h-8 text-sm"
|
||||
onPressEnter={handleAddVariable}
|
||||
/>
|
||||
<Button onClick={handleAddVariable} type="default" className="px-4 text-sm">
|
||||
<Button
|
||||
onClick={handleAddVariable}
|
||||
type="default"
|
||||
className="px-4 text-sm"
|
||||
>
|
||||
<Plus className="w-3 h-3 mr-1" />
|
||||
添加
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<h2 className="font-medium text-gray-900 text-lg mb-2 pt-2">模板测试</h2>
|
||||
<h2 className="font-medium text-gray-900 text-lg mb-2 pt-2">
|
||||
模板测试
|
||||
</h2>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<Form.Item label="测试输入" name="testInput">
|
||||
<TextArea
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { Tabs, Button, Card } from "antd";
|
||||
import { Tabs, Button } from "antd";
|
||||
import { Plus, ArrowRight } from "lucide-react";
|
||||
import DataAnnotation from "../DataAnnotation/Annotate/components/TextAnnotation";
|
||||
import { useNavigate } from "react-router";
|
||||
@@ -8,7 +8,7 @@ import SynthesisTaskTab from "./components/SynthesisTaskTab";
|
||||
import DevelopmentInProgress from "@/components/DevelopmentInProgress";
|
||||
|
||||
export default function DataSynthesisPage() {
|
||||
return <DevelopmentInProgress />;
|
||||
return <DevelopmentInProgress showTime="2025.11.30" />;
|
||||
const navigate = useNavigate();
|
||||
|
||||
const [activeTab, setActiveTab] = useState("tasks");
|
||||
|
||||
Reference in New Issue
Block a user