From b5dc7281f99c76ed33483f66ac3131b8df6e044d Mon Sep 17 00:00:00 2001 From: Anas Khafaga Date: Tue, 1 Oct 2024 15:29:58 +0300 Subject: [PATCH 1/3] 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 645703a2b..dfd1cdef7 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 49aa5d538..8e0db8b36 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 9e3673304..d7ec1d3c6 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 81eff996d..fb40541e6 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 ee88a98f1..8dafb6d30 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) => ( From 09ba14b8ca797de8d182d9ee6014b9d7b739adda Mon Sep 17 00:00:00 2001 From: Anas Khafaga Date: Tue, 1 Oct 2024 15:30:29 +0300 Subject: [PATCH 2/3] feat: add a row for no chatbot 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/APIKeys.tsx | 7 +++++++ 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index dfd1cdef7..fa2cac3c4 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -62,7 +62,8 @@ "name": "Name", "key": "API Key", "sourceDoc": "Source Document", - "createNew": "Create New" + "createNew": "Create New", + "noData": "No existing Chatbots" }, "analytics": { "label": "Analytics" diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index 8e0db8b36..7b7dbec08 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -62,7 +62,8 @@ "name": "Nombre", "key": "Clave de API", "sourceDoc": "Documento Fuente", - "createNew": "Crear Nuevo" + "createNew": "Crear Nuevo", + "noData": "No hay chatbots existentes" }, "analytics": { "label": "Analítica" diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index d7ec1d3c6..fa61c2913 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -62,7 +62,8 @@ "name": "名前", "key": "APIキー", "sourceDoc": "ソースドキュメント", - "createNew": "新規作成" + "createNew": "新規作成", + "noData": "既存のチャットボットはありません" }, "analytics": { "label": "分析" diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index fb40541e6..080c4ee31 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -62,7 +62,8 @@ "name": "名称", "key": "API 密钥", "sourceDoc": "源文档", - "createNew": "创建新的" + "createNew": "创建新的", + "noData": "没有现有的聊天机器人" }, "analytics": { "label": "分析" diff --git a/frontend/src/settings/APIKeys.tsx b/frontend/src/settings/APIKeys.tsx index ebb322681..f224d0162 100644 --- a/frontend/src/settings/APIKeys.tsx +++ b/frontend/src/settings/APIKeys.tsx @@ -116,6 +116,13 @@ export default function APIKeys() { + {!apiKeys?.length && ( + + + {t('settings.apiKeys.noData')} + + + )} {apiKeys?.map((element, index) => ( {element.name} From a85f214fdbe15a903aa2b27a7665c3b25d97d541 Mon Sep 17 00:00:00 2001 From: Anas Khafaga Date: Wed, 2 Oct 2024 07:01:27 +0300 Subject: [PATCH 3/3] fix: sharp corner of the cell --- frontend/src/settings/APIKeys.tsx | 2 +- frontend/src/settings/Documents.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/settings/APIKeys.tsx b/frontend/src/settings/APIKeys.tsx index f224d0162..e27f56964 100644 --- a/frontend/src/settings/APIKeys.tsx +++ b/frontend/src/settings/APIKeys.tsx @@ -118,7 +118,7 @@ export default function APIKeys() { {!apiKeys?.length && ( - + {t('settings.apiKeys.noData')} diff --git a/frontend/src/settings/Documents.tsx b/frontend/src/settings/Documents.tsx index 8dafb6d30..288160629 100644 --- a/frontend/src/settings/Documents.tsx +++ b/frontend/src/settings/Documents.tsx @@ -76,7 +76,7 @@ const Documents: React.FC = ({ {!documents?.length && ( - + {t('settings.documents.noData')}