From ef07c2db2c7a807cbcf446d3933f20c4b2ee1681 Mon Sep 17 00:00:00 2001 From: Rick Ye Date: Fri, 11 Sep 2026 11:20:08 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BE=A7=E6=A0=8F=E6=8F=92=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E5=AF=B9=E9=BD=90=E5=AE=BF=E4=B8=BB=E7=81=B0?= =?UTF-8?q?=E9=98=B6=EF=BC=88text-ink-2=EF=BC=89=EF=BC=9B=E6=8F=92?= =?UTF-8?q?=E4=BB=B6=E8=A1=8C=E5=8F=B3=E5=88=97=E9=87=8D=E6=8E=92=E2=80=94?= =?UTF-8?q?=E2=80=94=E5=85=A5=E5=8F=A3/=E5=90=AF=E5=8A=A8/=E9=87=8D?= =?UTF-8?q?=E8=BD=BD=E4=B8=89=E8=A1=8C=EF=BC=8C=E6=96=87=E6=A1=88=E6=94=B9?= =?UTF-8?q?=E3=80=8C=E5=90=AF=E5=8A=A8/=E5=85=B3=E9=97=AD=E3=80=8D?= =?UTF-8?q?=EF=BC=8C=E9=87=8D=E8=BD=BD=E4=B8=BA=20lucide=20=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E6=8C=89=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../renderer/src/components/SettingsModal.tsx | 60 +++++++++++++------ .../renderer/src/components/SidebarNav.tsx | 2 +- 2 files changed, 43 insertions(+), 19 deletions(-) diff --git a/apps/desktop/src/renderer/src/components/SettingsModal.tsx b/apps/desktop/src/renderer/src/components/SettingsModal.tsx index d9a4404..db5eda0 100644 --- a/apps/desktop/src/renderer/src/components/SettingsModal.tsx +++ b/apps/desktop/src/renderer/src/components/SettingsModal.tsx @@ -10,6 +10,7 @@ import { LuLogOut, LuPlus, LuPuzzle, + LuRefreshCw, LuSearch, LuSettings2, LuSparkles, @@ -652,6 +653,8 @@ function PluginsPanel({ }): ReactNode { const plugins = usePluginList() const [scope, setScope] = useState<'user' | 'project' | 'builtin'>('user') + /** 全局插件重载进行中(重扫目录 + 重建运行时;期间刷新按钮禁用旋转) */ + const [reloading, setReloading] = useState(false) const [dirs, setDirs] = useState<{ user: string[]; project: string[]; global: string[] }>({ user: [], project: [], @@ -768,24 +771,6 @@ function PluginsPanel({ onClick={(e) => e.stopPropagation()} onKeyDown={(e) => e.stopPropagation()} > -
- {p.enabled ? '已启动' : '已关闭'} - -
{p.hasSettings && p.enabled && (
入口 @@ -806,6 +791,45 @@ function PluginsPanel({
)} +
+ {p.enabled ? '启动' : '关闭'} + +
+ {p.source === 'external' && ( +
+ 重载 + +
+ )} ) diff --git a/apps/desktop/src/renderer/src/components/SidebarNav.tsx b/apps/desktop/src/renderer/src/components/SidebarNav.tsx index 8493df6..db91e53 100644 --- a/apps/desktop/src/renderer/src/components/SidebarNav.tsx +++ b/apps/desktop/src/renderer/src/components/SidebarNav.tsx @@ -444,7 +444,7 @@ export function SidebarNav({ onClick={() => onOpenPlugin(plugin.manifest.id)} className={`${navRowClass} ${active ? 'bg-hover-2 text-ink' : ''}`} > - +