diff --git a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx index 99dbc07d..725a7d00 100644 --- a/web/src/app/home/components/home-sidebar/HomeSidebar.tsx +++ b/web/src/app/home/components/home-sidebar/HomeSidebar.tsx @@ -24,6 +24,9 @@ import { ExternalLink, Trash, Bug, + Upload, + Store, + Github, } from 'lucide-react'; import { useTheme } from 'next-themes'; @@ -135,6 +138,7 @@ const CREATABLE_CATEGORIES: EntityCategoryId[] = [ 'pipelines', 'knowledge', 'mcp', + 'plugins', ]; // Categories where clicking the parent only toggles collapse (no list page) @@ -243,6 +247,7 @@ function NavItems({ const pathname = usePathname(); const searchParams = useSearchParams(); const sidebarData = useSidebarData(); + const { setPendingPluginInstallAction } = sidebarData; const { state: sidebarState, isMobile } = useSidebar(); const { t } = useTranslation(); // Track which entity categories have their full list expanded @@ -601,21 +606,78 @@ function NavItems({ >
{config.name} - {canCreate && ( - - )} + {canCreate && + (isPlugin ? ( + + + + + + {systemInfo.enable_marketplace && ( + { + e.stopPropagation(); + router.push('/home/market'); + setPopoverOpen((prev) => ({ + ...prev, + [config.id]: false, + })); + }} + > + + {t('plugins.goToMarketplace')} + + )} + { + e.stopPropagation(); + setPendingPluginInstallAction('local'); + router.push('/home/plugins'); + setPopoverOpen((prev) => ({ + ...prev, + [config.id]: false, + })); + }} + > + + {t('plugins.uploadLocal')} + + { + e.stopPropagation(); + setPendingPluginInstallAction('github'); + router.push('/home/plugins'); + setPopoverOpen((prev) => ({ + ...prev, + [config.id]: false, + })); + }} + > + + {t('plugins.installFromGithub')} + + + + ) : ( + + ))}
{renderEntityList(true)} @@ -651,18 +713,64 @@ function NavItems({ {config.icon} {config.name}
- {canCreate && ( - - )} + {canCreate && + (isPlugin ? ( + + + + + + {systemInfo.enable_marketplace && ( + { + e.stopPropagation(); + router.push('/home/market'); + }} + > + + {t('plugins.goToMarketplace')} + + )} + { + e.stopPropagation(); + setPendingPluginInstallAction('local'); + router.push('/home/plugins'); + }} + > + + {t('plugins.uploadLocal')} + + { + e.stopPropagation(); + setPendingPluginInstallAction('github'); + router.push('/home/plugins'); + }} + > + + {t('plugins.installFromGithub')} + + + + ) : ( + + ))}