From 23ca574a8196809f1157e4a75b6a9a1c89b1eaba Mon Sep 17 00:00:00 2001 From: DrSmoothl <1787882683@qq.com> Date: Sat, 2 May 2026 19:08:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E4=B8=8D=E5=85=BC=E5=AE=B9=E5=8E=9F=E5=9B=A0=E7=9A=84=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=EF=BC=8C=E4=BC=98=E5=8C=96=E6=8F=92=E4=BB=B6=E5=85=BC?= =?UTF-8?q?=E5=AE=B9=E6=80=A7=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/routes/plugins/InstalledTab.tsx | 3 + .../src/routes/plugins/MarketplaceTab.tsx | 3 + dashboard/src/routes/plugins/PluginCard.tsx | 14 ++++- dashboard/src/routes/plugins/index.tsx | 57 +++++++++++++++++-- 4 files changed, 69 insertions(+), 8 deletions(-) diff --git a/dashboard/src/routes/plugins/InstalledTab.tsx b/dashboard/src/routes/plugins/InstalledTab.tsx index a2ffe04d..3447f949 100644 --- a/dashboard/src/routes/plugins/InstalledTab.tsx +++ b/dashboard/src/routes/plugins/InstalledTab.tsx @@ -16,6 +16,7 @@ interface InstalledTabProps { checkPluginCompatibility: (plugin: PluginInfo) => boolean needsUpdate: (plugin: PluginInfo) => boolean getStatusBadge: (plugin: PluginInfo) => React.JSX.Element | null + getIncompatibleReason: (plugin: PluginInfo) => string | null } export function InstalledTab({ @@ -33,6 +34,7 @@ export function InstalledTab({ checkPluginCompatibility, needsUpdate, getStatusBadge, + getIncompatibleReason, }: InstalledTabProps) { // 过滤已安装插件 const filteredPlugins = plugins.filter(plugin => { @@ -80,6 +82,7 @@ export function InstalledTab({ checkPluginCompatibility={checkPluginCompatibility} needsUpdate={needsUpdate} getStatusBadge={getStatusBadge} + getIncompatibleReason={getIncompatibleReason} /> ))} diff --git a/dashboard/src/routes/plugins/MarketplaceTab.tsx b/dashboard/src/routes/plugins/MarketplaceTab.tsx index bcd4b8c2..e623530c 100644 --- a/dashboard/src/routes/plugins/MarketplaceTab.tsx +++ b/dashboard/src/routes/plugins/MarketplaceTab.tsx @@ -16,6 +16,7 @@ interface MarketplaceTabProps { checkPluginCompatibility: (plugin: PluginInfo) => boolean needsUpdate: (plugin: PluginInfo) => boolean getStatusBadge: (plugin: PluginInfo) => React.JSX.Element | null + getIncompatibleReason: (plugin: PluginInfo) => string | null } export function MarketplaceTab({ @@ -33,6 +34,7 @@ export function MarketplaceTab({ checkPluginCompatibility, needsUpdate, getStatusBadge, + getIncompatibleReason, }: MarketplaceTabProps) { // 过滤插件 const filteredPlugins = plugins.filter(plugin => { @@ -76,6 +78,7 @@ export function MarketplaceTab({ checkPluginCompatibility={checkPluginCompatibility} needsUpdate={needsUpdate} getStatusBadge={getStatusBadge} + getIncompatibleReason={getIncompatibleReason} /> ))} diff --git a/dashboard/src/routes/plugins/PluginCard.tsx b/dashboard/src/routes/plugins/PluginCard.tsx index ad6d3f1e..93a0fdb1 100644 --- a/dashboard/src/routes/plugins/PluginCard.tsx +++ b/dashboard/src/routes/plugins/PluginCard.tsx @@ -20,6 +20,7 @@ interface PluginCardProps { checkPluginCompatibility: (plugin: PluginInfo) => boolean needsUpdate: (plugin: PluginInfo) => boolean getStatusBadge: (plugin: PluginInfo) => React.JSX.Element | null + getIncompatibleReason: (plugin: PluginInfo) => string | null } export function PluginCard({ @@ -34,6 +35,7 @@ export function PluginCard({ checkPluginCompatibility, needsUpdate, getStatusBadge, + getIncompatibleReason, }: PluginCardProps) { const navigate = useNavigate() @@ -114,8 +116,14 @@ export function PluginCard({ needsUpdate(plugin) ? (