Skip to content

Commit

Permalink
Merge pull request #1178 from anasKhafaga/feat/1169-empty-tables
Browse files Browse the repository at this point in the history
Feat(1169): Handle state of empty tables
  • Loading branch information
dartpain authored Oct 2, 2024
2 parents 350c918 + a85f214 commit eb8c2a9
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 8 deletions.
6 changes: 4 additions & 2 deletions frontend/src/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@
"name": "Document Name",
"date": "Vector Date",
"type": "Type",
"tokenUsage": "Token Usage"
"tokenUsage": "Token Usage",
"noData": "No existing Documents"
},
"apiKeys": {
"label": "Chatbots",
"name": "Name",
"key": "API Key",
"sourceDoc": "Source Document",
"createNew": "Create New"
"createNew": "Create New",
"noData": "No existing Chatbots"
},
"analytics": {
"label": "Analytics"
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/locale/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@
"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",
"name": "Nombre",
"key": "Clave de API",
"sourceDoc": "Documento Fuente",
"createNew": "Crear Nuevo"
"createNew": "Crear Nuevo",
"noData": "No hay chatbots existentes"
},
"analytics": {
"label": "Analítica"
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/locale/jp.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@
"name": "ドキュメント名",
"date": "ベクトル日付",
"type": "タイプ",
"tokenUsage": "トークン使用量"
"tokenUsage": "トークン使用量",
"noData": "既存のドキュメントはありません"
},
"apiKeys": {
"label": "チャットボット",
"name": "名前",
"key": "APIキー",
"sourceDoc": "ソースドキュメント",
"createNew": "新規作成"
"createNew": "新規作成",
"noData": "既存のチャットボットはありません"
},
"analytics": {
"label": "分析"
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/locale/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@
"name": "文件名称",
"date": "向量日期",
"type": "类型",
"tokenUsage": "令牌使用"
"tokenUsage": "令牌使用",
"noData": "没有现有的文档"
},
"apiKeys": {
"label": "聊天机器人",
"name": "名称",
"key": "API 密钥",
"sourceDoc": "源文档",
"createNew": "创建新的"
"createNew": "创建新的",
"noData": "没有现有的聊天机器人"
},
"analytics": {
"label": "分析"
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/settings/APIKeys.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ export default function APIKeys() {
</tr>
</thead>
<tbody>
{!apiKeys?.length && (
<tr>
<td colSpan={4} className="border-t p-4">
{t('settings.apiKeys.noData')}
</td>
</tr>
)}
{apiKeys?.map((element, index) => (
<tr key={index}>
<td className="border-r border-t p-4">{element.name}</td>
Expand Down
7 changes: 7 additions & 0 deletions frontend/src/settings/Documents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,13 @@ const Documents: React.FC<DocumentsProps> = ({
</tr>
</thead>
<tbody>
{!documents?.length && (
<tr>
<td colSpan={5} className="border-t p-4">
{t('settings.documents.noData')}
</td>
</tr>
)}
{documents &&
documents.map((document, index) => (
<tr key={index}>
Expand Down

0 comments on commit eb8c2a9

Please sign in to comment.