From b5dc7281f99c76ed33483f66ac3131b8df6e044d Mon Sep 17 00:00:00 2001 From: Anas Khafaga Date: Tue, 1 Oct 2024 15:29:58 +0300 Subject: [PATCH] feat: add a row for no document state --- frontend/src/locale/en.json | 3 ++- frontend/src/locale/es.json | 3 ++- frontend/src/locale/jp.json | 3 ++- frontend/src/locale/zh.json | 3 ++- frontend/src/settings/Documents.tsx | 7 +++++++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index 645703a2..dfd1cdef 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -54,7 +54,8 @@ "name": "Document Name", "date": "Vector Date", "type": "Type", - "tokenUsage": "Token Usage" + "tokenUsage": "Token Usage", + "noData": "No existing Documents" }, "apiKeys": { "label": "Chatbots", diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index 49aa5d53..8e0db8b3 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -54,7 +54,8 @@ "name": "Nombre del Documento", "date": "Fecha Vector", "type": "Tipo", - "tokenUsage": "Uso de Tokens" + "tokenUsage": "Uso de Tokens", + "noData": "No hay documentos existentes" }, "apiKeys": { "label": "Chatbots", diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index 9e367330..d7ec1d3c 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -54,7 +54,8 @@ "name": "ドキュメント名", "date": "ベクトル日付", "type": "タイプ", - "tokenUsage": "トークン使用量" + "tokenUsage": "トークン使用量", + "noData": "既存のドキュメントはありません" }, "apiKeys": { "label": "チャットボット", diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index 81eff996..fb40541e 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -54,7 +54,8 @@ "name": "文件名称", "date": "向量日期", "type": "类型", - "tokenUsage": "令牌使用" + "tokenUsage": "令牌使用", + "noData": "没有现有的文档" }, "apiKeys": { "label": "聊天机器人", diff --git a/frontend/src/settings/Documents.tsx b/frontend/src/settings/Documents.tsx index ee88a98f..8dafb6d3 100644 --- a/frontend/src/settings/Documents.tsx +++ b/frontend/src/settings/Documents.tsx @@ -74,6 +74,13 @@ const Documents: React.FC = ({ + {!documents?.length && ( + + + {t('settings.documents.noData')} + + + )} {documents && documents.map((document, index) => (