From 3b45b63d2a12fd60d625834b1d74a20c8aabe352 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Mon, 10 Feb 2025 16:02:02 +0530 Subject: [PATCH] (fix:upload) ui adjust --- frontend/src/locale/en.json | 4 +++- frontend/src/locale/es.json | 4 +++- frontend/src/locale/jp.json | 4 +++- frontend/src/locale/ru.json | 4 +++- frontend/src/locale/zh-TW.json | 4 +++- frontend/src/locale/zh.json | 4 +++- frontend/src/upload/Upload.tsx | 9 +++++---- frontend/src/upload/types/ingestor.ts | 1 + 8 files changed, 24 insertions(+), 10 deletions(-) diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index 35058be0..df7895ed 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -156,7 +156,9 @@ "completed": "Training completed", "wait": "This may take several minutes", "tokenLimit": "Over the token limit, please consider uploading smaller document" - } + }, + "showAdvanced": "Show advanced options", + "hideAdvanced": "Hide advanced options" }, "createAPIKey": { "label": "Create New API Key", diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index d0b47874..123f9fdd 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -156,7 +156,9 @@ "completed": "Entrenamiento completado", "wait": "Esto puede tardar varios minutos", "tokenLimit": "Excede el límite de tokens, considere cargar un documento más pequeño" - } + }, + "showAdvanced": "Mostrar opciones avanzadas", + "hideAdvanced": "Ocultar opciones avanzadas" }, "createAPIKey": { "label": "Crear Nueva Clave de API", diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index 2fdc2c61..b4cd1531 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -155,7 +155,9 @@ "completed": "トレーニング完了", "wait": "数分かかる場合があります", "tokenLimit": "トークン制限を超えています。より小さいドキュメントをアップロードしてください" - } + }, + "showAdvanced": "詳細オプションを表示", + "hideAdvanced": "詳細オプションを非表示" }, "createAPIKey": { "label": "新しいAPIキーを作成", diff --git a/frontend/src/locale/ru.json b/frontend/src/locale/ru.json index 087b8dfd..d6bc2bdf 100644 --- a/frontend/src/locale/ru.json +++ b/frontend/src/locale/ru.json @@ -156,7 +156,9 @@ "completed": "Обучение завершено", "wait": "Это может занять несколько минут", "tokenLimit": "Превышен лимит токенов, рассмотрите возможность загрузки документа меньшего размера" - } + }, + "showAdvanced": "Показать расширенные настройки", + "hideAdvanced": "Скрыть расширенные настройки" }, "createAPIKey": { "label": "Создать новый API ключ", diff --git a/frontend/src/locale/zh-TW.json b/frontend/src/locale/zh-TW.json index f2abf1e5..8eef9e56 100644 --- a/frontend/src/locale/zh-TW.json +++ b/frontend/src/locale/zh-TW.json @@ -156,7 +156,9 @@ "completed": "訓練完成", "wait": "這可能需要幾分鐘", "tokenLimit": "超出令牌限制,請考慮上傳較小的文檔" - } + }, + "showAdvanced": "顯示進階選項", + "hideAdvanced": "隱藏進階選項" }, "createAPIKey": { "label": "建立新的 API 金鑰", diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index 56c8fbb1..eb9d1e21 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -156,7 +156,9 @@ "completed": "训练完成", "wait": "这可能需要几分钟", "tokenLimit": "超出令牌限制,请考虑上传较小的文档" - } + }, + "showAdvanced": "显示高级选项", + "hideAdvanced": "隐藏高级选项" }, "createAPIKey": { "label": "创建新的 API 密钥", diff --git a/frontend/src/upload/Upload.tsx b/frontend/src/upload/Upload.tsx index bff31b10..0e030beb 100644 --- a/frontend/src/upload/Upload.tsx +++ b/frontend/src/upload/Upload.tsx @@ -637,7 +637,7 @@ function Upload({ {activeTab === 'remote' && ( <> opt.value === ingestor.type) || null @@ -658,6 +658,7 @@ function Upload({ borderVariant="thin" placeholder="Name" label="Name" + required={true} /> {renderFormFields()} {IngestorFormSchemas[ingestor.type].some( @@ -665,11 +666,11 @@ function Upload({ ) && ( )} diff --git a/frontend/src/upload/types/ingestor.ts b/frontend/src/upload/types/ingestor.ts index cd709847..e934cf91 100644 --- a/frontend/src/upload/types/ingestor.ts +++ b/frontend/src/upload/types/ingestor.ts @@ -99,6 +99,7 @@ export const IngestorFormSchemas: Record = { label: 'Number of Posts', type: 'number', required: true, + advanced: true, }, ], github: [