From 8fe88c1d15399e16ff4cf6d93f8d3a71de9769b8 Mon Sep 17 00:00:00 2001 From: yorn <1057707203@qq.com> Date: Mon, 31 Mar 2025 19:53:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=96=87=E4=BB=B6=E4=B8=8A?= =?UTF-8?q?=E4=BC=A0=E9=A1=B5=E9=9D=A2=EF=BC=8C=E6=96=B0=E5=A2=9E=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E4=B8=8A=E4=BC=A0=E7=9A=84=E5=85=AC=E5=85=B1=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=EF=BC=88=E8=BF=9B=E5=BA=A6=E6=9D=A1=EF=BC=8C=E6=AD=A5?= =?UTF-8?q?=E9=AA=A4=E6=9D=A1=EF=BC=8C=E4=B8=8A=E4=BC=A0=E5=8C=BA=E5=9F=9F?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/layout/Sidebar.tsx | 2 +- app/components/ui/FileProgress.tsx | 44 ++ app/components/ui/ProcessingSteps.tsx | 41 ++ app/components/ui/UploadArea.tsx | 128 ++++ app/routes/files.tsx | 5 + app/routes/files.upload.tsx | 697 +++++++++++++++++++++ app/routes/prompts._index.tsx | 11 +- app/routes/prompts.new.tsx | 34 +- app/routes/prompts.tsx | 2 +- app/styles/components/file-progress.css | 44 ++ app/styles/components/processing-steps.css | 178 ++++++ app/styles/components/table.css | 21 +- app/styles/components/upload-area.css | 57 ++ app/styles/main.css | 9 +- app/styles/pages/files_upload.css | 225 +++++++ app/styles/pages/prompts_index.css | 9 +- html/文件-上传.html | 6 +- html/文档-列表.html | 8 +- tailwind.config.ts | 3 +- 19 files changed, 1492 insertions(+), 32 deletions(-) create mode 100644 app/components/ui/FileProgress.tsx create mode 100644 app/components/ui/ProcessingSteps.tsx create mode 100644 app/components/ui/UploadArea.tsx create mode 100644 app/routes/files.tsx create mode 100644 app/routes/files.upload.tsx create mode 100644 app/styles/components/file-progress.css create mode 100644 app/styles/components/processing-steps.css create mode 100644 app/styles/components/upload-area.css create mode 100644 app/styles/pages/files_upload.css diff --git a/app/components/layout/Sidebar.tsx b/app/components/layout/Sidebar.tsx index 49c81b8..5ad1551 100644 --- a/app/components/layout/Sidebar.tsx +++ b/app/components/layout/Sidebar.tsx @@ -34,7 +34,7 @@ export function Sidebar({ onToggle, collapsed }: SidebarProps) { { id: 'file-upload', title: '文件上传', - path: '/files/new', + path: '/files/upload', icon: 'ri-upload-cloud-line' }, { diff --git a/app/components/ui/FileProgress.tsx b/app/components/ui/FileProgress.tsx new file mode 100644 index 0000000..1b648d4 --- /dev/null +++ b/app/components/ui/FileProgress.tsx @@ -0,0 +1,44 @@ +import fileProgressStyles from "~/styles/components/file-progress.css?url"; + +interface FileProgressProps { + fileName: string; + fileSize?: string; + progress: number; + speed?: string; + className?: string; +} + +export function links() { + return [{ rel: "stylesheet", href: fileProgressStyles }]; +} + +export function FileProgress({ + fileName, + fileSize, + progress, + speed = "0KB/s", + className = "" +}: FileProgressProps) { + return ( +
{tipText}
} + +文件已成功上传并评查完成,请查看结果
+文件上传页面加载失败。请刷新页面或联系系统管理员。
+ +{"{varName}"},在使用时会自动替换。系统将自动识别模板中的变量。请从以下{"{docType}"}文档中抽取关键信息...{"{varName}"} 形式在模板中使用,无需手动定义。