mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-06-11 16:26:02 +00:00
feat: add marketplace link when no parser available for file upload
Links to /home/market?category=Parser, same pattern as knowledge engine selector.
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
import React, { useCallback, useEffect, useState } from 'react';
|
import React, { useCallback, useEffect, useState } from 'react';
|
||||||
|
import { Link } from 'react-router-dom';
|
||||||
import { Card, CardContent } from '@/components/ui/card';
|
import { Card, CardContent } from '@/components/ui/card';
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
@@ -219,6 +220,12 @@ export default function FileUploadZone({
|
|||||||
<p className="text-sm text-yellow-800 dark:text-yellow-200">
|
<p className="text-sm text-yellow-800 dark:text-yellow-200">
|
||||||
{t('knowledge.documentsTab.noParserAvailable')}
|
{t('knowledge.documentsTab.noParserAvailable')}
|
||||||
</p>
|
</p>
|
||||||
|
<Link
|
||||||
|
to="/home/market?category=Parser"
|
||||||
|
className="text-sm text-primary hover:underline mt-1 inline-block"
|
||||||
|
>
|
||||||
|
{t('knowledge.documentsTab.installParserHint')}
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
<div className="space-y-2">
|
<div className="space-y-2">
|
||||||
|
|||||||
@@ -872,6 +872,7 @@ const enUS = {
|
|||||||
builtInParser: 'Provided by Knowledge engine',
|
builtInParser: 'Provided by Knowledge engine',
|
||||||
noParserAvailable:
|
noParserAvailable:
|
||||||
'No parser supports this file type. Please install a parser plugin that can handle this format.',
|
'No parser supports this file type. Please install a parser plugin that can handle this format.',
|
||||||
|
installParserHint: 'Browse parser plugins in Marketplace →',
|
||||||
confirmUpload: 'Upload',
|
confirmUpload: 'Upload',
|
||||||
cancelUpload: 'Cancel',
|
cancelUpload: 'Cancel',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -832,6 +832,7 @@ const zhHans = {
|
|||||||
builtInParser: '由知识引擎提供',
|
builtInParser: '由知识引擎提供',
|
||||||
noParserAvailable:
|
noParserAvailable:
|
||||||
'没有解析器支持此文件类型,请安装支持该格式的解析器插件。',
|
'没有解析器支持此文件类型,请安装支持该格式的解析器插件。',
|
||||||
|
installParserHint: '前往插件市场安装解析器 →',
|
||||||
confirmUpload: '上传',
|
confirmUpload: '上传',
|
||||||
cancelUpload: '取消',
|
cancelUpload: '取消',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -825,6 +825,7 @@ const zhHant = {
|
|||||||
builtInParser: '由知識引擎提供',
|
builtInParser: '由知識引擎提供',
|
||||||
noParserAvailable:
|
noParserAvailable:
|
||||||
'沒有解析器支援此檔案類型,請安裝支援該格式的解析器插件。',
|
'沒有解析器支援此檔案類型,請安裝支援該格式的解析器插件。',
|
||||||
|
installParserHint: '前往插件市場安裝解析器 →',
|
||||||
confirmUpload: '上傳',
|
confirmUpload: '上傳',
|
||||||
cancelUpload: '取消',
|
cancelUpload: '取消',
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user