From 82d0c517162215688c88ef09f60cef8d37847df8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E5=B0=8F=E6=A7=90?= Date: Wed, 11 Feb 2026 12:12:06 +0800 Subject: [PATCH] =?UTF-8?q?feat(webui):=20=E6=8F=92=E4=BB=B6=E5=95=86?= =?UTF-8?q?=E5=BA=97=E5=A2=9E=E5=8A=A0=E6=8F=92=E4=BB=B6=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=B9=B6=E6=94=AF=E6=8C=81=E9=80=9A=E8=BF=87?= =?UTF-8?q?=20url=20=E4=BC=A0=E9=80=92=20id=20=E7=9B=B4=E6=8E=A5=E6=89=93?= =?UTF-8?q?=E5=BC=80=20(#1615)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(webui): 插件商店增加插件详情弹窗并支持通过 url 传递 id 直接打开 * fix(webui):type check --- .gitignore | 3 + .../display_card/plugin_store_card.tsx | 12 +- .../src/components/tailwind_markdown.tsx | 166 +++++++- .../pages/dashboard/plugin_detail_modal.tsx | 390 ++++++++++++++++++ .../src/pages/dashboard/plugin_store.tsx | 49 +++ 5 files changed, 601 insertions(+), 19 deletions(-) create mode 100644 packages/napcat-webui-frontend/src/pages/dashboard/plugin_detail_modal.tsx diff --git a/.gitignore b/.gitignore index 83598d5b..0adb7cf1 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,9 @@ devconfig/* !.vscode/extensions.json .idea/* +# macOS +.DS_Store + # Build *.db checkVersion.sh diff --git a/packages/napcat-webui-frontend/src/components/display_card/plugin_store_card.tsx b/packages/napcat-webui-frontend/src/components/display_card/plugin_store_card.tsx index 94c01647..3a3424c9 100644 --- a/packages/napcat-webui-frontend/src/components/display_card/plugin_store_card.tsx +++ b/packages/napcat-webui-frontend/src/components/display_card/plugin_store_card.tsx @@ -55,6 +55,7 @@ function getAuthorAvatar (homepage?: string, downloadUrl?: string): string | und export interface PluginStoreCardProps { data: PluginStoreItem; onInstall: () => void; + onViewDetail?: () => void; installStatus?: InstallStatus; installedVersion?: string; } @@ -62,6 +63,7 @@ export interface PluginStoreCardProps { const PluginStoreCard: React.FC = ({ data, onInstall, + onViewDetail, installStatus = 'not-installed', installedVersion, }) => { @@ -91,7 +93,10 @@ const PluginStoreCard: React.FC = ({ )} shadow='sm' > - + {/* Header: Avatar + Name + Author */}
= ({
- + e.stopPropagation()} + > {installStatus === 'installed' ? (