From 1b1d9830609c4d41208c6513155cc96bf6ed2a32 Mon Sep 17 00:00:00 2001 From: mangmang <362165265@qq.com> Date: Sun, 19 Jul 2026 19:31:00 +0800 Subject: [PATCH] WIP: preserve frontend redesign --- frontend/src/App.vue | 735 ++++++--- frontend/src/api/config.ts | 3 + frontend/src/api/health.ts | 10 + frontend/src/components/IngestTab.vue | 1601 ++++++++++++++++---- frontend/src/components/common/AppIcon.vue | 143 ++ frontend/src/composables/useAppState.ts | 128 ++ frontend/src/composables/usePaths.ts | 48 + frontend/src/styles/theme.css | 205 ++- 8 files changed, 2345 insertions(+), 528 deletions(-) create mode 100644 frontend/src/api/health.ts create mode 100644 frontend/src/components/common/AppIcon.vue create mode 100644 frontend/src/composables/useAppState.ts create mode 100644 frontend/src/composables/usePaths.ts diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 904151e..fc15845 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,315 +1,606 @@ diff --git a/frontend/src/api/config.ts b/frontend/src/api/config.ts index 5d0a228..ced4ede 100644 --- a/frontend/src/api/config.ts +++ b/frontend/src/api/config.ts @@ -3,6 +3,9 @@ import request from './request'; export interface ConfigResponse { basePath: string; inputDir: string; + libraryDir: string; + rejectedDir: string; + // 保留原有字段以保证向后兼容 aggregatedDir: string; formatIssuesDir: string; duplicatesDir: string; diff --git a/frontend/src/api/health.ts b/frontend/src/api/health.ts new file mode 100644 index 0000000..ff76c34 --- /dev/null +++ b/frontend/src/api/health.ts @@ -0,0 +1,10 @@ +import request from './request'; + +/** + * 后端健康检查。 + * 对应 GET /api/health,成功时后端返回 Result(data 为 "OK")。 + * request 拦截器会自动解包 Result,成功返回 data 字符串;失败会 reject。 + */ +export function getHealth(): Promise { + return request.get('/api/health'); +} diff --git a/frontend/src/components/IngestTab.vue b/frontend/src/components/IngestTab.vue index b194e0a..4003180 100644 --- a/frontend/src/components/IngestTab.vue +++ b/frontend/src/components/IngestTab.vue @@ -1,161 +1,309 @@