0.5 缩减重构

This commit is contained in:
lix-2026
2026-04-13 19:21:42 +08:00
parent af92c4b149
commit 71fb1aee7e
2023 changed files with 21113 additions and 394493 deletions
@@ -4,18 +4,18 @@ import { useEffect, useMemo, useState } from "react";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { getMnoteRuntimeConfig } from "@/lib/runtime-config";
interface TaskResponse {
task_id: string;
status: string;
progress: number;
message?: string | null;
}
interface Props {
documentId: string;
}
interface TaskResponse {
task_id: string;
status: string;
progress: number;
message?: string | null;
}
interface Props {
documentId: string;
}
export function DocumentTaskPanel({ documentId }: Props) {
const [task, setTask] = useState<TaskResponse | null>(null);
const [pending, setPending] = useState(false);
@@ -48,11 +48,11 @@ export function DocumentTaskPanel({ documentId }: Props) {
}, 2000);
return () => clearInterval(timer);
}, [backendUrl, task?.task_id, useConvex]);
return (
<Card className="mt-4 bg-white shadow-sm">
<CardContent className="flex items-center justify-between py-3 text-sm text-gray-600">
<div>
return (
<Card className="mt-4 bg-white shadow-sm">
<CardContent className="flex items-center justify-between py-3 text-sm text-gray-600">
<div>
<div className="font-medium text-gray-900"> OCR </div>
<div className="text-xs text-gray-500">
{task ? task.status : "未开始"} · {task ? `${task.progress}%` : "0%"}