diff --git a/frontend/src/locale/en.json b/frontend/src/locale/en.json index df7895ed..1081ddf0 100644 --- a/frontend/src/locale/en.json +++ b/frontend/src/locale/en.json @@ -81,7 +81,8 @@ "sourceDoc": "Source Document", "createNew": "Create New", "noData": "No existing Chatbots", - "deleteConfirmation": "Are you sure you want to delete the API key '{{name}}'?" + "deleteConfirmation": "Are you sure you want to delete the API key '{{name}}'?", + "description": "Here you can create and manage your chatbots. Chatbots can be deployed to websites as widgets or used inside your applications." }, "analytics": { "label": "Analytics", diff --git a/frontend/src/locale/es.json b/frontend/src/locale/es.json index 123f9fdd..e699a3c6 100644 --- a/frontend/src/locale/es.json +++ b/frontend/src/locale/es.json @@ -81,7 +81,8 @@ "sourceDoc": "Documento Fuente", "createNew": "Crear Nuevo", "noData": "No hay chatbots existentes", - "deleteConfirmation": "¿Estás seguro de que quieres eliminar la clave API '{{name}}'?" + "deleteConfirmation": "¿Estás seguro de que quieres eliminar la clave API '{{name}}'?", + "description": "Aquí puede crear y gestionar sus chatbots. Los chatbots se pueden implementar en sitios web como widgets o utilizarse dentro de sus aplicaciones." }, "analytics": { "label": "Analítica", diff --git a/frontend/src/locale/jp.json b/frontend/src/locale/jp.json index b4cd1531..7c716135 100644 --- a/frontend/src/locale/jp.json +++ b/frontend/src/locale/jp.json @@ -80,7 +80,8 @@ "sourceDoc": "ソースドキュメント", "createNew": "新規作成", "noData": "既存のチャットボットはありません", - "deleteConfirmation": "APIキー '{{name}}' を削除してもよろしいですか?" + "deleteConfirmation": "APIキー '{{name}}' を削除してもよろしいですか?", + "description": "ここでチャットボットを作成・管理できます。チャットボットはウィジェットとしてウェブサイトに導入したり、アプリケーション内で使用したりすることができます。" }, "analytics": { "label": "分析", diff --git a/frontend/src/locale/ru.json b/frontend/src/locale/ru.json index d6bc2bdf..3ec75bfb 100644 --- a/frontend/src/locale/ru.json +++ b/frontend/src/locale/ru.json @@ -81,7 +81,8 @@ "sourceDoc": "Источник документа", "createNew": "Создать новый", "noData": "Нет существующих чатботов", - "deleteConfirmation": "Вы уверены, что хотите удалить API ключ '{{name}}'?" + "deleteConfirmation": "Вы уверены, что хотите удалить API ключ '{{name}}'?", + "description": "Здесь вы можете создавать и управлять чат-ботами. Чат-боты могут быть развернуты на веб-сайтах в виде виджетов или использоваться внутри ваших приложений." }, "analytics": { "label": "Аналитика", diff --git a/frontend/src/locale/zh-TW.json b/frontend/src/locale/zh-TW.json index 8eef9e56..eb0240a0 100644 --- a/frontend/src/locale/zh-TW.json +++ b/frontend/src/locale/zh-TW.json @@ -81,7 +81,8 @@ "sourceDoc": "來源文件", "createNew": "建立新的", "noData": "沒有現有的聊天機器人", - "deleteConfirmation": "您確定要刪除 API 金鑰 '{{name}}' 嗎?" + "deleteConfirmation": "您確定要刪除 API 金鑰 '{{name}}' 嗎?", + "description": "在這裡,您可以創建和管理您的聊天機器人。聊天機器人可以作為小部件部署到網站上,或在您的應用程序中使用。" }, "analytics": { "label": "分析", diff --git a/frontend/src/locale/zh.json b/frontend/src/locale/zh.json index eb9d1e21..245333c3 100644 --- a/frontend/src/locale/zh.json +++ b/frontend/src/locale/zh.json @@ -81,7 +81,8 @@ "sourceDoc": "源文档", "createNew": "创建新的", "noData": "没有现有的聊天机器人", - "deleteConfirmation": "您确定要删除 API 密钥 '{{name}}' 吗?" + "deleteConfirmation": "您确定要删除 API 密钥 '{{name}}' 吗?", + "description": "在这里,您可以创建和管理您的聊天机器人。聊天机器人可以作为小部件部署到网站上,或在您的应用程序中使用。" }, "analytics": { "label": "分析", diff --git a/frontend/src/modals/ConfirmationModal.tsx b/frontend/src/modals/ConfirmationModal.tsx index 1a2e22e2..28b9c582 100644 --- a/frontend/src/modals/ConfirmationModal.tsx +++ b/frontend/src/modals/ConfirmationModal.tsx @@ -32,7 +32,7 @@ export default function ConfirmationModal({ >
-

+

{message}

diff --git a/frontend/src/settings/APIKeys.tsx b/frontend/src/settings/APIKeys.tsx index 642566f1..6d76d7e8 100644 --- a/frontend/src/settings/APIKeys.tsx +++ b/frontend/src/settings/APIKeys.tsx @@ -98,111 +98,132 @@ export default function APIKeys() { }, []); return ( -
-
-
+
+
+
+

+ {t('settings.apiKeys.description')} +

+
+ +
- {isCreateModalOpen && ( - setCreateModal(false)} - /> - )} - {isSaveKeyModalOpen && ( - setSaveKeyModal(false)} - /> - )} - {keyToDelete && ( - setKeyToDelete(null)} - submitLabel={t('modals.deleteConv.delete')} - handleSubmit={() => handleDeleteKey(keyToDelete.id)} - handleCancel={() => setKeyToDelete(null)} - /> - )} -
-
-
-
-
- - - - - - - - - - - {loading ? ( - - ) : !apiKeys?.length ? ( - - - - ) : ( - Array.isArray(apiKeys) && - apiKeys.map((element, index) => ( - - - - - + + )) + )} + +
- {t('settings.apiKeys.name')} - - {t('settings.apiKeys.sourceDoc')} - - {t('settings.apiKeys.key')} -
- {t('settings.apiKeys.noData')} -
{element.name}{element.source}{element.key} + +
+
+
+ + + + + + + + + + + {loading ? ( + + ) : !apiKeys?.length ? ( + + + + ) : ( + Array.isArray(apiKeys) && + apiKeys.map((element) => ( + + + + + - - )) - )} - -
+ {t('settings.apiKeys.name')} + + {t('settings.apiKeys.sourceDoc')} + + + {t('settings.apiKeys.key')} + + + {t('settings.apiKeys.key')} + + + Actions +
+ {t('settings.apiKeys.noData')} +
+
+ {element.name} +
+
+
+ {element.source} +
+
+
+ {element.key} +
+
+
+
-
-
+ +
+
+ {isCreateModalOpen && ( + setCreateModal(false)} + /> + )} + {isSaveKeyModalOpen && ( + setSaveKeyModal(false)} /> + )} + {keyToDelete && ( + setKeyToDelete(null)} + submitLabel={t('modals.deleteConv.delete')} + handleSubmit={() => handleDeleteKey(keyToDelete.id)} + handleCancel={() => setKeyToDelete(null)} + /> + )}
); } diff --git a/frontend/src/settings/Documents.tsx b/frontend/src/settings/Documents.tsx index f4cc3f6e..1203758d 100644 --- a/frontend/src/settings/Documents.tsx +++ b/frontend/src/settings/Documents.tsx @@ -176,14 +176,14 @@ export default function Documents({ }} /> ) : ( -
+

{t('settings.documents.title')}

-
+
- -
- {' '} +
- - - - - - setShowDocumentChunks(document)} + > + + + + + + )) + )} + +
- {t('settings.documents.name')} - -
- {t('settings.documents.date')} - refreshDocs('date')} - src={caretSort} - alt="sort" - /> -
-
-
- - {t('settings.documents.tokenUsage')} +
+ + + + + + + - - - - - {loading ? ( - - ) : !currentDocuments?.length ? ( - - + - ) : ( - currentDocuments.map((document, index) => ( - setShowDocumentChunks(document)} - > + + + {loading ? ( + + ) : !currentDocuments?.length ? ( + - - - - )) - )} - -
+ {t('settings.documents.name')} + +
+ {t('settings.documents.date')} + refreshDocs('date')} + src={caretSort} + alt="sort" + /> +
+
+
+ + {t('settings.documents.tokenUsage')} + + + {t('settings.documents.tokenUsage')} + + refreshDocs('tokens')} + src={caretSort} + alt="sort" + /> +
+
+ + {t('settings.documents.actions')} - - {t('settings.documents.tokenUsage')} - - refreshDocs('tokens')} - src={caretSort} - alt="sort" - /> - - - - {t('settings.documents.actions')} - -
- {t('settings.documents.noData')} -
- {document.name} - - {document.date ? formatDate(document.date) : ''} - - {document.tokens ? formatTokens(+document.tokens) : ''} - -
- {!document.syncFrequency && ( -
- )} - {document.syncFrequency && ( - { - handleManageSync(document, value); - }} - defaultValue={document.syncFrequency} - icon={SyncIcon} - /> - )} - -
+ {t('settings.documents.noData')}
+ ) : ( + currentDocuments.map((document, index) => ( +
+ {document.name} + + {document.date ? formatDate(document.date) : ''} + + {document.tokens + ? formatTokens(+document.tokens) + : ''} + e.stopPropagation()} // Stop event propagation for the entire actions cell + > +
+ {!document.syncFrequency && ( +
+ )} + {document.syncFrequency && ( + { + handleManageSync(document, value); + }} + defaultValue={document.syncFrequency} + icon={SyncIcon} + /> + )} + +
+
+