From f0b76187217e62350b2e6c36d39986e0e3e04a6a Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 29 Jul 2026 19:25:50 +0800 Subject: [PATCH] refactor(frontend): redesign upload confirmation dialog Restructure the upload confirm modal into a three-column layout with file list, settings navigation, and KB-editor-aligned configuration panels. Add per-section status summaries, polish parser Excel option alignment, and hide graph settings when unavailable. --- frontend/src/i18n/locales/en-US.ts | 16 +- frontend/src/i18n/locales/ko-KR.ts | 16 +- frontend/src/i18n/locales/ru-RU.ts | 16 +- frontend/src/i18n/locales/zh-CN.ts | 16 +- .../components/UploadConfirmDialog.test.ts | 12 + .../components/UploadConfirmDialog.vue | 1787 +++++++++++------ .../knowledge/settings/KBParserSettings.vue | 80 +- 7 files changed, 1256 insertions(+), 687 deletions(-) diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index fc455170..7e38807b 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -769,7 +769,12 @@ export default { configNav: 'Parse settings navigation', tabOverview: 'Overview', overviewTitle: 'Parse settings for this batch', - overviewDesc: 'Click any row to edit', + overviewDesc: 'Review the parsing settings below, then start the upload', + basicSettings: 'Common settings', + advancedSettings: 'Advanced capabilities', + navParserDefault: 'Default', + navParserCustomized: 'Customized', + moreOptions: 'More processing options', backToOverview: 'Back to overview', summaryChunkOverlapShort: 'Overlap {overlap}', summaryParentChildShort: 'Parent-child', @@ -818,10 +823,11 @@ export default { urlAdded: 'URL added', urlDuplicate: 'This URL is already in the list', addUrl: 'Add', - vlmModelRequired: 'This batch includes images. Enable multimodal and select a VLM model.', - multimodalRequiredForImages: 'Off (batch includes images)', - asrModelRequired: 'This batch includes audio. Enable ASR and select a speech recognition model.', - asrRequiredForAudio: 'Off (batch includes audio)', + statusNeedsSetup: 'Needs setup', + multimodalSetupHint: 'Images detected. Enable multimodal and select a model.', + asrSetupHint: 'Audio detected. Enable speech recognition and select a model.', + vlmModelRequired: 'Configure a multimodal model', + asrModelRequired: 'Configure a speech recognition model', vlmModelSelectRequired: 'Multimodal is enabled. Please select a VLM model.', asrModelSelectRequired: 'Speech recognition is enabled. Please select an ASR model.', pdfForceScanned: { diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index 0ec7951d..53cba3e3 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -774,7 +774,12 @@ export default { configNav: "파싱 설정 탐색", tabOverview: "구성 개요", overviewTitle: "이번 배치 파싱 설정", - overviewDesc: "항목을 클릭하여 설정을 수정하세요", + overviewDesc: "아래 파싱 설정을 확인한 뒤 업로드를 시작하세요", + basicSettings: "기본 설정", + advancedSettings: "고급 기능", + navParserDefault: "기본", + navParserCustomized: "사용자 지정", + moreOptions: "추가 처리 옵션", backToOverview: "구성 개요로 돌아가기", summaryChunkOverlapShort: "겹침 {overlap}", summaryParentChildShort: "부모-자식 청킹", @@ -823,10 +828,11 @@ export default { urlAdded: "URL이 추가되었습니다", urlDuplicate: "이 URL은 이미 목록에 있습니다", addUrl: "추가", - vlmModelRequired: "이 배치에 이미지가 포함되어 있습니다. 멀티모달을 활성화하고 VLM 모델을 선택하세요", - multimodalRequiredForImages: "꺼짐(이 배치에 이미지 포함)", - asrModelRequired: "이 배치에 오디오가 포함되어 있습니다. ASR을 활성화하고 음성 인식 모델을 선택하세요", - asrRequiredForAudio: "꺼짐(이 배치에 오디오 포함)", + statusNeedsSetup: "설정 필요", + multimodalSetupHint: "이미지가 포함되어 있습니다. 멀티모달을 활성화하고 모델을 선택하세요", + asrSetupHint: "오디오가 포함되어 있습니다. 음성 인식을 활성화하고 모델을 선택하세요", + vlmModelRequired: "멀티모달 모델을 설정하세요", + asrModelRequired: "음성 인식 모델을 설정하세요", vlmModelSelectRequired: "멀티모달이 활성화되었습니다. VLM 모델을 선택하세요", asrModelSelectRequired: "음성 인식이 활성화되었습니다. ASR 모델을 선택하세요", pdfForceScanned: { diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index 492d1346..a94fbedf 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -738,7 +738,12 @@ export default { configNav: 'Навигация по настройкам разбора', tabOverview: 'Обзор', overviewTitle: 'Настройки разбора для этой партии', - overviewDesc: 'Нажмите на строку, чтобы изменить', + overviewDesc: 'Проверьте настройки разбора ниже, затем начните загрузку', + basicSettings: 'Основные настройки', + advancedSettings: 'Дополнительные возможности', + navParserDefault: 'По умолчанию', + navParserCustomized: 'Настроено', + moreOptions: 'Дополнительные параметры обработки', backToOverview: 'Вернуться к обзору', summaryChunkOverlapShort: 'Перекрытие {overlap}', summaryParentChildShort: 'Родительско-дочернее', @@ -787,10 +792,11 @@ export default { urlAdded: 'URL добавлен', urlDuplicate: 'Этот URL уже в списке', addUrl: 'Добавить', - vlmModelRequired: 'В партии есть изображения. Включите мультимодальность и выберите модель VLM.', - multimodalRequiredForImages: 'Выкл. (в партии есть изображения)', - asrModelRequired: 'В партии есть аудио. Включите ASR и выберите модель распознавания речи.', - asrRequiredForAudio: 'Выкл. (в партии есть аудио)', + statusNeedsSetup: 'Нужна настройка', + multimodalSetupHint: 'Обнаружены изображения. Включите мультимодальность и выберите модель.', + asrSetupHint: 'Обнаружено аудио. Включите распознавание речи и выберите модель.', + vlmModelRequired: 'Настройте мультимодальную модель', + asrModelRequired: 'Настройте модель распознавания речи', vlmModelSelectRequired: 'Мультимодальность включена. Выберите модель VLM.', asrModelSelectRequired: 'Распознавание речи включено. Выберите модель ASR.', pdfForceScanned: { diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index fdcd4c3e..90bb7b9d 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -772,7 +772,12 @@ export default { configNav: "解析配置导航", tabOverview: "配置总览", overviewTitle: "本批次解析配置", - overviewDesc: "点击任一项可修改配置", + overviewDesc: "确认解析配置后开始上传", + basicSettings: "常用配置", + advancedSettings: "高级能力", + navParserDefault: "默认", + navParserCustomized: "已自定义", + moreOptions: "更多处理选项", backToOverview: "返回配置总览", summaryChunkOverlapShort: "重叠 {overlap}", summaryParentChildShort: "父子分块", @@ -821,10 +826,11 @@ export default { urlAdded: "已添加 URL", urlDuplicate: "该 URL 已在列表中", addUrl: "添加", - vlmModelRequired: "本批次包含图片,请启用多模态并选择 VLM 模型", - multimodalRequiredForImages: "未开启(本批次含图片)", - asrModelRequired: "本批次包含音频,请启用 ASR 并选择语音识别模型", - asrRequiredForAudio: "未开启(本批次含音频)", + statusNeedsSetup: "待配置", + multimodalSetupHint: "含图片内容,请启用多模态并选择模型", + asrSetupHint: "含音频内容,请启用语音识别并选择模型", + vlmModelRequired: "请配置多模态模型", + asrModelRequired: "请配置语音识别模型", vlmModelSelectRequired: "已启用多模态,请选择 VLM 模型", asrModelSelectRequired: "已启用语音识别,请选择 ASR 模型", pdfForceScanned: { diff --git a/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts b/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts index 2bda7c85..5af8342f 100644 --- a/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts +++ b/frontend/src/views/knowledge/components/UploadConfirmDialog.test.ts @@ -30,3 +30,15 @@ test('routes global knowledge file drops through the upload confirmation flow', assert.match(knowledgeBase, /handleKnowledgeFileDrop/) assert.match(knowledgeBase, /handleUploadSourceFiles\(files\)/) }) + +test('uses section navigation with inline chunking controls and advanced options grouped', () => { + assert.match(dialog, /v-model="uiState\.chunkingConfig\.strategy"/) + assert.match(dialog, /v-model="uiState\.chunkingConfig\.chunkSize"/) + assert.match(dialog, /v-model="uiState\.chunkingConfig\.chunkOverlap"/) + assert.match(dialog, /chunkingMoreOpen/) + assert.match(dialog, /activeSection === 'graph'/) + assert.match(dialog, /class="files-panel"/) + assert.match(dialog, /statusFull/) + assert.match(dialog, /data-section="multimodal"/) + assert.doesNotMatch(dialog, /
- -
- - {{ t('uploadConfirm.cancel') }} - - - {{ confirmButtonText }} - -
+
+ + {{ t('uploadConfirm.cancel') }} + + + {{ confirmButtonText }} + +
+
+
@@ -325,15 +509,14 @@