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:
RockChinQ
2026-04-08 02:23:20 +08:00
parent 1cdd428bcc
commit 617c95ebc4
4 changed files with 10 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import React, { useCallback, useEffect, useState } from 'react';
import { Link } from 'react-router-dom';
import { Card, CardContent } from '@/components/ui/card';
import {
Select,
@@ -219,6 +220,12 @@ export default function FileUploadZone({
<p className="text-sm text-yellow-800 dark:text-yellow-200">
{t('knowledge.documentsTab.noParserAvailable')}
</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 className="space-y-2">

View File

@@ -872,6 +872,7 @@ const enUS = {
builtInParser: 'Provided by Knowledge engine',
noParserAvailable:
'No parser supports this file type. Please install a parser plugin that can handle this format.',
installParserHint: 'Browse parser plugins in Marketplace →',
confirmUpload: 'Upload',
cancelUpload: 'Cancel',
},

View File

@@ -832,6 +832,7 @@ const zhHans = {
builtInParser: '由知识引擎提供',
noParserAvailable:
'没有解析器支持此文件类型,请安装支持该格式的解析器插件。',
installParserHint: '前往插件市场安装解析器 →',
confirmUpload: '上传',
cancelUpload: '取消',
},

View File

@@ -825,6 +825,7 @@ const zhHant = {
builtInParser: '由知識引擎提供',
noParserAvailable:
'沒有解析器支援此檔案類型,請安裝支援該格式的解析器插件。',
installParserHint: '前往插件市場安裝解析器 →',
confirmUpload: '上傳',
cancelUpload: '取消',
},